grub-install fails on software RAID

Michael Senizaiz trellph at gmail.com
Wed Oct 30 13:42:46 CET 2013


I use a script to bypass partitioning since we have servers with 1-6 disks.
 Anything with more than 1 disk gets raided, so I have to pass the
following to /tmp/fai/disk_var.sh which is read in by the grub setup.  Make
sure you are using 1.2 metadata for your array. You don't have to bypass
partitioning, but a partition hook like below can populate the proper dev
path for MD (/dev/md/NUM) so grub doesn't look for the link that doesn't
exist (/dev/md0 -> /dev/md/0)

#tail partition.NODECLASS:

if [ "$PTYPE" == "fd" ]; then
echo "BOOT_DEVICE=/dev/md/0" > /tmp/fai/disk_var.sh
else
echo "BOOT_DEVICE=/dev/${diskarray[0]}1" > /tmp/fai/disk_var.sh
fi








On Wed, Oct 30, 2013 at 7:25 AM, ol at v-brinkmann.de <ol at v-brinkmann.de>wrote:

> **
>  Thomas Lange <lange at informatik.uni-koeln.de> hat am 29. Oktober 2013 um
> 22:07 geschrieben:
>
>  > > < GROOT=$(echo $GROOT | sed 's:md/:md:g')
> >
> > I've just read the git log. This minor patch is not needed any more in
> > wheezy. That's why these lines were removed on Sep 8th. I guess you
> > still have them in your script.
>
>  Yes, they are still there. But I don't think they do any harm, as the
> result of the call
>
>      $ROOTCMD grub-probe -tdrive -d $BOOT_DEVICE
>
>  is "(md0)". It's
>
>      $ROOTCMD grub-install --no-floppy "(md0)"
>
>  that leads to
>
>      /usr/sbin/grub-probe: Fehler: no such disk.
>      Auto-detection of a filesystem of /dev/md0 failed.
>
>  The same error occurs if I replace "(md0)" with "(hd0)" or "(hd1)", the
> only entries in /target/boot/grub/device.map.
>
>  > If you use dracut instead of initramfs-tools you have to add rd.auto
>  > to the kernel command line, otherwise no RAID devices will be
>  > activated by dracut.
>
>  I did so, but that didn't improve the situation.
>
>  Olav
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20131030/229c2c7b/attachment.html>


More information about the linux-fai mailing list