Installing Windows 7 on an existing SSD with Linux

Some notes on installing Windows 7 on a drive with an existing install of Linux.

If you need to shrink the linux partition

Boot from either a fairly new live CD of from the GParted Live CD/USB. You do this so that your drive is not mounted, and you have access to it through GParted. It will only allow you to resize partitions that are not mounted.

Run GParted from the live CD. If you are using GParted Live, open a terminal and login "sudu user". No password is required. Most live CD's work the same way. Type 'gparted'. The app will load and look for partitions on sda.

Select the Linux partition (I'm showing the Windows partition after it was installed so you can see the options). On the menu, select 'Partition->Resize/Move'. The following dialog will present itself:

Mac OS-X ISO image in the installer app

You can select the position and size of the partition using the options on this dialog. In this case, I had to decrease the size of my Linux partiotion to 32 GB to make room for a 50 GB Windows 7 partition. Make sure you make the Windows partition large enough. 50 GB was Ok for mine, but I don't use it for anything but remoting into my machine at work, and it took 43 GB. When you select 'Edit->Apply All Operations' the Linux partition will be resized to 32 GB. If it needs to, GParted will move the data that is in the soon to be gone space into the space that will be kept. It takes time.

When it is finished, you have a smaller 32 GB Linux partition and a 50 GB or so unallocated space. Go ahead and allocate it as a boot partition, formatted NTFS. When that is done, you need to install Windows 7 as you normally would, but keep your live CD around because you still have one more boot with it.

After Windows 7 is installed, the boot record points to it, rather than your grub bootloader. To get the system to boot either OS you will have to boot from the live CD again, open a terminal, and 'sudo update-grub'. this will rewrite the Linux bootloader so you can access both Linux and Windows 7.