Frankly I got tired of switching back and forth between Windows and Linux.

You need to have VirtualBox to get this working:

My current setup:
Host OS: Linux Mint 9 Isadora x64
VM OS: Windows 7 x64
Using Oracle VM VirtualBox 3.2.4 (hey! Sun has been taken over!)

! You need to have installed both your OS'es in dualboot already.
! You best know what you're doing, and know that what you're doing may have fatal consequences which I will not be held responsible for :P
! This is hardly a tutorial. These are roughly the steps I followed when setting up the box. Getting the required packages etc is your responsibility.
! You will need your Windows 7 CD (altho ISO will do fine too).

First, add yourself to the "disk" and "vboxusers" group. This will allow you to access the other partitions without needing root permissions.
This may be considered dangerous for some reason :) Also logout and back in after doing this. In the examples, I'm the user "cedric".

$ sudo usermod -a -G disk,vboxusers cedric

Now backup your MBR (Master Boot Record):

$ sudo dd if=/dev/sda of=bootrec.mbr bs=512 count=1

Now find out which partitions you have installed Windows on.
Usually you will see a 100MB sized boot partition and your NTFS partition with Windows 7 on. You need both for the next step!

$ fdisk -l
/dev/sda1 * 1 13 102400 7 HPFS/NTFS
/dev/sda2 13 22557 181082112 7 HPFS/NTFS
/dev/sda3 22557 60802 307200001 5 Extended
/dev/sda5 22557 59334 295409664 83 Linux
/dev/sda6 59334 59595 2099589+ 82 Linux swap / Solaris
/dev/sda7 59596 60801 9687163+ b W95 FAT32

We'll now create a Virtual Machine Disk (VMDK) of the partitions we want to use in the VM.
Sometimes you may also want to add extra partitions to have them shared between Linux & the VM.
In my case, the required partitions are sda1 and sda2. I also choose to add sda7.
Note: It's useless to add linux partitions to the VMDK. Windows can not read them anyway, and you don't want to raise the chance of fucking up Linux as well :)

$ sudo VBoxManage internalcommands createrawvmdk -filename win7.vmdk -rawdisk /dev/sda -partitions 1,2,7 -relative -mbr bootrec.mbr

Now go in VirtualBox and add a new VM for Windows 7 x64. Load win7.vmdk which you created earlier.
In my case I got to deal with permissions problems. Make sure you are the owner of win7.vmdk files and bootrec.mbr.

$ sudo chown cedric:cedric win7* bootrec.mbr
$ sudo chmod 777 win7* bootrec.mbr

If that still doesn't solve the issue, you may have not logged out and logged in again after the first step.
Otherwise, do for all partitions you need:

$ sudo chmod 666 /dev/sda[127]

You may have to repeat this on every boot of the VM.

Now go in the settings for the VM. In the System tab, enable I/O APIC.
When you have done that, it's time to boot up your VM. Startup will most likely fail.
Mount the Windows 7 CD and let it launch startup repair. "Repair installation", not "Install now" :P
The VM may restart and hopefully you will be able to get to your login screen.

Well done!
My congratulations also come directly with a warning. Do not attempt to install the VirtualBox tools. In v3.2.4 they make integration work perfectly in the VM, but when running natively, your mouse and keyboard will go loco.
There are also drivers available to get your audio working (make sure to select AC97 as your audio driver in the VBox settings), get them here and install them on your VM.


If you can't use the first option after "Repair installation" (screeny), then click the second one "Restore your computer using a system image you've created earlier". An alert will popup, but cancel/ignore/kill it.
Cancel this dialog too, and you will get to a screen that will give you a couple of options (screeny).
Open the command prompt and type
$ bootrec.exe /fixmbr
Hopefully that fixed a couple of things. Reboot.