Comment 2 for bug 776633

Revision history for this message
Roland Dreier (roland.dreier) wrote :

Looks like the bug is in this snippet of grub-installer:

# This code to set disc_offered was taken from lilo-installer
rootfs_nodevfs=$(mapdevfs $rootfs)
bootfs_nodevfs=$(mapdevfs $bootfs)
prefix=$(device_to_disk "$bootfs")

case $prefix in
    /dev/md)
        disc_offered_devfs="$bootfs"
        ;;
    /dev/mapper)
        disc_offered_devfs="$bootfs"
        ;;
    /dev/loop)
        disc_offered_devfs="$bootfs"
        ;;
    /dev/[hsv]d[a-z]|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]*|/dev/ida/c[0-9]d[0-9]*|/dev/rs/c[0-9]d[0-9]*|/dev/mmcblk[0-9]|/dev/ad[0-9]*|/dev/da[0-9]*)
        disc_offered_devfs="$prefix"
        ;;
    *)
        disc_offered_devfs=$(echo "$bootfs_nodevfs" | sed "s:\(.*\)/.*:\1/disc:")
        ;;
esac

Since my root filesystem is on /dev/vdaa1, $prefix ends up as /dev/vdaa which doesn't match the second-to-last pattern (the intention is to catch it with /dev/[hsv]d[a-z] but that only matches /dev/vda through /dev/vdz. Tweaking that pattern is a little scary since it seems pretty magical...