iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various fixes mostly for linode
[automated-distro-installer]
/
fai
/
config
/
scripts
/
GRUB_EFI
/
10-setup
diff --git
a/fai/config/scripts/GRUB_EFI/10-setup
b/fai/config/scripts/GRUB_EFI/10-setup
index 3e610ad5af0456afe41231f1407c825a968a449b..f586ba1ebd0a915723fd905db96334d103d9ca04 100755
(executable)
--- a/
fai/config/scripts/GRUB_EFI/10-setup
+++ b/
fai/config/scripts/GRUB_EFI/10-setup
@@
-35,6
+35,11
@@
fi
GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE)
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
# Check if RAID is used for the boot device
if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then
@@
-45,7
+50,8
@@
if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then
$ROOTCMD grub-install --no-floppy --force-extra-removable "/dev/$device"
done
$ROOTCMD grub-install --no-floppy --force-extra-removable "/dev/$device"
done
-elif [[ $GROOT =~ 'hostdisk' ]]; then
+elif [[ $BOOT_DEVICE =~ '/dev/loop' ]]; then
+ # do not update vmram when using a loop device
$ROOTCMD grub-install --no-floppy --force-extra-removable --modules=part_gpt --no-nvram $BOOT_DEVICE
if [ $? -eq 0 ]; then
echo "Grub installed on hostdisk $BOOT_DEVICE"
$ROOTCMD grub-install --no-floppy --force-extra-removable --modules=part_gpt --no-nvram $BOOT_DEVICE
if [ $? -eq 0 ]; then
echo "Grub installed on hostdisk $BOOT_DEVICE"