summaryrefslogtreecommitdiff
path: root/cs/Gentoo/Installation.md
diff options
context:
space:
mode:
Diffstat (limited to 'cs/Gentoo/Installation.md')
-rw-r--r--cs/Gentoo/Installation.md116
1 files changed, 116 insertions, 0 deletions
diff --git a/cs/Gentoo/Installation.md b/cs/Gentoo/Installation.md
new file mode 100644
index 0000000..d390269
--- /dev/null
+++ b/cs/Gentoo/Installation.md
@@ -0,0 +1,116 @@
+
+ifconfig
+passwd
+/etc/init.d/ssh start
+
+# Partitioning
+lsblk -f
+fdsik /dev/sda
+sda1 = /boot # 512 MB EFI part
+sda2 = swap # same size as ram or sike no need for one ?
+sda3 = home /cryptroot
+
+# Formating & encrypting root partition
+
+mkfs.fat -F 32 /dev/sda1
+
+mkswap /dev/sda2
+swapon /dev/sda2
+
+cryptsetup luksFormat /dev/sda3
+cryptsetup luksOpen /dev/nvme0n1p2 cryptroot
+mkfs.ext4 /dev/mapper/cryptroot
+
+# check first if /mnt/gentoo exist if not create it
+mount /dev/mapper/cryptroot /mnt/gentoo
+mkdir /mnt/gentoo/boot/
+mount /dev/sda1 /mnt/gentoo/boot/
+
+# Installing Gentoo base system
+cd /mnt/gentoo
+wget URL://stage3 # https://www.gentoo.org/downloads/
+tar xpvf stage3-8.tar.xz --xattrs-include='8.8' --numeric-owner
+
+vim or nano /mnt/gentoo/etc/portage/[make.conf](make.conf)
+
+mkdir --parents /mnt/gentoo/etc/portage/repos.conf
+# using git to sync repos instead of rsync - /var/db/repos/gentoo
+vim /mnt/gentoo/etc/portage/repos.conf/[gentoo.conf](gentoo.conf)
+
+# Chroot
+cp --dereference /etc/resolv.conf /mnt/gentoo/etc/
+
+arch-chroot /mnt/gentoo -- do it manually instead this for artix///
+mount --types proc /proc /mnt/gentoo/proc
+mount --rbind /sys /mnt/gentoo/sys
+mount --rbind /dev /mnt/gentoo/dev
+mount --bind /run /mnt/gentoo/run
+
+
+chroot /mnt/gentoo /bin/bash
+source /etc/profile
+
+# Portage
+
+emerge-webrsync # git first ? only sync no need to
+emerge --sync
+# fuck up if git used before emerging it so default should be rsync ?
+# want git & vim in default
+# need to del /var/db/repos/gentoo/* done by resync and then sync with git ///
+#
+emerge --oneshot sys-apps/portage
+
+# rust-bin
+echo 'dev-lang/rust' >> /etc/portage/package.mask
+emerge --ask --oneshot virtual/rust dev-lang/rust-bin
+
+eselect rust x
+
+# World basics
+
+eselect profile list
+eselect profile set x
+
+emerge -avuND @world
+
+ls /usr/share/zoneinfo
+echo "US/Eastern" > /etc/timezone
+emerge --config sys-libs/timezone-data
+
+vim /etc/[locale.gen](locale.gen)
+locale-gen
+eselect locale list
+eselect locale set x
+
+env-update && source /etc/profile
+
+emerge sys-fs/cryptsetup sys-fs/e2fsprogs sys-fs/dosfstools sys-apps/pciutils sys-kernel/linux-firmware sys-boot/efibootmgr app-portage/gentoolkit dev-vcs/git sys-apps/busybox app-portage/eix
+
+eix-update
+
+# HERE setup kernel
+
+
+blkid
+vim /etc/[fstab](fstab)
+
+
+## Configure the Bootloader
+
+mkdir -p /boot/efi/
+cp /boot/vmlinuz-* /boot/efi/bootx64.efi
+# delete previous efi entry
+efibootmgr -c -d /dev/sda -p 1 -L "Gentoo" -l '*****\EFI\gentoo\bzImage.efi' -u 'root=UUID=xxx'
+
+efibootmgr -c -d /dev/nvme0n1 -p 1 -L "Gentoo" -l '/boot/efi/bootx64.efi' -u "root=/dev/mapper/cryptroot rw rootfstype=ext4 add_efi_memmap"
+
+(nope) maybe && initrd=\EFI\gentoo\initrd.cpio.gz'
+
+exit
+
+umount -l /mnt/gentoo/dev{/shm,/pts,}
+umount -R /mnt/gentoo
+
+reboot
+
+rm /stage3-*.tar.*