Hi Thomas, > Here's the patch: >
[...] > > $ROOTCMD grub-mkdevicemap -n -m /boot/grub/device.map > $ROOTCMD grub-mkconfig -o /boot/grub/grub.cfg > -$ROOTCMD grub-install --no-floppy "(hd0)" > +GROOT=$($ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE) > +$ROOTCMD grub-install --no-floppy "$GROOT" > +echo "Grub installed on $BOOT_DEVICE = $GROOT" > I still think the version in experimental has a feature which this version keeps lacking: it does not take care of installing grub on all devices participating in a RAID-1. I tried to merge your improvements and came up with the following: =============================================================================== #! /bin/bash # support for GRUB version 2 (1.98-1) error=0 ; trap "error=$((error|1))" ERR set -a # during softupdate use this file [ -r $LOGDIR/disk_var.sh ] && . $LOGDIR/disk_var.sh [ -z "$BOOT_DEVICE" ] && exit 701 $ROOTCMD grub-mkdevicemap --no-floppy for device in $BOOT_DEVICE; do GROOT=$($ROOTCMD grub-probe -tdrive -d $device) $ROOTCMD grub-install --no-floppy --modules="lvm raid" "$GROOT" echo "Grub installed on $device = $GROOT" done $ROOTCMD update-grub exit $error =============================================================================== I've quoted your patch to comment on the differences: - I'm not sure whether sourcing disk_var.sh is still necessary, it used to be the case, but apparently your version worked just fine!? - grub-mkdevicemap uses /boot/grub/device.map by default, so the -m is not necessary; --no-floppy feels easier to understand than -n - I have no idea whether grub-mkconfig is actually necessary; most probably update-grub takes care of this!? - $BOOT_DEVICE may consist of several device names if RAID is used. Hence we need to loop over each of them and do what you just proposed. Best regards, Michael
pgpMWl5BUvUy6.pgp
Description: PGP signature