From a3719ad0aa79b8a70fba8730157281f341e107ab Mon Sep 17 00:00:00 2001 From: Ralf Date: Thu, 15 Dec 2016 10:59:59 +0100 Subject: [PATCH] check for separate /boot partition Check for separate /boot partition and ommit /boot in grub config if it exists. --- setupgrubfornfsinstall | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setupgrubfornfsinstall b/setupgrubfornfsinstall index 494d79f..9853203 100755 --- a/setupgrubfornfsinstall +++ b/setupgrubfornfsinstall @@ -337,6 +337,7 @@ getbootloader() : ${bootloader:=`getbootloader`} bootloaderconf= imagedir=/boot +hasbootpartition=`grep boot /etc/fstab | wc -l` autofsbase=/mounts program="$0" serverlist="$program.serverlist" @@ -2159,6 +2160,10 @@ gen_grub2_entry() echo " initrd$efi $grubpartition$initrdlocal" >> $bootloaderconf echo "}" >> $bootloaderconf + + if [ $hasbootpartition -eq 1 ]; then + sed -i 's|/boot/|/|g' $bootloaderconf + fi return 0 }