3

On my VPS (running Debian 6.0 on Xen with PyGrub) I get the following error when trying to upgrade the system:

Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda1.
grub-probe: error: cannot find a GRUB drive for /dev/xvda1.  Check your device.map.

I googled and found this solution:

echo '(hd0) /dev/xvda' > /boot/grub/device.map
mknod /dev/xvda b 202 0

Apparently that only works on older systems and not on my server.

Any ideas?

1

Had the same problem, and that solution also did not work me.

Here's what worked at last:

echo '(hd0) /dev/xvdb' > /boot/grub/device.map
mknod /dev/xvdb b 202 0

(It didn't work with xvda for me.) Then edit /usr/sbin/grub-update and find

find_device ()
{
        if ! test -e ${device_map} ; then
                echo quit | grub --batch --no-floppy --device-map=${device_map} > /dev/null
        fi
        grub-probe --device-map=${device_map} -t device $1 2> /dev/null
}

and replace with

find_device ()
{
        if ! test -e ${device_map} ; then
                echo quit | grub --batch --no-floppy --device-map=${device_map} > /dev/null
        fi
        # grub-probe --device-map=${device_map} -t device $1 2> /dev/null
        echo /dev/xvdb
}

Run

apt-get upgrade

Edit /boot/grub/menu.lst with

sed -i "s/xvdb/xvda1/g" /boot/grub/menu.lst

Reboot.

Make a note of the changes made :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.