Use Grub-Config Inside Mountdir

This commit is contained in:
seiichiro 2021-09-17 16:38:45 +02:00
parent 440d7859f2
commit 74980b0504

View file

@ -185,7 +185,7 @@ if [ $encryption -eq 1 ]; then
sed -i 's/HOOKS=.*/HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)/g' /mnt/etc/mkinitcpio.conf sed -i 's/HOOKS=.*/HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)/g' /mnt/etc/mkinitcpio.conf
UUID=$(blkid ${part_root} | cut -f2 -d'"') UUID=$(blkid ${part_root} | cut -f2 -d'"')
sed -i 's/#GRUB_ENABLE_CRYPTODISK=y/GRUB_ENABLE_CRYPTODISK=y/g' /etc/default/grub sed -i 's/#GRUB_ENABLE_CRYPTODISK=y/GRUB_ENABLE_CRYPTODISK=y/g' /mnt/etc/default/grub
sed -i "s#GRUB_CMDLINE_LINUX_DEFAULT=.*#GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet cryptdevice=UUID=$UUID:cryptroot:allow-discards root=${root_dev}\"#g" /mnt/etc/default/grub sed -i "s#GRUB_CMDLINE_LINUX_DEFAULT=.*#GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet cryptdevice=UUID=$UUID:cryptroot:allow-discards root=${root_dev}\"#g" /mnt/etc/default/grub
else else
sed -i 's/HOOKS=.*/HOOKS=(base udev autodetect keyboard keymap modconf block filesystems fsck)/g' /mnt/etc/mkinitcpio.conf sed -i 's/HOOKS=.*/HOOKS=(base udev autodetect keyboard keymap modconf block filesystems fsck)/g' /mnt/etc/mkinitcpio.conf