31

Is there some way to boot a Linux system from a VHD in Windows 7?

If there is a way, how do I put it there in the first place?

EDIT: To clarify, I'm not trying to run Linux in a VM. I'm trying to boot it in my physical machine, from a VHD, as I can do with Windows 7.

1

7 Answers 7

18

You cannot. In Windows VHD support is integrated in boot process and Linux does not offer such support. Additionally, I am not aware that Linux supports booting from any other virtual disk type.

2
25

yes, We just released a sample Linux VHD that you can boot any computer.

You can find more info here:

Download and boot your physical PC, also runs as vm - http://www.vmlite.com/index.php/forums/17-vboot/1864-linux-vhd-boot-available-download-and-boot-your-physical-pc-also-runs-as-vm

1 Linux as Real Appliance

With VBoot for Linux, you can pre-install and pre-configure Linux OS and its applications, then distribute the resulting virtual disk file in VHD format. The vhd can boot a real computer, with configuration and apps instantly available. This way, operating systems are truly manageable, as simple as files. We call such a Linux VHD to be a real appliance, in the sense that it boots physical computers.

It's very easy to setup and boot a computer with a vhd file. You download the vhd file, drop it to Windows or Linux file system, then configure the boot loader, and reboot the computer.

2 Linux as Virtual Appliance

The exact same vhd file also runs as a virtual machine using virtualization software, such as VMLite Workstation, VirtualBox, Xen and Virtual PC and Hyper-V, etc. By default, it's optimized for VMLite Workstation.

If VMLite Workstation is installed, you can simply double click the ubuntu-910-desktop-i386.mop file to launch the vhd as a virtual machine with VMLite Workstation.

A sample Ubuntu VHD package is ready for download:

http://www.vmlite.com/index.php/download/22-appliances (free site registration required)

download, extract it, then double click setup.exe on Windows, reboot On Linux, need to configure boot loaders.

detailed instructions:

http://www.vmlite.com/appliances/ubuntu-910-readme.html

screenshot:

http://www.vmlite.com/images/vboot/vboot-grub2.png

VMLite Team

2
  • 3
    It appears this VBoot program was a trial set to expire on 2012-01-12, almost ten months ago now, and is no longer free. Oct 16, 2012 at 1:57
  • The first link is broken!
    – msangel
    Jan 12, 2016 at 22:09
10

First Create a bootable Win 7 VHD using this known procedure from Keith Combs.

http://blogs.technet.com/b/keithcombs/archive/2009/05/22/dual-boot-from-vhd-using-windows-7-and-windows-server-2008-r2.aspx

Boot the Win 7 operating system on the VHD.

Go get the free Wubi installer.

http://www.ubuntu.com/download/ubuntu/windows-installer

From Windows 7, install the Ubuntu Wubi installer, but make sure you install files on the Physical HD's primary partition (not VHD's C: windows partition)

Reboot when asked to do so, but don't select Ubuntu yet from the boot menu (it won't work), you need to launch Windows 7 one last time.

Now the important bit: In Windows 7 make sure you change the Folder view settings to "Show all files" and make sure OS files are un-hidden. Once you have done this browse the C: drive. You will see two important files: wubildr and wubildr.mbr

Copy these two files to the root of the Physical Partition (ie, the partition where the Windows7.vhd file is located and the Ubuntu folder that was created when you installed wubi above). Just to be sure you are copying the files to the right partition, make sure you can see that there is a pagefile.sys bootmgr and bootsect.bak file.

Thats it! reboot and select Ubuntu from the Windows bootloader.

5

it is possible to use a disk image as a root device, but compiling this into the kernel or the bootloader is somewhat tricky. Since the VHD specification is freely available, extending lilo or grub or the linux kernel to give a vhd the same status as a .iso or .img or other disk image file should be a simple matter of programming, taking you no more than a year or two of weekends and evenings. Then you'll be a hero, and after your patches are accepted into the main line kernel source you are eligible to get a Tux tattoo.

1
  • 5
    unneccesary snarkiness
    – uSlackr
    Oct 3, 2011 at 23:22
0

lol this is a late reply, but you could try the WUBI installer or unetbootin. They don't use VHD files, although they do allow you to boot a few linux distros without any partitioning as long as you have a copy of the cd or iso.

-1

Do you mean running an existing Linux System in a virtual machine?

If yes this might be the answer: http://www.windley.com/archives/2007/08/p2v_how_to_make_a_physical_linux_box_into_a_virtual_machine.shtml

1
  • Nope. He was referring to booting the OS from bare metal using a file container. I've seen it done in the past, using various methods. In fact, I used to run a distro this way. It's cleaner than GRUB, since there's nothing to clean up in the partition table if you decide to change or remove the Linux distro.
    – TomXP411
    Mar 2, 2015 at 20:19
-2

You can try converting the VHD into VMDK (for VMWare products), and then try booting from there.

You just need to open the VHD with a VMWare product (even the free VMWare player will work), and VMWare will convert it to VMDK for you.

You might need to tweak the Linux system to operate fully in the new VMWare environment though.

2
  • I didn't intend to boot a vm. I can do that with Virtual PC. What I want is to boot my physical machine in the vhd. Thanks anyway. Sep 1, 2009 at 11:10
  • The question was about booting to a bare-metal VHD, not a virtual machine. You can do this with Windows: boot the OS directly to a VHD without using a hypervisor. The OP wanted to do the same with Linux.
    – TomXP411
    Mar 2, 2015 at 20:19

You must log in to answer this question.

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