From 55a944f078a305657033109bf93b2a691c3cf4f2 Mon Sep 17 00:00:00 2001 From: natemaia Date: Sat, 4 Sep 2021 14:11:13 -0700 Subject: [PATCH] Add config option for grub to enable os-prober --- installer | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/installer b/installer index 6e98bcb..26f259c 100755 --- a/installer +++ b/installer @@ -2345,10 +2345,16 @@ prerun_grub() if [[ $SYS == 'BIOS' && $LVM && -z $SEP_BOOT ]]; then sed -i "s/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g" "$MNT/etc/default/grub" fi + # setup for os-prober module mkdir -p /run/{lvm,udev} "$MNT/hostrun/"{lvm,udev} mount --bind /run/lvm "$MNT/hostrun/lvm" mount --bind /run/udev "$MNT/hostrun/udev" + if grep -q "GRUB_DISABLE_OS_PROBER" "$MNT/etc/default/grub"; then + sed -i "s/.*GRUB_DISABLE_OS_PROBER=.*/GRUB_DISABLE_OS_PROBER=false/g" "$MNT/etc/default/grub" + else + echo "GRUB_DISABLE_OS_PROBER=false" >> "$MNT/etc/default/grub" + fi return 0 }