You are on page 1of 8

Dual-Boot Windows 7 and Ubuntu in Perfect Harmony

http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfe...

SIGN IN TOP STORIES DUAL BOOT LATEST STORIES THURSDAY, JAN 24, 2013

Dual-Boot Windows 7 and Ubuntu in Perfect Harmony


Windows 7 and Ubuntu, despite their opposing missions, can get along like best pals on a single computer. Here's how to set up a dual boot system that lets you enjoy the best of both worlds in perfect harmony.

TIPS AND DOWNLOADS FOR GETTING THINGS DONE

BY KEVIN PURDY

NOV 12, 2009 9:30 AM MACGYVER CHAL MacGyver Challenge: Hack Something With a Clothes Hanger PRODUCTIVITY Five Good Habits You Need to Unlearn THE SHOW Do Everything With a Raspberry Pi, Switch to an Online Bank, and Get a Job You Love CHROME EXTENS Honey Automatically Searches For And Applies Coupon Codes When You Shop Online HAPPINESS How to Pick a Career You Actually Like EXTENSIONS Hola Unblocker Gives You Access to iPlayer, Netflix, Pandora, Hulu, and More Regardless of Region SPONSORED JAN 22, Access Your Media 2013 From the Cloud on Any Device with QVIVO HOW TO A Beginners Guide to DIYing with the Raspberry Pi HACKINTOSH The CustoMac 2013 Buyers Guide Offers Hackintosh Builds for Every Budget RASPBERRY PI Turn a Raspberry Pi into a Personal VPN for Secure Browsing Anywhere You Go JOBS If You Want a Good Job, You Need More Than One Talent

By default, Windows 7 takes over your Like 405 1,156,533 151 boot-up process and wants to be your only OS, and Linux treats Windows like a weekend hobby you keep in a shed somewhere on your hard drive. But I've been dual-booting Ubuntu and some version of Windows 7 for nearly a year, and I've learned a lot about inconveniences, annoyances, and file-sharing necessities, and now I'll walk you through how to set up your systems to achieve a peaceful union of your dual-boot OSes. (Both with Windows 7 already installed, and with a clean system ready for a new dual-OS existence.) Follow through this guide, and I'll explain how to rebuild a system from the ground up with Windows 7 and Ubuntu, with either a backed-up and cleaned-out hard drive (recommended) or Windows 7 already installed. When we're done, you can work and play in either operating system, quickly and conveniently access your documents, music, pictures, and other files without worry or inconvenience, and boot into either system without having to worry about whether Windows is going to get mad at you. Plus, when Ubuntu 10.04 or Windows 8 come along, you'll find it much easier to install either one without having to start over entirely from scratch.

What you'll need


Windows 7 installation disc: For clean installations, either a full installation copy or an upgrade disc is needed. If you own an upgrade disc but want to start from scratch, there's a way to do a clean install with an upgrade disc, though that's a rather gray-area route. Then again, there's probably not a person on this earth that doesn't have a licensed copy of XP or Vista somewhere in their past. Ubuntu 9.10 installation image: You can grab an ISO at Ubuntu.com, or hit "Alternative download options" to reveal a (usually very fast) BitTorrent link. You'll want to get the ubuntu-9.10-desktop-i386.iso download for 32-bit systems, or ubuntu-9.10-desktop-amd64.iso.torrent for 64-bit on AMD or Intel systems (despite the name). Blank CD or empty USB drive: You'll need one of these for burning the Ubuntu ISO, or loading it for USB boot. If you're going the thumb drive route, grab UNetBootin for Windows or Linux, plug in your USB drive, and load it with the downloaded ISO image. All your data backed up: Even if you're pulling this off with Windows 7 already installed and your media and documents present, you'll want to have a fallback in case things go awry. Which they shouldn't, but, naturally, you never know. Free time: I'd reckon it takes about 2 hours to pull off two OS installs on a clean system; more if you've got a lot of data to move around.

Setting up your hard drive


