X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FGRUB_PC%2F10-setup;h=7a0476081db7598e988f5823a4d6a90ffd3bc048;hp=c945daf93ba16899476ea4c7335028e6b7648c99;hb=056eb4e90e13b2d8f7cbb8c3b875f35bf0fa207e;hpb=a6f3eaed0a1eebb5c58853fb9faa8bfbec404de3 diff --git a/fai/config/scripts/GRUB_PC/10-setup b/fai/config/scripts/GRUB_PC/10-setup index c945daf..7a04760 100755 --- a/fai/config/scripts/GRUB_PC/10-setup +++ b/fai/config/scripts/GRUB_PC/10-setup @@ -4,6 +4,11 @@ error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code set -a + +# do not set up grub during dirinstall +if [ "$FAI_ACTION" = "dirinstall" ] ; then + exit 0 +fi # during softupdate use this file [ -r $LOGDIR/disk_var.sh ] && . $LOGDIR/disk_var.sh @@ -23,6 +28,7 @@ fi $ROOTCMD grub-mkdevicemap --no-floppy GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE) + # Check if RAID is used for the boot device if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then raiddev=${BOOT_DEVICE#/dev/} @@ -31,6 +37,17 @@ if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then echo Install grub on /dev/$device $ROOTCMD grub-install --no-floppy "/dev/$device" done + +elif [[ $GROOT =~ 'hostdisk' ]]; then + cat > $target/boot/grub/device.map <