Upgrading to Debian 6 (squeeze) on VPS.net/any onApp platform

I ran into a few issues lately with Debian 6 on VPS.net, neosurge.com, and pretty much any onApp platform.

These are all Xen based deployments, and the issue lies in the fact that grub can’t find your disk. This causes all apt-get upgrades to fail when dealing with the kernel or anything that works with grub.

Here is the output of apt-get upgrade that is relevant to this issue:
Setting up linux-image-2.6.32-5-686-bigmem (2.6.32-31) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-686-bigmem
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-686-bigmem /boot/vmlinuz-2.6.32-5-686-bigmem
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-686-bigmem /boot/vmlinuz-2.6.32-5-686-bigmem
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.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-5-686-bigmem.postinst line 799, <STDIN> line 2.
dpkg: error processing linux-image-2.6.32-5-686-bigmem (--configure):
subprocess installed post-installation script returned error exit status 2
configured to not write apport reports
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Because Xen manages your kernel on a level that is not visible to the VPS or instance you’re working in, you can just easily remove grub:

apt-get remove grub-legacy grub-common

Simple as that. Now you will be able to manage your system as you normally would, and not worry about constant errors while using apt-get.

Be Sociable, Share!
  1. #1 by NanoG6 on November 21, 2011 - 9:19 pm

    wow thanks you saved my day! ;)
    I have exact problem with squeeze and XEN

  2. #2 by Wesley S on March 19, 2012 - 7:05 am

    Thanks! :) Also had this problem. Makes sense.

  3. #3 by Bockra on May 27, 2012 - 10:59 pm

    thx! That really helped me!

  4. #4 by abdussamad on February 3, 2013 - 7:22 pm

    Had this same problem on my new Debian VPS and thanks to you I fixed it.

Comments are closed.