X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FGRUB_PC%2F10-setup;h=47b3ba49195db9c0978482e5e6350f5e71368ffb;hb=e6c8a36522847eca91819ab3eb656dd824bc3e3c;hp=7a0476081db7598e988f5823a4d6a90ffd3bc048;hpb=056eb4e90e13b2d8f7cbb8c3b875f35bf0fa207e;p=automated-distro-installer diff --git a/fai/config/scripts/GRUB_PC/10-setup b/fai/config/scripts/GRUB_PC/10-setup index 7a04760..47b3ba4 100755 --- a/fai/config/scripts/GRUB_PC/10-setup +++ b/fai/config/scripts/GRUB_PC/10-setup @@ -25,12 +25,12 @@ if [ $FAI_ACTION != "install" ]; then exit $error 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 + GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE) raiddev=${BOOT_DEVICE#/dev/} # install grub on all members of RAID for device in `LC_ALL=C perl -ne 'if(/^'$raiddev'\s.+raid\d+\s(.+)/){ $_=$1; s/\d+\[\d+\]//g; print }' /proc/mdstat`; do @@ -39,20 +39,19 @@ if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then done elif [[ $GROOT =~ 'hostdisk' ]]; then - cat > $target/boot/grub/device.map <