From 1373453fac70bba7a31cf162d0f5af821b107d47 Mon Sep 17 00:00:00 2001 From: nils Date: Sun, 12 Jan 2025 18:32:23 +0100 Subject: [PATCH] final changes for now --- docs/gentoo-desktop-setup/installation.md | 31 ++++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/gentoo-desktop-setup/installation.md b/docs/gentoo-desktop-setup/installation.md index ade1cd2..5b1393e 100644 --- a/docs/gentoo-desktop-setup/installation.md +++ b/docs/gentoo-desktop-setup/installation.md @@ -3,43 +3,44 @@ Now is the time to actually install Gentoo. First import the pool again: ``` shell-session -root@host:~# zpool import -N -R /mnt rpool -root@host:~# zfs load-key -L file:///tmp/rpool.key rpool +root@host:/# zpool import -N -R /mnt rpool +root@host:/# zfs load-key -L file:///tmp/rpool.key rpool ``` Then mount the datasets and the ESP on `/mnt`: ``` shell-session -root@host:~# mount -t zfs rpool/root/gentoo /mnt -root@host:~# mkdir /mnt/var -root@host:~# mount -t zfs rpool/root/gentoo/var /mnt/var -root@host:~# mkdir /mnt/efi -root@host:~# mount -t vfat /dev/disk/by-label/esp /mnt/efi +root@host:/# mount -t zfs rpool/root/gentoo /mnt +root@host:/# mkdir /mnt/var +root@host:/# mount -t zfs rpool/root/gentoo/var /mnt/var +root@host:/# mkdir /mnt/efi +root@host:/# mount -t vfat /dev/disk/by-label/esp /mnt/efi ``` Now we're going to fetch a stage3 tarball for on the root of the system. Replace the `` with the latest tarball release. ``` shell-session -root@host:~# wget https://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-musl-hardened/stage3-amd64-musl-hardened-.tar.xz +root@host:/# cd /mnt +root@host:/mnt# wget https://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-musl-hardened/stage3-amd64-musl-hardened-.tar.xz ``` -This should have placed a tarball at `/mnt/stage3-amd64-musl-hardened-*-.tar.xz`. There are also other mirrors like `https://ftp.snt.utwente.nl/pub/os/linux/gentoo/releases/amd64/autobuilds/current-stage3-amd64-musl-hardened/` which might provide a faster download depending on your location. Check out for other mirrors. +This should have placed a tarball at `/stage3-amd64-musl-hardened-*-.tar.xz`. There are also other mirrors like `https://ftp.snt.utwente.nl/pub/os/linux/gentoo/releases/amd64/autobuilds/current-stage3-amd64-musl-hardened/` which might provide a faster download depending on your location. Check out for other mirrors. > It is also possible to use `links` instead of `wget` which provides a small user interface for navigation: `# links https://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-musl-hardened` Unpack it in the new root: ``` shell-session -root@host:~# tar xpvf stage3-*.tar.xz --numeric-owner -C /mnt +root@host:/mnt# tar xpvf stage3-*.tar.xz --numeric-owner -C /mnt ``` Then before finally chrooting into the system simply copy over the `resolv.conf` for internet connection inside the chroot. ``` shell-session -root@host:~# cp /etc/resolv.conf /mnt/etc/. -root@host:~# cp /tmp/rpool.key /mnt/tmp -root@host:~# for i in dev proc sys run; do mount --rbind --make-rslave /$i /mnt/$i; done -root@host:~# chroot /mnt +root@host:/# cp /etc/resolv.conf /mnt/etc/. +root@host:/# cp /tmp/rpool.key /mnt/tmp +root@host:/# for i in dev proc sys run; do mount --rbind --make-rslave /$i /mnt/$i; done +root@host:/# chroot /mnt ``` ## Configuring the system @@ -48,7 +49,7 @@ root@host:~# chroot /mnt Before installing any software first edit `/etc/portage/make.conf` which acts as the main configuration file for portage. A Gentoo installation is highly personal so diverting from these settings is encouraged. Here's an example file: -``` shell title="/etc/portage/make.conf" +``` title="/etc/portage/make.conf" # Please consult /usr/share/portage/config/make.conf.example for a more # detailed example. COMMON_FLAGS="-march=native -O2 -pipe"