How to Dual Boot Linux and Windows 7

Written by:  • Edited by: Rebecca Scudder
Updated Nov 8, 2009
• Related Guides: Windows 7 | Windows 7 Installation | Hard Drive

Are you a Linux user wondering about all the Windows 7 hoopla? No matter what you think about Microsoft, nobody will mind if you try it out in secret. Here we’ll look at shrinking a Linux partition to make room for Windows 7 and then installing Windows 7 on the PC.

Obtain a Windows 7 Version

First, you’ll needa copy of Windows 7. A previous version of this article talked about downloading a beta or release candidate version and using it. However, now that we're past the release date, we'll assume that you have a real copy of Windows 7 that you want to install on your Linux box.

Creating a Windows Partition

Once you have the installation DVD, the next step is to create room for Windows 7. We tested this on a notebook running openSuse Linux 11.1 and used the included "Expert Partitioner" application to shrink an existing partition. This could also be done using a Linux rescue disk or a GParted Live CD, which should work with any distribution using a common Linux file system.

In openSuse, click Menu → More Applications → Utilities → Yast. Enter your super-user password, and then open Partitioner.

In Expert Partitioner, click on /dev/sda in the left-hand pane and the Partitions tab in the right-hand panel. The image below shows the partitions after the shrinking. The space for the 93 GB partition for Windows 7 was taken from /sda3.

Expert Partitioner Results
click to enlarge

The steps involved are clicking the partition you want to resize and then clicking the “Resize” button at the bottom. This brings up the “Resize Partition” dialog. Dragging the pointer sideways adjusts the existing partition’s size. The new, unallocated space will show up as “Unused Disk” in the legend above the slider. Then just click OK to shrink the partition.

Partitioner Partition Details
click to enlarge

Partitioner Resize Partion
click to enlarge

Shrinking a Partition with GParted Live CD

GParted can be downloaded at the SourceForge website.

You’ll need to follow the same process that you used to create the Windows 7 installation disk on your PC to create the GParted Live CD.

At startup, the installer asks for the keyboard configuration and preferred language followed by the desired video mode. This then left me looking at a Debian/Gnome home screen with GParted open.

GParted
click to enlarge

Mebibytes and Gibibytes

You may soon find yourself wondering what “MiB” and “GiB” are. You may wonder this as soon as you select the partition that you want to resize. GParted shows the sizes in Gibibytes and Mebibytes.

What are MiB and GiB? Besides a subject of technical discussion, they are hard drive size measurements that can be directly compared to RAM size measurements. 1024 (and not 1000) Mebibytes equals 1 Gibibyte. Even better, GParted expects us to know this and compute the changes ourselves. So let’s give it a try.

Our /dev/sda3 partition, according to openSuse and Expert Partitioner is 276.08 GB. We want to shrink it 100 GB for the new Windows 7 partition. GParted says that the partition is 271.56 GiB.

GB and MB come from an industry practice by hard drive manufacturers where they label capacity in MB = 1000 bytes and 1000 MB = 1 GB. This sounds much more attractive, they think, to purchasers who get their new drives installed and then discover that that the OS reports that it only has about 93% of the capacity they thought they were buying.

Mebibytes and gibibytes would solve this problem – if the hand-drive manufacturers would adopt the standard. 1024 MiB of hard drive capacity = 1 GiB in the same way that 1024 MB of RAM = 1 GB.

Anyway, we want Windows 7 to have 100 GB. 100 GB = 93 GiB, and 93 GiB = 95,232 MiB. That’s how much we want to shrink the drive in GParted.

Doing this same task in Windows Vista a few days ago, I used the “Shrink Tool” in Vista to shrink the partition, format it, and mark it “active.” For our purposes here, we’ll use Gparted to shrink the partition and see how it goes.

Next: Shrinking the Drive, Installing Windows 7, and Fixing GRUB to Dual-Boot

Showing page 1 of 2

Comments

Showing all 4 comments
 
venice Sep 14, 2011 10:06 AM
Installation problem
when i m trying to install the linux os .It prompt to select keyboard drivers.really i m new for linux and asking select device driver to load plz guid me.Redhat linux
Marcelo Machado Jan 13, 2010 8:45 AM
How about the inverse?
Hi there, I'm sorry if my question is too obvious (and dumb) but, what about the opposite: I just bought a notebook (dell inspiron) that comes with windows 7 and I'm willing to put ubuntu on it (for obvious reasons). In this sense my question is: What should I do? Just try the ubuntu cd on and answer some questions? Thanks in advance.
Lamar Stonecypher Sep 7, 2009 5:21 PM
RE: How to Dual Boot Linux and Windows 7
Hi, Conner,

You might try going into the BIOS and looking at the boot-up order. You may have it set for the hard drive before the DVD drive now, particularly if it's not telling you to "Press any key to start from CD/DVD."

If that's not the problem, try booting another PC from the DVD. If it still doesn't work, try reburning the image to another DVD.

Good luck!
conner Sep 7, 2009 3:26 PM
RE: How to Dual Boot Linux and Windows 7
Thats nice and all and i did everything you said to do, but when i put the windows 7 dvd installation disk, it does not boot. you see, I originally had windows 7 on my comp but then decided to try linux, so i deleted all of my partitions and installed linux. then when i tryed to install windows 7 from the disk, it would not boot and it went straight to booting up ubuntu. any help would be greatly appreciated.
 
blog comments powered by Disqus
Email to a friend