From dcfaf657646f08d46ad5d86372ea2808effdc71e Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Mon, 14 Jun 2021 20:07:07 +0200 Subject: [PATCH] Fix Debian in main procedure --- install-zfs.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install-zfs.sh b/install-zfs.sh index 8d74bcd..baef97c 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -1431,6 +1431,15 @@ function configure_and_update_grub { chroot_execute "update-grub" } +function configure_and_update_grub_Debian { + zfs_root_fs=$(chroot_execute 'zfs list / | awk "NR==2 {print \$1}"') + zfs_boot_fs=$(chroot_execute 'zfs list /boot | awk "NR==2 {print \$1}"') + + chroot_execute "perl -i -pe 's|GRUB_CMDLINE_LINUX=\"\K|root=ZFS=$zfs_root_fs bootfs=$zfs_boot_fs |' /etc/default/grub" + + configure_and_update_grub +} + function sync_efi_partitions { for ((i = 1; i < ${#v_selected_disks[@]}; i++)); do local synced_efi_partition_path="/boot/efi$((i + 1))"