Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cfdisk, 512M Efi System, 2G Extended Boot, Rest of the space into Linux Filesystem
- cryptsetup luksFormat on the root partition
- cryptsetup open on the root partition
- mkfs.vfat -F32 -n EFI on the EFI partition
- mkfs.btrfs -L BOOT on the BOOT partition
- mkfs.btrfs -L ROOTFS on /dev/mapper/root
- Make btrfs subvols, @ @home @var @snapshots...
- mount the root subvol with mount subvol=@,compress=zstd /dev/mapper/root /mnt/gentoo
- mkdir for each of your subvols on /mnt/gentoo, for example: mkdir /mnt/gentoo/home
- mount the other subvols with subvol=@NAMEOFSUBVOL,compress=zstd /dev/mapper/root /mnt/gentoo/NAMEOFFOLDER
- cd /mnt/gentoo
- download stage3 with links https://www.gentoo.org/downloads
- install stage3 with tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner -C /mnt/gentoo
- Copy DNS info over to /mnt/gentoo with cp --dereference /etc/resolv.conf /mnt/gentoo/etc/
- arch-chroot into /mnt/gentoo
- mount efi partition to /efi
- mount boot partition to /boot
- emerge-webrsync
- emerge --sync --quiet
- eselect profile list (If unsure go with a desktop profile.)
- eselect profile set [number] (Ensure it's the newest version of profile.)
- add FEATURES to make.conf, set binpkg-request-signature, and if you want install to go faster set getbinpkg which makes portage prefer binaries, REMOVE GETBINPKG AFTER INSTALL (unless you want all binaries)
- (optional because it can take a while) configure USE in make.conf
- configure cpuid2cpuflags, emerge -1 cpuid2cpuflags, echo "*/* ${cpuid2cpuflags}" > /etc/portage/package.use/00cpu-flags
- add VIDEO_CARDS to make.conf (if nvidia add "nvidia", if amd add "amdgpu radeonsi", if intel add "intel")
- add ACCEPT_LICENSE="-* @FREE @BINARY-REDISTRIBUTABLE" to make.conf
- add GRUB_PLATFORMS="efi-64" to make.conf
- run getuto to setup portage keyring
- emerge -av cryptsetup
- (optional, will take a while) emerge -avuDN @world
- (run if above was ran) emerge --ask --depclean
- Setup timezone with ln -sf ../usr/share/zoneinfo/America/New_York /etc/localtime
- nano /etc/locale.gen (uncomment locales to use)
- locale-gen
- eselect locale list
- eselect locale set [number]
- reload the environment with source /etc/profile
- create /etc/portage/package.use/installkernel with grub and dracut use flags (sys-kernel/installkernel grub dracut)
- mkdir /etc/dracut.conf.d
- add this to /etc/dracut.conf.d/luks.conf, add_dracutmodules+=" crypt " and then on a newline kernel_cmdline+=" rd.luks.uuid=LUKSUUID " (the spacing inside the quotes is critical, it's how dracut works and is not a typo)
- enable dist-kernel use flag in make.conf to regen kernel modules on kernel update
- emerge installkernel and linux-firmware
- make sure efi and boot partitions are mounted
- grub-install --efi-directory=/efi
- emerge gentoo-kernel-bin
- emerge -av1 genfstab
- genfstab -U / > /etc/fstab
- echo YOURHOSTNAME > /etc/hostname
- emerge dhcpcd
- rc-update add dhcpcd default
- run passwd to set root password
- nano /etc/conf.d/hwclock and change to local for correct time in windows dual boot
- time to emerge the system tools
- emerge sysklogd (system logger)
- (optional) emerge cronie (if you don't need cron then you should be fine, if unsure just emerge it)
- (if cronie installed) rc-update add cronie default
- (optional, faster file indexing) emerge mlocate
- (optional but highly recommended, if you use a shell other than bash than this isn't needed) emerge bash-completion (for bash autocomplete when pressing tab)
- emerge chrony (NTP for syncing system clock)
- rc-update add chronyd default
- (if UEFI) emerge dosfstools
- emerge btrfs-progs
- (if using NTFS drives) emerge ntfs3g
- emerge io-scheduler-udev-rules (for correct scheduler behavior with nvme devices)
- (if using Wi-Fi) emerge iw or wpa_supplicant
- exit
- cd
- umount -R /mnt/gentoo
- reboot
- // If you don't have networking on reboot then do this
- run "ip a" to grab your network device, ethernet starts with enp or eth
- cd /etc/init.d
- ln -s net.lo net.YOURNETWORKINTERFACE
- rc-update add net.YOURNETWORKINTERFACE default
- reboot
- // End
Advertisement
Add Comment
Please, Sign In to add comment