Update setup/arch-auto-install-new-cgpt.sh

main
The_miro 2025-11-28 12:54:00 +01:00
parent a63dbee893
commit 46d9771fc4
1 changed files with 9 additions and 6 deletions

View File

@ -121,6 +121,8 @@ useradd -m -G wheel -s /bin/zsh "$USERNAME"
echo "$USERNAME:$USERPASS" | chpasswd
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
if [[ "$FIDO_ROOT" == "yes" ]]; then
# Initramfs hooks for LUKS + FIDO2
sed -i 's/^HOOKS=.*/HOOKS=(base udev autodetect modconf block encrypt filesystems keyboard fsck)/' /etc/mkinitcpio.conf
mkinitcpio -P
@ -128,6 +130,7 @@ mkinitcpio -P
# GRUB config for encrypted root
UUID=\$(blkid -s UUID -o value $ROOT_PART)
sed -i "s|GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX=\"cryptdevice=UUID=\$UUID:cryptroot root=/dev/mapper/cryptroot\"|" /etc/default/grub
fi
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg