User:NeddySeagoon/YeOldeGentoo 2021 Edition

Ye Olde Gentoo 2021 Edition
Round about 2013, I wrote a page on installing Gentoo using a static /dev. I was going to update the original page bun I lot has changed so its probably easier to start again. The old page is still valid if you want to install on hardware from 2013.

What You Get
A modern Gentoo base system but without all the bells and whistles added in recent years. Ye Olde Gentoo is more about what you don't get. You do not get:

udev - instead a static dev is used systemd - why would you want it anyway pulseaudio - I've not known this to actually add anything hotplug support auto mounting of any sort - use mount by label auto module loading device detection in Xorg

Separate /usr just works but its not essential. Root in LVM on NVE without an initrd. It works but its risky.

Overview
The install will use root in Logical Volume Manager (LVM) on NVMe, with separate /usr and /var. /home, $DISTDIR and $PKGDIR will be in LVM on rotating rust RAID as Conventional Magnetic Recording (CMR) drives are quite good at sequential access of large files.

If you choose to use raid take care not to select Shingled Magnetic Recording (SMR) drives as they are not suited to use in raid sets.

We will use syslinux as a boot loader rather than grub2.

The steps include:


 * Partition the target drive following the handbook.
 * Install the stage3 tarball.
 * Install the portage snapshot.
 * Set up package.mask to keep out unwanted junk.
 * Set up global USE flags to be consistent with.
 * Follow the handbook to install cron, a logger and a bootloader of choice.
 * Install a kernel.
 * Configure the syslinux bootloader.
 * Review and edit configuration settings.
 * Reboot to test.

Partitioning and Filesystem Creation
Follow the Gentoo Handbook up to and including making the filesystems and mounting all the bits at the directory.

I will be using Logical Volumes on top of CMR raid for /home, /var/cache/distfiles and /var/cache/binpkgs, mostly because my /home won't fit on NVMe. Everything else is LVM on NVMe.

We have df -hT Filesystem                    Type   Size  Used Avail Use% Mounted on /dev/root                      ext4   2.0G 1014M  815M  56% / tmpfs                         tmpfs   13G  196K   13G   1% /run shm                           tmpfs   63G  996K   63G   1% /dev/shm cgroup_root                   tmpfs   10M     0   10M   0% /sys/fs/cgroup tmpfs                         tmpfs   63G   84K   63G   1% /tmp /dev/mapper/nvmestatic-usr    ext4   295G   19G  261G   7% /usr /dev/mapper/nvmestatic-var    ext4   5.9G  1.5G  4.2G  26% /var /dev/mapper/storage-home      ext4   2.0T  1.4T  567G  71% /home /dev/mapper/nvmestatic-opt    ext4   2.9G  358M  2.4G  13% /opt /dev/mapper/nvmestatic-local  ext4   926M   40K  859M   1% /usr/local /dev/mapper/storage-distfiles ext4   492G  278G  189G  60% /var/cache/distfiles /dev/mapper/storage-packages  ext4   118G   24K  112G   1% /var/cache/packages /dev/mapper/nvmestatic-portage ext4  2.9G  668M  2.0G  25% /var/db/repos/gentoo /dev/shm                      tmpfs   63G     0   63G   0% /var/tmp/portage /dev/nvme0n1p2                ext4   117M  104K  109M   1% /boot /dev/nvme0n1p1                vfat    61M   27M   34M  44% /boot/EFI

Fetch and install the stage3 as per the handbook.

/proc, /sys and /dev
Follow the handbook for /proc and /sys. /dev is quite different to the handbook. Its going to be static.

Look in. It contains the static /dev delivered by the stage3. Notice all the old floppy device nodes, the IDE devices nodes and lots of things that can't be connected to modern hardware. Remove it all.

Replace it with just the nodes we need right now.

More nodes can be made as required with mknod, or with MAKEDEV (yes its uppercase).

Other /dev Entries
The kernel will show all the devices it knows about in /sys/dev/... That's cheating really as in the good? olde days, /sys did not exist.

Its not an error to have things listed there that are not in /dev, nor vice versa. It's the users task to ensure the major:minor device numbers in /dev match the kernels expectations. DEVTMPFS won't do it for you. Its the users task to set the permissions too. udev won't do it.

Getting Into the chroot
This is conventional handbook. Including fetching and updating the portage snapshot. Do not rebuild or install anything yet.