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.

Hi I would like to install a fresh copy of Ubuntu on separate partitions to the host in VirtualBox, which is also Ubuntu.

I have managed to create VMDK files to point to the raw partition. But I need to know that by installing the guest Ubuntu this way, that it won't affect the boot manager for the host. I don't want to go ahead and do it and then find that I can't access the host OS.

Thanks!

share|improve this question
    
If you are worried, make a clone of the VHD and virtual and do a test without affecting the original copy –  uSlackr Jun 15 '11 at 16:37

1 Answer 1

up vote 1 down vote accepted

If you use a real partition for VirtualBox you shouldn't be able to write on the MBR of the disk, so it isn't a real danger in doing that unless you specify the entire disk or the wrong partition.

According to http://www.virtualbox.org/manual/ch09.html#rawdisk, the guest's MBR is written to a file instead of being written to a partition.

In some configurations it may be necessary to change the MBR code of the created image, e.g. to replace the Linux boot loader that is used on the host by another boot loader. This allows e.g. the guest to boot directly to Windows, while the host boots Linux from the "same" disk. For this purpose the -mbr parameter is provided. It specifies a file name from which to take the MBR code. The partition table is not modified at all, so a MBR file from a system with totally different partitioning can be used. An example of this is

VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -partitions 1,5 -mbr winxp.mbr

The modified MBR will be stored inside the image, not on the host disk.

The created image can be attached to a storage controller in a VM configuration as usual."

share|improve this answer

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.