If you've got nothing installed on your system, or you've got your data backed up and you're ready to start from scratch, you're in a great positionskip down to the "Partition your system" section. If you've got Windows already installed, you can still make a spot for Ubuntu, though.

1 of 8

25-Jan-13 1:06 PM

Dual-Boot Windows 7 and Ubuntu in Perfect Harmony

http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfe...

(Only) If Windows is already installed: You're going to "shrink" the partition that Windows 7 installed itself on. Before we do that, clean out any really unnecessary applications and data from your system (we like Revo Uninstaller for doing this). Also, open up "Computer" and take note of how much space remains on your main hard drive, presumably labeled "C:". Head to the Start menu, type "disk management" into the search box, and hit Enter. Windows 7 probably put two partitions on your hard drive: one, about 100 MB in size, holding system restoration data. We don't want to touch it. Right-click on the bigger partition to the right, and choose Shrink Partition. After a little bit of hard drive activity and a "Please wait" window, you'll get back the size you can shrink your Windows partition by. If the space Windows offers doesn't jibe with what your Computer view told you was "remaining," you might need to hit Cancel, then head back and defragment your hard drive, and take some of the steps laid out by the How-To Geek. Run the Disk Management tool again and try a Shrink Volume operation again, and free up as much space as you can. Partition your system: You're aiming to set up a system with three partitions, or sections, to its hard drive: One lean partition for the Windows operating system and applications running from it, another just-big-enough partition for Ubuntu and its own applications, and then a much larger data partition that houses all the data you'll want access to from either one. Documents, music, pictures, application profilesit all goes in another section I'll call "Storage" for this tutorial. How do you get there? We're going to use GParted, the Linux-based uber-tool for all things hard drive. You could grab the Live CD if you felt like it, but since you've already downloaded an Ubuntu installer, you can simply boot a "live," no-risk session of Ubuntu from your CD or USB stick and run GParted from there. Once you're inside Ubuntu, head to the System menu in the upper left when you get to a desktop, then choose the Administration menu and GParted under it. You'll see your system's hard drive and its partitions laid out. You're going to create partitions for Linux and your storage space, but not Windowswe'll let the Windows installation carve out its own recovery partition and operating space. On my own system, I give Windows 15 GB of unallocated space, and Ubuntu another 15 GB of space right after it, with whatever's left kept as storage space. Then again, I've only got a 100 GB hard drive and don't run huge games or applications, so you can probably give your two operating systems a bit more space to grow. Click on the unallocated space and hit the "New" button at the far left. In the "Free space preceding" section, click and hold the up button, or enter a number of megabytes, to leave space for Windows at the front. When you've got the "space preceding" set, set the actual size of the Ubuntu partition in the "New Size" section, and leave "Free space following" alone. Choose "unformatted" under file systemwe'll let Ubuntu do the format itself and hit "Add." Back at the main GParted window, click on the space to the right of your two OS spaces, hit "New" again, and set the file system as "ntfs." Give it a label like "Storage," hit "Add," and at

TELL US What Android Phone Do You Use?

XBMC Turn a Raspberry Pi Into an XBMC Media Center in Under 30 Minutes HIVE FIVE CALL F Best iPad Keyboard?

RASPBERRY PI Turn a Raspberry Pi Into an AirPlay Receiver for Streaming Music in Your Living Room ASK LIFEHACKER Why Would I Want a Touch Screen PC? FITNESS BodBot Offers Free, Personalized Exercise Plans to Help You Get to Your Fitness Goals STRESS Why You Need More Margin in Your Life (and How to Get It) PRIVACY Hushed for Android Generates Throw-Away Phone Numbers for Private Calls in Over 40 Countries SECURITY Use Accented Characters to Make Your iOS Password Even Stronger DEALHACKER Things, the Awesome But Expensive To-Do App for Mac, On Sale for 50% Off MONEY The Behaviors that Destroy Your Financial Health (and How to Avoid Them) HEALTH Dont Rinse Your Mouth Out After Brushing Your Teeth MIND HACKS The Psychology Behind the Importance of Failure INSPIRATION How to Start Over (Hint: Its Never Too Late) DEALHACKER Get a Year of Dreamhost, Our Favorite Hosting Service, For $20 FOOD What Salt to Taste Actually Means

