kevinjohnson7890

Untitled

Mar 9th, 2022
865
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.99 KB | None | 0 0
  1. --2022 Gentoo UEFI OpenRC Hardened NoMultilib Installation Guide------------------------------
  2. cfdisk /dev/sda
  3. sda1 256mb efi system
  4. sda2 2gb swap
  5. sda3 rest linux filesystem
  6. ------------------------------
  7. mkfs.vfat -F 32 /dev/sda1
  8. mkswap /dev/sda2
  9. swapon /dev/sda2
  10. mkfs.ext4 /dev/sda3
  11. mount /dev/sda3 /mnt/gentoo
  12. mkdir /mnt/gentoo/boot
  13. mount /dev/sda1 /mnt/gentoo/boot
  14. ---------------------------------------------
  15. date
  16. ntpd -q -g
  17. cd /mnt/gentoo
  18. links www.gentoo.org/downloads
  19. download stage3
  20. tar xpvf stage3*.tar.xz --xattrs-include='*.*' --numeric-owner
  21. nano -w /mnt/gentoo/etc/portage/make.conf
  22. COMMON_FLAGS="-02 -march=native"
  23. MAKEOPTS="-j2"
  24. --exit
  25. mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
  26. mkdir --parents /mnt/gentoo/etc/portage/repos.conf
  27. cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf
  28. cp --dereference /etc/resolv.conf /mnt/gentoo/etc
  29. ----------------------------------------------------
  30. mount --types proc /proc /mnt/gentoo/proc
  31. mount --rbind /sys /mnt/gentoo/sys
  32. mount --make-rslave /mnt/gentoo/sys
  33. mount --rbind /dev /mnt/gentoo/dev
  34. mount --make-rslave /mnt/gentoo/dev
  35. mount --bind /run /mnt/gentoo/run
  36. mount --make-rslave /mnt/gentoo/run
  37. ------------------------------------------------
  38. chroot /mnt/gentoo /bin/bash
  39. source /etc/profile
  40. export PS1="(chroot) ${PS1}"
  41. --------------------------------------------
  42. emerge-webrsync
  43. emerge --sync
  44. eselect news list
  45. eselect news read
  46. eselect news purge
  47. eselect profile list
  48. eselect profile set n
  49. ----------------------------------------------------
  50. emerge --ask --verbose --update --deep --newuse @world
  51. nano -w /etc/portage/make.conf
  52. ACCEPT_LICENSE="*"
  53. --exit
  54. ls /usr/share/zoneinfo/
  55. echo "Europe/Rome" > /etc/timezone
  56. emerge --config sys-libs/timezone-data
  57. -------------------------------------------
  58. nano -w /etc/locale.gen
  59. en_US ISO-8859-1
  60. en_US.UTF-8 UTF-8
  61. --exit
  62. locale-gen
  63. eselect locale list
  64. eselect locale set n
  65. env-update && source /etc/profile && export PS1="(chroot)${PS1}"
  66. -------------------------------------------------
  67. emerge --ask sys-kernel/linux-firmware
  68. emerge --ask sys-kernel/gentoo-sources
  69. eselect kernel list
  70. eselect kernel set n
  71. emerge --ask sys-kernel/genkernel
  72. nano -w /etc/fstab
  73. /dev/sda1 /boot vfat defaults 0 2
  74. --exit
  75. genkernel all
  76. ls /boot/vmlinu* /boot/initramfs*
  77. -------------------------------------------
  78. nano -w /etc/fstab
  79. /dev/sda1 /boot vfat defaults,noatime 0 2
  80. /dev/sda2 none swap sw 0 0
  81. /dev/sda3 / ext4 defaults,noatime 0 2
  82.  
  83. /dev/cdrom /mnt/cdrom auto noauto,user 0 0
  84. -----------------------------------------
  85. nano -w /etc/conf.d/hostname
  86. hostname="tux"
  87. --exit
  88. nano -w /etc/conf.d/net
  89. dns_domain_lo="homenetwork"
  90. --exit
  91. emerge --ask net-misc/dhcpcd
  92. rc-update add dhcpcd default
  93. rc-service dhcpcd start
  94. emerge --ask --noreplace net-misc/netifrc
  95. nano -w /etc/conf.d/net
  96. config_enp0s3="dhcp"
  97. --exit
  98. cd /etc/init.d
  99. ln -s net.lo net.enp0s3
  100. rc-update add net.enp0s3 default
  101. nano -w /etc/hosts
  102. 127.0.0.1 tux.homenetwork tux.localhost
  103. --exit
  104. passwd (setup root password)
  105. -----------------------------------------------------
  106. emerge --ask app-admin/sysklogd
  107. rc-update add sysklogd default
  108. emerge --ask sys-process/cronie
  109. rc-update add cronie default
  110. emerge --ask sys-apps/mlocate
  111. rc-update add sshd default
  112. --------------------------------------------------------
  113. echo 'GRUB_PLATFORMS="efi-64"' >> /etc/portage/make.conf
  114. emerge --ask --verbose sys-boot/grub
  115. mount -o remount,rw /sys/firmware/efi/efivars
  116. grub-install --target=x86_64-efi
  117. --efi-directory=/boot/
  118. --bootloader-id="Gentoo Linux [GRUB]"
  119. --recheck /dev/sda
  120. grub-mkconfig -o /boot/grub/grub.cfg
  121. ------------------------------------------------
  122. blkid (to discover your UUID)
  123. nano -w /etc/fstab
  124. replace the partition names with the UUID
  125. -----------------------------------
  126. exit
  127. cd
  128. umount -l /mnt/gentoo/dev/{/shm,/pts,}
  129. umount -R /mnt/gentoo
  130. reboot
  131. ----------------------------------------------------------
  132.  
Advertisement
Add Comment
Please, Sign In to add comment