Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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'm using KVM to host a Debian unstable guest on a Debian unstable host. Emphasis on 'unstable' :-) Until recently (and until a recent round of Debian package updates on both host and guest) this was working fine.

Now the Linux guest will boot from a CD-ROM image, but it will not boot from a hard disk image stored in an LVM2 LV.

A Microsoft Windows guest stored in a separate LVM2 LV continues to boot perfectly under KVM on this host.

When I configure the Linux guest to boot from device 'hd' (ie, the LVM2 LV disk image) and view the guest's console using virt-manager, I see:

Booting from Hard Disk...
Boot failed: not a bootable disk

The disk image seems to have a valid MBR:

sudo cat /dev/vg1/myguest|file -
/dev/stdin: x86 boot sector

I can also mount the root filesystem contained within the LVM2 disk image (the offset below having been calculated from fdisk output - the disk image contains two partitions):

sudo mount -o offset=1998743040 /dev/vg1/myguest /mnt ; echo $? ; ls /mnt/boot ; sudo umount /mnt
0
config-3.8.0  config-3.9.0  grub  System.map-3.8.0  System.map-3.9.0  vmlinuz-3.8.0  vmlinuz-3.9.0

I tried configuring the guest to boot from an ISO image of Debian 7.0.0 AMD64 netinst. This allowed me to boot into rescue mode from the CD-ROM and re-install the GRUB boot loader into the MBR of the LVM2 LV. However this does not change the above behaviour - booting from the hd still fails.

To my eyes, it is as if the MBR is valid, but KVM refuses to recognise that it is valid.

Q1: How can I best confirm that the MBR on the LVM2 disk image is valid? Perhaps attempt to boot a real physical machine from a copy of the LVM2 disk image on a real disk?

Q2: What is required in order for a disk image to be bootable by KVM?

Ie, what exactly does 'not a bootable disk' mean? Could there be more necessary than just a valid MBR?

share|improve this question

closed as off-topic by HopelessN00b, Ward, Roman, Jim B, HBruijn Mar 1 at 9:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – HopelessN00b, Ward, Roman, Jim B, HBruijn
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Are you really using Unstable in production? That is just asking for trouble. – kce Jul 14 '13 at 14:53
    
Indeed. Please feel free to find those responsible and tell them. But that is not my current problem. – AnotherSmellyGeek Jul 15 '13 at 2:18

Downgrading seabios from 1.7.3-1 to 1.7.2-3 causes the VM to boot from hard disk again. Time to file a bug report...

share|improve this answer
    
Copying the disk image to a Debian Stable KVM host, defining a VM using it, then attempting to boot that VM gets past the initial boot stage, which I think is a fair way of proving that the MBR is valid. I still would like some easier/better way, and which gave more detail than the 'file' test in my question. – AnotherSmellyGeek Jul 15 '13 at 3:41
    
"Not a bootable disk" means that the signature in the MBR is not what Seabios expects it to be. – AnotherSmellyGeek Jul 15 '13 at 4:09
    

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