2 of 8

25-Jan-13 1:06 PM

Dual-Boot Windows 7 and Ubuntu in Perfect Harmony

http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfe...

the main GParted window, hit the checkmark button to apply your changes. Once it's done, exit out of GParted and shut down the system from the pull-down menu in the upper-right corner. If Windows is already installed: If you've shrunk down its partition for free space and booted into a live Ubuntu or GParted, click on the "Unallocated" piece next to the two "ntfs" partitions that represent your Windows 7 installation and system recovery tools. Create a 15(-ish) GB unformatted partition, and give it a label like Ubuntu. If you've got a good deal of space left, format it as "ntfs" and label it something like "Storage." If you can just barely fit the Ubuntu partition, you can just keep your media files in the Windows partitionuntil you can remedy this with a full wipe-and-install down the line. Experienced Linux geeks might be wondering where the swap space is goingbut don't worry, we'll create one, just not in its own partition.

Installing and configuring Windows


Grab your Windows 7 installation disceither a full copy or modified upgrade disc, and insert it into your DVD drive. If your system isn't set up to boot from CD or DVD drive, look for the button to press at start-up for "Boot options" or something similar, or hit up your system maker's help guides to learn how to change your boot order in the BIOS settings. Follow through the Windows 7 installation, being sure to choose "Custom" for the installation method and to point it at that unallocated space we created at the beginning of your hard disk, not the NTFS-formatted media/storage space we made earlier: Work your way through the Windows 7 installation, all the way until you reach the Windows desktop. Feel free to set up whatever programs or apps you want, but what we really want to do is set up your Storage partition to house your pictures, music, video, and other files, and make your Libraries point to them. Hit the Start menu, click Computer, and double-click on the hard drive named "Storage" (assuming you named it that earlier). In there, right-click and create new folders (or hit Ctrl+Shift+N) for the files you'll be using with both systems. I usually create folders labeled Documents, Music, Pictures, and VideosI could also see folders for saved games and data files from big software packages. Copy your media files into these folders now, if you'd like, but we've got a bit more tweaking to pull off. In the left-hand sidebar, you'll see your "Libraries" for documents, music, pictures, and video. At the moment, they point to your Public shared folders and the My Pictures-type folders on your main Windows drive. Click once on any of the Libraries, and at the top of the main panel, you'll see text stating that this library "Includes: 2 locations ...". Click the blue text on "2 locations," then click on each of the folders below and hit "Remove" on the right-hand side. Now hit "Add" and select the corresponding folder on your Storage drive. Do the same for all your music, pictures, videos, and other media folders. Want to add another library for quick access? Right-click somewhere on the desktop, choose New->Library, and follow the steps. That's about it for Windows. Now get your Ubuntu CD or USB stick ready and insert it in your system. Ignore whatever auto-play prompts appear, and restart your system.

Installing and configuring Ubuntu


Restart your computer, this time booting from your Ubuntu Live CD or USB boot drive. When your system boots up, choose your language, select "Try Ubuntu without any changes to your computer," and you'll boot into a "live" desktop, run entirely off the CD or USB stick. Once you're booted up, try connecting to the internet from the network icon in the upper-rightit

3 of 8

25-Jan-13 1:06 PM

Dual-Boot Windows 7 and Ubuntu in Perfect Harmony

http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfe...

