fstab should work

This commit is contained in:
lurk 2024-09-21 21:01:10 -07:00
parent fcffa7ea16
commit 48035d26b4

View file

@ -119,6 +119,8 @@ emerge --ask n sys-kernel/gentoo-sources
# testing if cd works, if curl screws up this is probably the main issue # testing if cd works, if curl screws up this is probably the main issue
cd /usr/src/linux cd /usr/src/linux
curl -L https://gist.githubusercontent.com/emrakyz/0ff8674792bd844fcab6afb2063ffa94/raw/e91e60ae2f74ccee8fcd7b7b93db942ba60277ce/.config -o .config curl -L https://gist.githubusercontent.com/emrakyz/0ff8674792bd844fcab6afb2063ffa94/raw/e91e60ae2f74ccee8fcd7b7b93db942ba60277ce/.config -o .config
PARTUUID_ROOT=PARTUUID_ROOT=$(blkid -s PARTUUID -o value ${CFG_BLOCK_PART}3)
sed -i -e '/^CONFIG_CMDLINE="root=PARTUUID=.*/c\' -e "CONFIG_CMDLINE=\"root=PARTUUID=$PARTUUID_ROOT\"" /usr/src/linux/.config
MICROCODE_PATH=$(iucode_tool -S -l /lib/firmware/intel-ucode/* 2>&1 | grep 'microcode bundle' | awk -F': ' '{print $2}' | cut -d'/' -f4-) MICROCODE_PATH=$(iucode_tool -S -l /lib/firmware/intel-ucode/* 2>&1 | grep 'microcode bundle' | awk -F': ' '{print $2}' | cut -d'/' -f4-)
sed -i "s#CONFIG_EXTRA_FIRMWARE=.*#CONFIG_EXTRA_FIRMWARE=\"$MICROCODE_PATH\"#g" /usr/src/linux/.config sed -i "s#CONFIG_EXTRA_FIRMWARE=.*#CONFIG_EXTRA_FIRMWARE=\"$MICROCODE_PATH\"#g" /usr/src/linux/.config
THREAD_NUM=$(nproc) THREAD_NUM=$(nproc)
@ -144,9 +146,13 @@ cp /usr/src/linux/arch/x86/boot/bzImage /boot/EFI/BOOT/BOOTX64.EFI
log_msg INFO "set swap, / and cdrom in fstab" >> /var/log/installer.log log_msg INFO "set swap, / and cdrom in fstab" >> /var/log/installer.log
mkdir -p /mnt/cdrom mkdir -p /mnt/cdrom
UUID_BOOT=$(blkid -s UUID -o value ${CFG_BLOCK_PART}1)
UUID_ROOT=$(blkid -s UUID -o value ${CFG_BLOCK_PART}3)
UUID_HOME=$(blkid -s UUID -o value ${CFG_BLOCK_PART}4)
echo "UUID=$UUID_BOOT /boot vfat defaults,noatime 0 2
echo "${CFG_BLOCK_PART}"2 none swap sw 0 0 >> /etc/fstab echo "${CFG_BLOCK_PART}"2 none swap sw 0 0 >> /etc/fstab
echo "${CFG_BLOCK_PART}"3 / ext4 defaults,noatime 0 1 >> /etc/fstab echo "${CFG_BLOCK_PART}"3 / ext4 defaults,noatime 0 1 >> /etc/fstab
echo "${CFG_BLOCK_PART}"4 / ext4 defaults,noatime 0 1" >> /etc/fstab echo "${CFG_BLOCK_PART}"4 /home ext4 defaults,noatime 0 1" >> /etc/fstab
echo /dev/cdrom /mnt/cdrom auto noauto,user 0 0 >> /etc/fstab echo /dev/cdrom /mnt/cdrom auto noauto,user 0 0 >> /etc/fstab
# #