X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FGRUB_EFI%2F10-setup;h=f586ba1ebd0a915723fd905db96334d103d9ca04;hb=948ef49d2b4d7680da2355acf9da86f81ca75ecd;hp=2e39e2f42b14659b29fbc6d528e9b678d2891953;hpb=056eb4e90e13b2d8f7cbb8c3b875f35bf0fa207e;p=automated-distro-installer diff --git a/fai/config/scripts/GRUB_EFI/10-setup b/fai/config/scripts/GRUB_EFI/10-setup index 2e39e2f..f586ba1 100755 --- a/fai/config/scripts/GRUB_EFI/10-setup +++ b/fai/config/scripts/GRUB_EFI/10-setup @@ -33,9 +33,13 @@ if [ $FAI_ACTION != "install" ]; then exit $error fi -$ROOTCMD grub-mkdevicemap --no-floppy GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE) +# handle /boot in lvm-on-md +_bdev=$(readlink -f $BOOT_DEVICE) +if [ "${_bdev%%-*}" = "/dev/dm" ]; then + BOOT_DEVICE=$( lvs --noheadings -o devices $BOOT_DEVICE | sed -e 's/^*\([^(]*\)(.*$/\1/' ) +fi # Check if RAID is used for the boot device if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then @@ -46,15 +50,12 @@ if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then $ROOTCMD grub-install --no-floppy --force-extra-removable "/dev/$device" done -elif [[ $GROOT =~ 'hostdisk' ]]; then - cat > $target/boot/grub/device.map <