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
add xenial support with basic debian parity
[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 c945daf93ba16899476ea4c7335028e6b7648c99..88b557ea694876147a48fdfceef7ec3f4f743b40 100755
(executable)
--- a/
fai/config/scripts/GRUB_PC/10-setup
+++ b/
fai/config/scripts/GRUB_PC/10-setup
@@
-21,10
+21,10
@@
if [ $FAI_ACTION != "install" ]; then
fi
$ROOTCMD grub-mkdevicemap --no-floppy
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
# 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
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
@@
-32,10
+32,13
@@
if [[ $BOOT_DEVICE =~ '/dev/md' ]]; then
$ROOTCMD grub-install --no-floppy "/dev/$device"
done
else
$ROOTCMD grub-install --no-floppy "/dev/$device"
done
else
- $ROOTCMD grub-install --no-floppy "$GROOT"
- if [ $? -eq 0 ]; then
- echo "Grub installed on $BOOT_DEVICE = $GROOT"
- fi
+ for dev in $BOOT_DEVICE; do
+ GROOT=$($ROOTCMD grub-probe -tdrive -d $dev)
+ $ROOTCMD grub-install --no-floppy "$GROOT"
+ if [ $? -eq 0 ]; then
+ echo "Grub installed on $dev = $GROOT"
+ fi
+ done
fi
$ROOTCMD update-grub
fi
$ROOTCMD update-grub