Afterchroot bios update

This commit is contained in:
git
2024-06-28 11:38:27 +02:00
parent 33894187fd
commit d95c04f68c

View File

@@ -24,7 +24,13 @@ dd if=/dev/random of=/crypto_keyfile.bin bs=512 count=8 iflag=fullblock && \
chmod 000 /crypto_keyfile.bin && \
sed -i "s/FILES=(/FILES=(\/crypto_keyfile.bin/g" /etc/mkinitcpio.conf && \
pacman -S lvm2 lvm2-openrc cryptsetup cryptsetup-openrc && \
cryptsetup luksAddKey $DISK\2 /crypto_keyfile.bin && \
cryptsetup luksAddKey $DISK\2 /crypto_keyfile.bin
if [ $BIOSorEFI == "EFI" ]; then
cryptsetup luksAddKey $DISK\2 /crypto_keyfile.bin
else
cryptsetup luksAddKey $DISK\1 /crypto_keyfile.bin
fi
mkinitcpio -p linux-hardened && \
#passset
@@ -34,7 +40,11 @@ passwd && \
pacman -Sy && \
pacman -S dosfstools freetype2 fuse2 gptfdisk libisoburn mtools os-prober grub efibootmgr && \
sed -i "s/quiet/quiet resume=UUID=`blkid -s UUID -o value /dev/lvmSystem/volSwap`/g" /etc/default/grub && \
sed -i "s/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"cryptdevice=UUID=`blkid -s UUID -o value $DISK\2`:lvm-system\"/g" /etc/default/grub && \
if [ $BIOSorEFI == "EFI" ]; then
sed -i "s/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"cryptdevice=UUID=`blkid -s UUID -o value $DISK\2`:lvm-system\"/g" /etc/default/grub
else
sed -i "s/GRUB_CMDLINE_LINUX=\"\"/GRUB_CMDLINE_LINUX=\"cryptdevice=UUID=`blkid -s UUID -o value $DISK\1`:lvm-system\"/g" /etc/default/grub
fi
sed -i "s/#GRUB_ENABLE_CRYPTODISK/GRUB_ENABLE_CRYPTODISK/g" /etc/default/grub
if [ $BIOSorEFI == "EFI" ]; then
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=artix --recheck $DISK