Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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. –  derty 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

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.