helps during the installation process, ensures your network is working, and gives you something to do (Firefox) while the system installs. Click the "Install" link on the desktop, and fill out the necessary language/location/keyboard info (most U.S. users can skip through the first 3 screens). When you hit the "Prepare disk space" section, select the "Specify partitions manually" option, then hit Forward. Select the free space that's after your first two Windows partitions with ntfs formats, then hit the "Add" button at bottom. Your partition should already be sized correctly, and the only thing to change is set "/" as a mount point. Here's what your screen should look like: Click OK, then finish through with the Ubuntu installation. If it catches your Windows 7 installation, it might ask if you want to import settings from inside ityou can, if you'd like, but I usually skip this. Wait for the installation to finish, remove the CD or thumb drive, and reboot your system. When you start up again, you'll see a list of OS options. The only ones you need concern yourself with are Windows 7 and the top-most Ubuntu line. You can prettify and fix up this screen, change its settings, and modify its order later on. For now, let's head into Ubuntu. We're going to make the same kind of folder access change we did in Windows. Click up on the "Places" menu, choose "Home Folder," and check out the left-hand sidebar. It's full of links to Documents, Pictures, and the like, but they all point to locations inside your home folder, on the Linux drive that Windows can't read. Click once on any of those folders, then right-click and hit Remove. You should see your "Storage" partition in the left-hand sidebar, but without that namemore like "100GB filesystem." Double-click it, type in the administrator password you gave when installing, and you'll see your Documents, Music, etc. Click and drag those folders into the space where the other folders were, and now you'll have access to them from the "Places" menu, as well as any file explorer window you have open. Ubuntu won't "mount," or make available, your Windows 7 and Storage drives on boot-up, however, and we at least want constant access to the Storage drive. To fix that, head to Software Sources in the System->Administration menu. From there go to Applications, then the Ubuntu Software Center at the bottom. Under the "Ubuntu Software" and "Updates" sections, add a check to the un-checked sources, like Restricted, Multiverse, Proposed, and Backports. Hit "Close," and agree to Reload your software sources. Finally! Head to the Applications menu and pick the Ubuntu Software Center. In there, search for "ntfs-config," and double-click on the NTFS Configuration Tool that's the first result. Install it, then close the Software Center. If you've got the "Storage" or Windows 7 partitions mounted, head to any location in Places and then click the eject icon next to those drives in the left-hand sidebar. Now head to the System->Administration menu and pick the NTFS Configuration Tool. You'll see a few partitions listed, likely as /dev/sda1, /dev/sda2, and the like. If you only want your storage drive, it should be listed as /dev/sda3 or something similarjust not the

first or second options. Check the box for "Add," click in the "Mount point" column to give it a name (Storage, perhaps?), and hit "Apply." Check both boxes on the next window to allow

4 of 8

25-Jan-13 1:06 PM

Dual-Boot Windows 7 and Ubuntu in Perfect Harmony

http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfe...

read/write access, and hit OK, and you're done. Now the drive with all your stuff is accessible to Windows and Linux at all times.

Adding swap to Ubuntu


"Swap" memory is a section of the hard drive that your system's memory spills over into when it gets full and busy. Until recently, I'd been creating a whole separate partition for it. Recently, though, I've found that swap isn't always necessary on systems with a large amount of memory, and that swap can simply be a file tucked away on your hard drive somewhere. Follow the Ubuntu help wiki's instructions for adding more swap, but consider changing the location they suggest putting the swap file/mnt/swap/ for the place your Storage is held/media/Storage, in my case.

Share Firefox profiles and more


That's about it for this guide to setting up a harmonious Windows and Ubuntu existence, but I recommend you also check out our previous guide to using a single data store when dual-booting. It explains the nitty-gritty of sharing Firefox, Thunderbird, and Pidgin profiles between Linux and Windows for a consistent experience, as well as a few other dual-boot tricks. You might also want to consider creating virtual machines with VirtualBox for those moments when you're in one OS and need to get at the other. Ubuntu is free to create as many instances as you want, of course, and Windows 7 (Professional and Ultimate) are very friendly with non-activated copiesnot that either can't be otherwise activated in cases where it's just a double-use issue. What'd I miss that makes Windows 7 and Ubuntu 9.10 get along even better? What needs clarifying or fixing? Tell us your questions and solutions in the comments. Contact Kevin Purdy:
DISCUSSIONS

EMAIL THE AUTHOR

COMMENT

FACEBOOK

TWITTER ALL

