:100755 100755 38df857e 00000000 M scripts/GRUB_PC/10-setup diff --git a/scripts/GRUB_PC/10-setup b/scripts/GRUB_PC/10-setup index 38df857e..270b356b 100755 --- a/scripts/GRUB_PC/10-setup +++ b/scripts/GRUB_PC/10-setup @@ -59,6 +59,10 @@ if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then # 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; s/(nvme.+?)p/$1/g; print }' /proc/mdstat); do pdevice=$(get_stable_devname /dev/$device) + if [ -z "$pdevice" ]; then + # if we cannot find a persistent name (for e.g. in a VM) use old name + pdevice="/dev/$device" + fi mbrdevices+="$pdevice, " echo Installing grub on /dev/$device = $pdevice $ROOTCMD grub-install --no-floppy "/dev/$device"