Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --2022 Gentoo UEFI OpenRC Hardened NoMultilib Installation Guide------------------------------
- cfdisk /dev/sda
- sda1 256mb efi system
- sda2 2gb swap
- sda3 rest linux filesystem
- ------------------------------
- mkfs.vfat -F 32 /dev/sda1
- mkswap /dev/sda2
- swapon /dev/sda2
- mkfs.ext4 /dev/sda3
- mount /dev/sda3 /mnt/gentoo
- mkdir /mnt/gentoo/boot
- mount /dev/sda1 /mnt/gentoo/boot
- ---------------------------------------------
- date
- ntpd -q -g
- cd /mnt/gentoo
- links www.gentoo.org/downloads
- download stage3
- tar xpvf stage3*.tar.xz --xattrs-include='*.*' --numeric-owner
- nano -w /mnt/gentoo/etc/portage/make.conf
- COMMON_FLAGS="-02 -march=native"
- MAKEOPTS="-j2"
- --exit
- mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
- mkdir --parents /mnt/gentoo/etc/portage/repos.conf
- cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf
- cp --dereference /etc/resolv.conf /mnt/gentoo/etc
- ----------------------------------------------------
- mount --types proc /proc /mnt/gentoo/proc
- mount --rbind /sys /mnt/gentoo/sys
- mount --make-rslave /mnt/gentoo/sys
- mount --rbind /dev /mnt/gentoo/dev
- mount --make-rslave /mnt/gentoo/dev
- mount --bind /run /mnt/gentoo/run
- mount --make-rslave /mnt/gentoo/run
- ------------------------------------------------
- chroot /mnt/gentoo /bin/bash
- source /etc/profile
- export PS1="(chroot) ${PS1}"
- --------------------------------------------
- emerge-webrsync
- emerge --sync
- eselect news list
- eselect news read
- eselect news purge
- eselect profile list
- eselect profile set n
- ----------------------------------------------------
- emerge --ask --verbose --update --deep --newuse @world
- nano -w /etc/portage/make.conf
- ACCEPT_LICENSE="*"
- --exit
- ls /usr/share/zoneinfo/
- echo "Europe/Rome" > /etc/timezone
- emerge --config sys-libs/timezone-data
- -------------------------------------------
- nano -w /etc/locale.gen
- en_US ISO-8859-1
- en_US.UTF-8 UTF-8
- --exit
- locale-gen
- eselect locale list
- eselect locale set n
- env-update && source /etc/profile && export PS1="(chroot)${PS1}"
- -------------------------------------------------
- emerge --ask sys-kernel/linux-firmware
- emerge --ask sys-kernel/gentoo-sources
- eselect kernel list
- eselect kernel set n
- emerge --ask sys-kernel/genkernel
- nano -w /etc/fstab
- /dev/sda1 /boot vfat defaults 0 2
- --exit
- genkernel all
- ls /boot/vmlinu* /boot/initramfs*
- -------------------------------------------
- nano -w /etc/fstab
- /dev/sda1 /boot vfat defaults,noatime 0 2
- /dev/sda2 none swap sw 0 0
- /dev/sda3 / ext4 defaults,noatime 0 2
- /dev/cdrom /mnt/cdrom auto noauto,user 0 0
- -----------------------------------------
- nano -w /etc/conf.d/hostname
- hostname="tux"
- --exit
- nano -w /etc/conf.d/net
- dns_domain_lo="homenetwork"
- --exit
- emerge --ask net-misc/dhcpcd
- rc-update add dhcpcd default
- rc-service dhcpcd start
- emerge --ask --noreplace net-misc/netifrc
- nano -w /etc/conf.d/net
- config_enp0s3="dhcp"
- --exit
- cd /etc/init.d
- ln -s net.lo net.enp0s3
- rc-update add net.enp0s3 default
- nano -w /etc/hosts
- 127.0.0.1 tux.homenetwork tux.localhost
- --exit
- passwd (setup root password)
- -----------------------------------------------------
- emerge --ask app-admin/sysklogd
- rc-update add sysklogd default
- emerge --ask sys-process/cronie
- rc-update add cronie default
- emerge --ask sys-apps/mlocate
- rc-update add sshd default
- --------------------------------------------------------
- echo 'GRUB_PLATFORMS="efi-64"' >> /etc/portage/make.conf
- emerge --ask --verbose sys-boot/grub
- mount -o remount,rw /sys/firmware/efi/efivars
- grub-install --target=x86_64-efi
- --efi-directory=/boot/
- --bootloader-id="Gentoo Linux [GRUB]"
- --recheck /dev/sda
- grub-mkconfig -o /boot/grub/grub.cfg
- ------------------------------------------------
- blkid (to discover your UUID)
- nano -w /etc/fstab
- replace the partition names with the UUID
- -----------------------------------
- exit
- cd
- umount -l /mnt/gentoo/dev/{/shm,/pts,}
- umount -R /mnt/gentoo
- reboot
- ----------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment