Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I already have the following logical volumes:

  • host:/dev/mapper/vg0-fc17-boot (guestOS:/dev/hdb) formatted as ext4 (no partition table)
  • host:/dev/mapper/vg0-fc17-root (guestOS:/dev/hdc) formatted as ext4 (no partition table)

Do I have to create the following grub partition to boot a guest VM under VirtualBox?

  • host:/dev/mapper/vg-fc17-mbr (guestOS:/dev/hda) with a partition table and install grub MBR here?

Or is there a better way? (Maybe grub on vg0-fc17-boot?)

share|improve this question

closed as off topic by Michael Hampton, Magellan, Scott Pack, John Gardeniers, sysadmin1138 Oct 19 '12 at 19:50

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

Presumably you've allocated a disk type device from VirtualBox, which you've set as your PV, created a VG (vg0-fc17) and then created LVs. Therefore, you should point grub install at that device, usually /dev/sda

share|improve this answer
    
@NevilleDNZ Logical volumes don't have partition tables nor have MBRs installed in them. You install Grub to the Physical Volume that they are created on. Type pvs to see the name of this disk. –  Alastair McCormack Oct 11 '12 at 11:42
    
Your PV does not have ext4 FSs on it (not directly). It has a VG. The VG has two LVs. Each LV has an ext4 FS on it. AFAIK, you can install the Grub MBR on a disk which is entirely used as a PV with no partition table. What happens when you try it? –  Alastair McCormack Oct 11 '12 at 12:30
    
Reword: Can a "ext4 FS" and "grub MBR" coexist on a "LV" (not PV) without a "partition table"? –  NevilleDNZ Oct 11 '12 at 12:54
    
@NevilleDNZ There's no point creating an LV and adding an MBR to it. VirtualBox (or a PC BIOS) won't know where on the disk it is or how to read the data. If you're worried about overwriting your data, create a new disk for VirtualBox, set it as the boot disk, possibly with /boot on it and install grub to it. –  Alastair McCormack Oct 11 '12 at 13:25
    
let us continue this discussion in chat –  NevilleDNZ Oct 11 '12 at 14:42

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