diff options
Diffstat (limited to 'share/hydractl')
-rwxr-xr-x | share/hydractl/provision | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision index a088d7e..39f91ac 100755 --- a/share/hydractl/provision +++ b/share/hydractl/provision @@ -642,6 +642,9 @@ fi if [ "$grub" == "y" ]; then echo "Setting up GRUB..." + # Ensure this folder exists + hydra_sudo_run mkdir $WORK/boot/grub + if [ "$boot_mode" == "bios" ]; then $APT_INSTALL grub-pc -y else @@ -666,15 +669,30 @@ if [ "$grub" == "y" ]; then hydra_sudo_run mount $esp_device $WORK/boot/efi fi - hydra_sudo_run sed -i -e 's/^GRUB_CMDLINE_LINUX_DEFAULT="quiet"$/GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor"/' \ - $WORK/etc/default/grub + # Old /etc/default format + #hydra_sudo_run sed -i -e \ + # 's/^GRUB_CMDLINE_LINUX_DEFAULT="quiet"$/GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor"/' \ + # $WORK/etc/default/grub + + cat <<-EOF | $SUDO tee $WORK/etc/default/grub.d/cmdline.cfg > /dev/null +GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor" +EOF + hydra_sudo_run chroot $WORK/ update-grub if [ "$encrypt" == "y" ]; then - echo '' | $SUDO tee -a $WORK/etc/default/grub > /dev/null - echo '# Full Disk Encryption Support' | $SUDO tee -a $WORK/etc/default/grub > /dev/null - echo 'GRUB_ENABLE_CRYPTODISK=y' | $SUDO tee -a $WORK/etc/default/grub > /dev/null - echo 'GRUB_PRELOAD_MODULES="lvm cryptodisk mdraid1x"' | $SUDO tee -a $WORK/etc/default/grub > /dev/null + # Old /etc/default format + #echo '' | $SUDO tee -a $WORK/etc/default/grub > /dev/null + #echo '# Full Disk Encryption Support' | $SUDO tee -a $WORK/etc/default/grub > /dev/null + #echo 'GRUB_ENABLE_CRYPTODISK=y' | $SUDO tee -a $WORK/etc/default/grub > /dev/null + #echo 'GRUB_PRELOAD_MODULES="lvm cryptodisk mdraid1x"' | $SUDO tee -a $WORK/etc/default/grub > /dev/null + + cat <<-EOF | $SUDO tee $WORK/etc/default/grub.d/fde.cfg > /dev/null +# Full Disk Encryption Support' +GRUB_ENABLE_CRYPTODISK=y' +GRUB_PRELOAD_MODULES="lvm cryptodisk mdraid1x" +EOF + hydra_sudo_run chroot $WORK/ update-grub # Fix menu entry |