Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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 :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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