Friday, May 13, 2011

Forays into Ubuntu - Booting Linux from a VHD

I am always intrigued by the idea of Linux. Don't get me wrong, unlike many people, I actually love Microsoft and I am a HUGE fan of Windows 7. But Ubuntu (especially 11) is pretty darn cool. Do you know what is more cool though? Booting an entire operating system from a VHD (Virtual Hard Drive). That's right, I am not booting a Virtual Machine, I am using the full hardware of my computer system. The only thing that is virtualized is the Hard Drive and its associated interface.




So guess what is even more cool than booting from a VHD... Booting Ubuntu 11 from a VHD! And I have done it successfully! In fact, I am writing this post right now from my computer which is currently running Ubuntu 11 from a VHD file (See Screenshot Below...). So, what is all this VHD stuff about? For a full on explanation, check out this article from Wikipedia. But, here is the short of it:

A screenshot of me writing this article on Ubuntu 11, pasted into this article as I am writing it... Inception? :)


Imagine having a SINGLE file on your physical hard drive that is itself an entire hard drive. Inside this file there is a boot partition, a system partition, etc. Everything is contained within a single file. If you wanted to take your entire hard drive with you, you could simply copy that file to a USB stick and load it onto another machine. If you wanted to have 20 different operating systems or multiple copies of the same operating system to boot into (i.e. multi-boot not just dual boot) you would simply have 20 different files on your hard drive rather than having 20 different physical hard drives -OR- one physical hard drive with 20 partitions. Why is having a 20 files better than having 20 partitions? Because files can be easily deleted without affecting anything else on the system. They can also be EASILY moved from one system to another... Furthermore, they are very easy to backup. Each VHD file is also its own little world. The operating system that boots from the VHD is completely unaware of ANYTHING else on the physical hard drive on which it resides. It has no idea there are 19 other VHD files on your physical hard drive each with its own operating system. Why is this important or interesting? Lets say you wanted to have a computer that was set aside JUST for "playing" with potentially dangerous files like viruses... Because a VHD is a self-contained unit that has nothing to do with the rest of the physical hard drive, it is like a sandbox. No virus can get out (none that are around right now at least). Maybe you really want to open up that forwarded email from your crazy 70 year old aunt who happens to forward just about everything and has been known to unwittingly send a virus or two on occasion.  Oh, lets talk about system restores for a moment as well! Instead of taking 2 hours to get your system back up and running from its last backup, how about it only taking 20 minutes! That's right, because you just backup your VHD file on a regular basis. If something gets corrupted while the operating system is running, you just copy your backup VHD file back onto the physical hard drive and boot from it and you are good-to-go. Have to deploy 50 custom copies of an Operating System with multiple installed and configured applications to everyone at work? Easy, the file can be copied over and over and dropped on each new computer as needed. Shew... That was a lot. Suffice to say, booting from a Virtual Hard Drive opens up a world of new possibilities. Oh, and if you own Windows 7 Enterprise or Ultimate edition, the VHD booting feature is built right in... Yeah, it's pretty sweet!

Now, having multiple bootable Windows 7 VHDs is definitely handy... But being able to boot multiple Linux Distro VHDs is just plain fun. You can have Ubuntu, Mint, Debian, Suse, etc. etc. ALL on the same physical hard drive and all on the same physical partition. Now, Linux booting won't work natively with Windows and requires a FREE third party tool called Vboot. Vboot is actually an easy solution for setting up Windows 7 VHD booting as well as Linux. I plan on walking through how I was able to get BlackBuntu and Ubuntu 11 setup in upcoming posts. I hope at this point that I have piqued your interest though!

Cheers!

4 comments:

  1. Too bad it isn't free.
    Thanks for the article though.

    ReplyDelete
  2. $179 for a boot loader?!?!

    ReplyDelete
  3. Vboot is a crock of bs. $79 for 1 pc or $179 for 5. "This is a trial and beta version, which expires on Jan-15-2012. After expired, Windows virtual disks won't boot, and BSOD will occur." NIIIIICCCCE....

    ReplyDelete
  4. Hello, I found your site on Google and I am very interested in your accomplishment, I have tried to setup vBoot but have only succeeded with the pre-made images that the site provides, could you please explain on how you managed to get BlackBuntu and Ubuntu 11 running from VHD?

    ReplyDelete