FEATURED

Discussion now closed.

Platypus Man

12 Nov 2009 9:51 AM

I have Ubuntu 9.04 with my Windows XP machine, but I installed it through Wubi, which allows you to boot into either, but it treats Ubuntu as a program within Windows. I'll be upgrading to Windows 7 in December and I'd like to do the same thing with Ubuntu 9.10. You say that Windows 7 doesn't work well with Ubuntu, but does this apply to a Wubi installation? Also, having used the Wubi thing for about a year now, I don't see any drawbacks (other than the fact that it can't hibernate, but I never do anyway). While I'm here, are there any drawbacks to doing it this way that I don't know? #windows7

mjschmidt @Platypus Man

@Platypus Man: I've been running Ubuntu alongside Win7 via Wubi since April. #windows7
TheFlyingFish @mjschmidt

@mjschmidt: Does Wubi slow down the operating speed of Ubuntu at all? Last year I tried Ubuntu, but the only way I could get it to install was via Wubi. (the live CD just froze up whenever I told it to try Ubuntu without changing my computer or to install Ubuntu.) It ran rather slowly; I thought it was Wubi causing that. #windows7

5 of 8

25-Jan-13 1:06 PM

Dual-Boot Windows 7 and Ubuntu in Perfect Harmony

http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfe...

Squiddles @Platypus Man

@Platypus Man: I've got Win7Pro x64 and I installed 9.10x64 through Wubi. I haven't noticed anything wrong in Ubuntu yet. The install works just as before. Run Wubi, let it do it's thing, restart, and find Ubuntu in the boot loader and let Ubuntu do it's thing once launched. #windows7
Platypus Man approved this comment

Ajh @TheFlyingFish

@TheFlyingFish: Ubuntu has some interesting system requirements. I've never noticed Wubi to slow it's performance at all. Did you try something lighter like Xubuntu? #windows7
Ajh @Platypus Man

@Platypus Man: It works on Vista. It should work on 7. Everything that works on vista so far seems to work on 7. #windows7
oyumurtaci @Platypus Man

@Platypus Man: AFAIK Wubi doesn't play nice with Win7. To even get it to register in the boot menu, it needs to be installed in Vista compatibility. Then it spurts out an error about the hard drive, telling me to look for hda0,0 among devices. So far the only workaround I have managed to get is to install 7, then dual boot XP, install wubi in XP and restore the XP bootloader, which then takes me to grub, which boots into 9.10. And then I can't access 7 until I boot into XP again for some reason. So far, not good. The advantage to running a clean install of Ubuntu as opposed to Wubi is a faster system (both boot and in use), better stability with programs (especially if you're fond of KDE and programs associated with the K environment) and a clean Ubuntu is a great tool to fall back on if you screw up something with either XP, Vista or 7 (mostly for reckless tinkerers like myself). On XP, I've loved Wubi, but Wubi on 7 seems to have a ways to go before prime time. #windows7

dstoker @Platypus Man

@Platypus Man: I installed Ubuntu on my Windows 7 laptop just the other day using Wubi and it installed just fine. There are still a couple kinks to work out with the actual Ubuntu installation but thats because of my hardware. #windows7
JemimaCalyce @Platypus Man

@Platypus Man: There are a only a couple drawbacks. Primary is if the Windows partition fails, you lose everything. Second is it runs a wee bit slower than on its own dedicated partition. Personally I like separate partitions as it gives me more control and also more protection in case I want to upgrade one or the other without redoing everything. In my opinion, either way serves the same purpose so it's all good in the end.
Platypus Man approved this comment

RipRapRob @Platypus Man

@Platypus Man: Performance! You are running Ubuntu inside Windows, and since both operating systems is running simultaneously, the two operating systems is sharing the CPU-cycles and RAM on your PC. Dual booting however, gives Ubuntu exclusive access to CPU-cycles and RAM, and thus;

6 of 8

25-Jan-13 1:06 PM

Dual-Boot Windows 7 and Ubuntu in Perfect Harmony

http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfe...

better performance. If you have a really powerful PC, and you don't run demanding applications in Ubuntu, you might not notice Ubuntu running slower than it could, if it had full access to all the power on the PC. #windows7
promoted by Platypus Man

Orca239 @Platypus Man

@Platypus Man: I'm not very knowledgeable about this kind of stuff, but I think I read somewhere that if a crash or power loss or something occurs while using a Wubi install, something will most likely be corrupted... or something like that. I think the point was that Wubi was more like a test to see if you wanted a full OS install of it. Could be wrong, though. #windows7 Platypus Man approved this comment
mjschmidt @oyumurtaci

@oyumurtaci: Look up. I justsaid I've been running Win7 and Ubuntu (under Wubi) since April. #windows7
mjschmidt @RipRapRob

@RipRapRob: I've had NO problems or slowdowns with Ubuntu installed with Wubi, and no, it's not running in windows. When I boot my machine I get to choose which OS to boot into. When I choose Ubuntu, windows doesn't even get the chance to load, because I'm booting into Ubuntu. They are not running simultaneously. #windows7
Platypus Man @RipRapRob

@RipRapRob: You're thinking of a virtual machine. Wubi, instead of partioning the hard drive for Ubuntu, installs it as a program within Windows. It has its own folder in C:\ and can be uninstalled like any other "program," but when you turn on your computer, you boot either into Windows or Ubuntu. The two OSs aren't running at the same time. #windows7
BishopBlaize @Platypus Man

@Platypus Man: Wubi is great, im really surprised it doesnt get more props. If you wanna try out linux as many do, seems like a much better way of doing that than running a LiveCD. Its also a great option for getting ubuntu at work. #windows7
oyumurtaci @mjschmidt

@mjschmidt: Then I guess it's just my luck... #windows7


RipRapRob @Platypus Man

@Platypus Man: Thank you for that clarification. And sorry for the confusion. I had a short look at Wubi a while ago, and when I read the part about installing as any other Windows application, I assumed it also ran as any other Windows application. I'll just keep quiet now :o( #windows7

hildebrandj @RipRapRob

@RipRapRob: I have to wonder when you'll really need access to both OSes at the same time. Normally I only need to run the sim when I'm doing something M$ like, or iTunes. Otherwise,

7 of 8

25-Jan-13 1:06 PM

Dual-Boot Windows 7 and Ubuntu in Perfect Harmony

http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfe...

I'm in Linux exclusively. #windows7


mjschmidt @hildebrandj

@befuddled9: And in case anyone was wondering, yes, you can access your Win files from within Ubuntu, and vice versa (just not as easy to access Ubuntu files from within Windows). #tips

blaszta @Platypus Man

@Platypus Man: yup, same with me. Why don't use Wubi instead? One thing that might be a problem if you need to reinstall/clean upgrade your Windows..

Caerus @Platypus Man

@Platypus Man: I've done this before and it definitely hurt performance on my machine, even when I wasn't using Ubuntu. Had plenty of space, memory, etc. it just slowed me down way more than a "normal" program of similar size. This happened on both my netbook and my husband's desktop, so it wasn't just my computer. Could certainly have simply been a bad setting somewhere that I'm too much of a newbie to change, but for me it was very bad for performance.

Do Everything With a Raspberry Pi, Switch to an Online Bank, and Get a Job You Love

We Came, We Spun, We Dubstepped: Gawker Does SoulCycle

All Football Players Are Suckers: An NFL No-Namer On His Catfishy Moment

Play The Cave. You'll See Awesome Art Like This.

Ten Reasons Why It's Not Pathetic for a Grown Woman to Go See NKOTB

What food has the MOST calories per ounce?

Engineer Dad Builds His Son The Best Toy Car We've Ever Seen

US Military Will Install Laser Turrets on Bombers and Fighter Jets

About

Help

Jobs

Legal

Privacy

Permissions

Advertising

Subscribe

Send a tip

8 of 8

25-Jan-13 1:06 PM

You might also like