Update setup/arch-auto-install-new-cgpt.sh
parent
a63dbee893
commit
46d9771fc4
|
|
@ -121,13 +121,16 @@ useradd -m -G wheel -s /bin/zsh "$USERNAME"
|
|||
echo "$USERNAME:$USERPASS" | chpasswd
|
||||
echo "%wheel ALL=(ALL) ALL" >> /etc/sudoers
|
||||
|
||||
# Initramfs hooks for LUKS + FIDO2
|
||||
sed -i 's/^HOOKS=.*/HOOKS=(base udev autodetect modconf block encrypt filesystems keyboard fsck)/' /etc/mkinitcpio.conf
|
||||
mkinitcpio -P
|
||||
if [[ "$FIDO_ROOT" == "yes" ]]; then
|
||||
|
||||
# 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
|
||||
# Initramfs hooks for LUKS + FIDO2
|
||||
sed -i 's/^HOOKS=.*/HOOKS=(base udev autodetect modconf block encrypt filesystems keyboard fsck)/' /etc/mkinitcpio.conf
|
||||
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue