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_PC
/
10-setup
diff --git
a/fai/config/scripts/GRUB_PC/10-setup
b/fai/config/scripts/GRUB_PC/10-setup
index 47b3ba49195db9c0978482e5e6350f5e71368ffb..a78df0cb408dfa5b8b6b18773bfa7fbc80c7bb4e 100755
(executable)
--- a/
fai/config/scripts/GRUB_PC/10-setup
+++ b/
fai/config/scripts/GRUB_PC/10-setup
@@
-3,6
+3,7
@@
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
+set -x
set -a
# do not set up grub during dirinstall
set -a
# do not set up grub during dirinstall
@@
-27,6
+28,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
@@
-37,13
+43,6
@@
if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then
echo Install grub on /dev/$device
$ROOTCMD grub-install --no-floppy "/dev/$device"
done
echo Install grub on /dev/$device
$ROOTCMD grub-install --no-floppy "/dev/$device"
done
-
-elif [[ $GROOT =~ 'hostdisk' ]]; then
- $ROOTCMD grub-install --no-floppy --modules=part_msdos $BOOT_DEVICE
- if [ $? -eq 0 ]; then
- echo "Grub installed on hostdisk $BOOT_DEVICE"
- fi
-
else
for dev in $BOOT_DEVICE; do
GROOT=$($ROOTCMD grub-probe -tdrive -d $dev)
else
for dev in $BOOT_DEVICE; do
GROOT=$($ROOTCMD grub-probe -tdrive -d $dev)