Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a series of debian server VMs under Xen. I am using pygrub, so the kernels and initrds are within the VM itself.

I would like to continue using the automatic grub.cfg generation provided through kernel updates that debian does, however I need to tweak it so that it doesn't attempt to install the grub img into the boot sector. All I need it to do is generate the grub.cfg, and not attempt to install the boot loader.

When it does attempt to install grub.img, it fails because there isn't way for it to do this, and so it becomes an unresolvable apt error. This is because the partitions defined in the VM are themselves LVM volumes, so there isn't a boot sector as such:

disk=['phy:/dev/raid5/dl-boot,xvda1,w', 'phy:/dev/raid5/dl-root,xvda2,w']

There doesn't seem to be an option available in /etc/default/grub to switch off grub-install?

share|improve this question
up vote 1 down vote accepted

It turns out that this was an issue with zz-update-grub. It is supposed to attempt to install the img to the physical disk boot sector and revert to the boot partition if the physical disk is not present (precisely for these types of situation I imagine).

While it didn't do this when I last tested, it does now, so this was probably added as a feature or a bugfix recently.

Upgrading to a newer version of grub-pc fixed the problem.

share|improve this answer
While i updated a debian VM i got a question about where to install grub. the possibilities where /dev/sda and /dev/sda1 i choose /dev/sda because you wront it needs to be installed at the physical drive and that was right. – Harrys Kavan Oct 10 '13 at 19:39
@derty The HVM approach with Xen (or other hypervisors) is different to paravirtualised in Xen. The /dev/sd* devices don't exist, and in the configuration above, only the partitions are visible to the guest, not the "whole device" - ie there is no /dev/sda or /dev/xvda. – Paul Oct 10 '13 at 21:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .