Saturday, March 27, 2010

PROJECT(S): Boot from existing partition in VM / Moving extended to primary

The reason I really wanted to do this is because I have Windows 7 installed. I want to have it installed to a true partition rather than a virtual disk because if I ever switch over to it, that will make it easy as possible. Also, I got a game, Shadowrun, which can only run on Vista/7, and since I don't use 7 for anything right now, I hate the idea of having to boot into 7 just to play a game. I know it's possible because of sites like this one, but I'm not sure if it's doable in my certain circumstance.

So I am trying to get it where I can mount a "pointer" that will be like a virtual disk, only instead of actually being a disk it will just 'point' to the existing partition. So far, I've come up with some problems:
(1) The only people that care enough about things like this use Linux
(2) Windows 7 totally jacked up my MBR.

I decided to triple boot when I first built my PC and I installed the OSes in a very specific order. If I am remembering correctly, I used Parted Magic to partition the disk to two NTFS's and a blank remainder, then I installed XP, then I installed another XP and then upgraded that one to 7, then lastly I installed Crunchbang and a swap on the remainding empty.

Anyway, since I had XP installed before 7, 7 decided to be a jerk and steal XP's spot in the boot record. I don't know why. It's been a while since I've dealt with this, but I think what it was is that Vista installed into an extended partition inside XP's primary partition, and since you can't boot from an extended partition, that caused some trouble with virtualization.

I don't know too much about types of partitions, but I've read everywhere that you can't boot from an extended partition, but for some reason, when I choose in grub to boot from the first partition (XP's), it brings up 7's bootloader. My best guess is that 7 installed itself into an extended partition and then installed a bootloader into XP's primary partition. 7's a jerk.

So anyway, that's freaking annoying in terms of real disks because I toyed with GRUB for days trying to get 7 to work. (I'm not too advanced with GRUB, mostly because I don't know how to label the disks and count the partitions). After finally figuring out it was extended instead of primary, I discovered that you can't boot from an extended so I wasn't wrong with all my trial and error. Microsoft just decided to screw me. But anyway, I can't add it to grub, I can only add a "Windows XP/7" entry which will point to the 7 bootloader, which I can then use to pick XP or 7.

So it's annoying in physical aspects, but also in virtual. Because it's extended, I'm fairly sure that I can't boot straight into it. I might be able to boot into XP's primary partition and then select 7 in the bootloader, but that really worries me because then I'll technically be booting into the partition that I'm using (and that reminds me too much of the Futurama episode where they ended out with their own universe in a box). I'm not positive, but I think I can remember reading that attempting to virtually boot into the partition you are currently using either (a) is impossible or (b) could fatally damage that partition, or quite possibly both.

The only way that I can think of to substantially reduce my headaches and make everything extremely simple is to move the Windows 7 installation from extended to primary. Now I am fairly sure that it's not that easy. I know you can't just boot into Parted Magic, right click an extended partition and click "Switch to primary", and be on your merry way. When I say 'move', I mean most likely copying the partition to a ghost image or an ISO, deleting the extended, and creating a new primary in its place, then restoring the file. That sounds easy, but I'm not sure how possible it is. The way I'm thinking about it, it wouldn't effect the XP partition at all (which is my biggest concern). My next concern would be if I copied the partition to a primary but since it was set up with a bootloader it wouldn't work properly or something like that. (But then maybe I could use the recovery CD to restore the 7 MBR? But then that may mess up XP's MBR.....) And that's all assuming that copying like I described is possible.

So those are two projects that I'm going to look into someday.
PROJECT PART-IN-A-(V)BOX:  Boot from existing partition in a virtual machine
PROJECT "FIRST PRIME": Moving contents of an extended partition to an identical but bootable primary partition.

Ah, the beauties of being an aspiring nerd. So much to learn, so much to mess up trying to figure it out.
-Bry

PS - I give all my projects wicked code names.

No comments:

Post a Comment