Anda di halaman 1dari 42

How to install Windows 7 and Ubuntu side by side

Anyhow, today, we will learn how to install Windows 7 AND Ubuntu, side by side on the same hard disk, in what is known as a dual boot configuration. In the Ubuntu installation guide, I have romised you we would do this, so here we are. !.". #or more detailed information on new versions of both Windows and Ubuntu, lease consult the reading section below.

What are we going to do?


We are going to do what a ty ical Windows user would do$ We will install Ubuntu on a com uter that already has Windows 7 installed. We will have to accommodate s ace for our Ubuntu installation. %o this end, we will use the &!arted artitioning tool to resi'e (shrink) the Windows installation and create new artitions for Ubuntu. After Ubuntu is installed, we will have to deal with an error * a ty ical case of unbootable Windows, a common roblem that can occur when the Windows installation is changed. We will learn how to deal with this roblem sim ly and efficiently using the built*in tools, fi+ing the Windows boot issue. In the end, we will have the two o erating systems installed side by side in a dual boot configuration, both working ha ily. %his tutorial is critical for any Windows user considering running ,inu+ alongside his-her installation. Not only will it teach the user how to inter ret the hard disk layout and change it safely and smartly, it will also e+ ose the user to a seemingly catastro hic boot failure, which we will solve. %his e+ercise in dual*booting is as real as it can get. #ollow me.

Preliminary reading
%o be able to fully en.oy this tutorial and follow all its minute details, you must invest some time in reading older material, on which this guide is based. ,ots of technical lingo in this tutorial references to detailed, ste *by* ste instructions resented in the dedicated Windows 7 and Ubuntu installation guides, as well as additional tutorials. !lease do not ski this section. While you can use this guide without any e+ternal hel , you will greatly benefit from studying the other articles. %hey will teach you the vital, fundamental basics in o erating system installations, disk management and boot loading rocedure. Windows 7 installation guide Ubuntu installation guide &!arted artitioning software * #ull tutorial &/U0 bootloader * #ull tutorial Dual booting * Windows 1 ,inu+ (based on Windows 2! 1 3ubuntu) Now, let us begin.

Scenario: Windows 7 is installed


%his is the classic case. A Windows user, who has already installed Windows on his-her machine would like to try ,inu+. %he user has heard of Ubuntu, which comes as no sur rise, since it is the most o ular ,inu+ distribution available. %he user downloads the Ubuntu live 4D image, burns it to 4D * and the fun begins.

Things to consider before trying Linux


Windows users need to consider carefully the ros and cons of testing a new o erating system on their hardware. !lease go through the following list and see if any of the issues mentioned might be of concern for you. There might be hardware issues ,inu+ distributions have good hardware su ort in general, but there5s no such thing as erfect. 6ou may be the unlucky erson whose hardware is incom atible with this or that edition of this or that ,inu+ distribution. %his can cause roblems in getting the o erating system to boot or you might have to deal with missing drivers after the installation.

%he same holds true for Windows, but Windows usually comes reinstalled and you get a load of drivers when you buy a new com uter. 3ee this in mind before venturing into uncharted territories. Windows and Linux are different Windows users have a notion of how things work based on their former e+ erience with com uters, mostly revolving around one or more Windows releases. %he ,inu+ o erating system is different. 7astering it takes time and atience. Do not e+ ect to become e+ erts overnight or be able to solve all your roblems early on. At all times, you must remember that the two o erating systems are different, they behave and act differently. ata loss Whenever you5re about to change the e+isting installation, there5s a risk of data loss, regardless of which o erating system you5re about to install. It is im ortant to make sure you have your critical data backed u to e+ternal media. 6ou should also verify that your backu s are intact and that they can be restored. %herefore, to install Windows and ,inu+ together, you need to be confident your data is safely backed u and you need to understand that there might be hardware issues with your installation. ,ikewise, the methodology to solving the roblems will differ from you5re used to in Windows. As long as you kee these things in mind, your dual*boot e+ erience will be a leasant one.

!oot into Ubuntu li"e #

session

8ery fortunately, Ubuntu (as many other ,inu+ distros) comes as a bootable live 4D. %his means you can boot Ubuntu and test the hardware com atibility, without making any changes to your e+isting installations on the hard disk. %his is an e+cellent feature that lets you lay with the o erating system, get the first im ression, check different a lications, and make sure all your hardware is ro erly detected. %his is what we will do. 0oot into live 4D, make sure everything works, then roceed with the installation. #ollowing the instructions in the Ubuntu installation guide should have you logged into the Ubuntu live session in the matter of minutes$

7ake sure your wired and Wireless network ada ters are functioning, make sure your 0luetooth, Web camera, sound card, and ossibly the gra hics card all work as e+ ected. %his is the first ste to ensuring smooth and ainless installation and ost*install e+ erience. If you need guidance how to test all these, lease refer to any one of my ,inu+ distro reviews, including Ubuntu 9.:; and Ubuntu <.;= in articular. >nce you5re sure everything is ready, you can begin the installation. %ruth to be told, you should N>% start the installation immediately, but we will do this anyway. I want to show you how an average user might act and follow his-her train of thought. !lease note, it is okay to start the installation, but there is an ever better and smarter way to a roach the task. We will soon learn why and how. #or now, let5s double*click on the Install button. %his will begin the Ubuntu installation.

Pre$are

is% S$ace &Partitioning'

%he most im ortant ste of the installation is "te =$ !re are Disk " ace. In technical terms, this is called artitioning.

,et us first e+amine the current situation$

Windows 7 is installed
Ubuntu wisely informs you that %his com uter has Windows 8ista (loader) on it. &ood. %his means that Ubuntu recogni'es the e+isting installation. Do not be confused about the Windows 8ista terminology. Windows 8ista and Windows 7 use the same bootloader, hence the ?erroneous? notation. %his will definitely change in the coming version of Ubuntu. %ake a look at the e+isting layout. %here5s a small, :;;70 Windows system artition resent and another :@.A&0 artition in use, lus some free s ace. If you recall the Windows 7 installation, these are e+actly the artitions we created, both rimaryB

We now know that we should not touch or alert the small Windows system artition, but we might be able to resi'e (shrink) the big N%#" artition in order to accommodate more s ace for Ubuntu. "o far so good.

,et5s see what else the installer offers us$ %he default installation choice is to install Windows and Ubuntu side by side. &ood. %his is what we want. Ubuntu even suggests its own recommended layout. While it looks Cuite >3, I do not think you should acce t it. I think that artitioning is too im ortant to leave in the hands of an automated installer. %his is a task that you need to do manually, carefully e+amining each and every ste . "o we should choose the third o tion, " ecify artitions manually (advanced).

Now, we need to manually edit the artitions.

Planning is e"erything
0efore you make any change, let5s e+amine the image above some more. Again, it5s the same thing from before, only shown in the table form rather than as a gra h ribbon. We have two artitions on the disk, sda: and sdaD, both rimary, both formatted as N%#". %here5s also some free s ace. What more, sdaD is also Cuite free, with less than half occu ied by Windows 7 files. We have several o tions$ (nstall Ubuntu into the free s$ace %his is the sim lest choice. We will have to create the E+tended artition and then create three logical artitions inside it, one for the root filesystem, one for home and one for swa . %he A.@&0 free s ace is enough for a Ubuntu installation.
)ote: >n a

roduction system, the free s ace might have been occu ied by one or more e+isting artition, maybe a #A%@D or N%#" artition used for data in Windows or maybe a revious ,inu+ installation. Whichever the case, you need to 3N>W what5s there, correctly match data seen in Windows to what you see in the installer and make your choice.

Shrin% Windows and create a new layout %his is also an o tion, somewhat more com le+. ,et5s say we want more than the free s ace we have. %his means we will have to make the Windows sdaD artition smaller. ,uckily, this can be done, because the artition is Cuite large and mostly unused. We will go for o tion (b), both because it is harder and because it more closely resembles reality, where most eo le do not lan ahead and have to work around the limitations of their installations. Which brings me to the most im ortant thing of all$ lanning is everything. !lan ahead, two, three, five years. It5s not easy or always ossible, but it5s a must for fle+ible, carefree com uting. 6ou need to think ahead and make sure your setu will be valid many years into the future. What am ( trying to tell you? 0efore you install any o erating system, think, think, thinkB Is this going to be a dual*boot systemF Will you be installing more than one o erating systemF If so, make sure you create a smart artition layout in advance and dedicate artitions to each instance. Not only does this make more sense, it is safer. 6ou won5t have to fiddle with e+isting artitions containing im ortant data. 6ou will be instantly ready for new installations, with artitions waiting for you. *ecommendation: If you5re going to create dual*boot layouts on your machines, then here are some golden rules that should serve you well.

4reate artitions using a dedicated artitioning tool like &!arted. Windows needs to be installed into rimary artitions. Windows 7 reCuires that its system artition be rimary. %he second artition can be logical, meaning it can be laced into the E+tended artition. 4reate artitions large enough so you won5t need to enlarge them. 4reate se arate data artition for Windows files and another for data. 4reate se arate ,inu+ root and home artitions. !ossibly create a artition for sharing of data between Windows and ,inu+. +xam$le: Gere5s the layout I would make. ,et5s assume a :;;&0 disk, so we can relate to artition si'es in relative terms ( ercentage). I will also use generic -dev-sda2 names for the artitions.

Windows 7 system artition * :&0 (sda:) E+tended artition * <<&0 (sdaD) Windows artition (Windows files) * D;&0 (sdaH) Windows data artition (user files) * A;&0 (sdaA)I you can share it in ,inu+ ,inu+ root * :;&0 (sda7) ,inu+ swa * /A7 si'e, let5s assume D&0 (sda9) ,inu+ home * remaining s ace (sda<) %his setu does not yield best erformance in ,inu+, because ,inu+ root and swa are toward the end of the disk, which is slower, but it makes sense for a ty ical dual*boot user. 4reating this setu AGEAD of any installation is a wise, healthy move. #an we use this recommended setu$ in our case? %he answer is$ no. We did not create the artitions using a third* arty tool like &!arted. We created the artitions using Windows 7 installer. Unfortunately, Windows 7 creates all new artitions as rimary. Gere5s a reminder$

"o, we will have to handle the situation a little differently. We still need three artitions for ,inu+ (root, swa , home). %here are already two artitions in use by Windows. %here can only be a total of four rimary artitions on any hard disk. %his means we must create the E+tended artition in the free s ace, including the e+tra s ace gained by Windows 7 artition shrinking, otherwise we must forgo either the use of se arate swa or home in Ubuntu. If ush comes to shove, Ubuntu can manage with .ust one artition, but this is not recommended. "o, the tasks at hand are$

/esi'e Windows artition (sdaD). 4reate E+tended artition * will be called sda@. 4reate logical artitions (root, swa , home) inside the E+tended * will be called sdaH, sdaA and sda7.

+dit $artition
>ur first task is to edit sdaD$

Sto$,

/emember the recommendation to use a dedicated artitioning toolF %his is what we5re going to do. We5re going to close the installer and use &!arted. We know what we need, the only thing left is to use the right tool for the right .ob * &!arted.

Use -Parted to create $artition layout


&!arted comes with Ubuntu. It can be found under "ystem J Administration J !artition Editor.

>3, let5s make sure we have everything we want and need$


Windows 7 data is backed u , check. We will resi'e (shrink) Windows 7 artition (sdaD). We will create the E+tended artition. We will create logical artitions. We will then resume the Ubuntu installation. ,et5s begin.

*esi.e &Shrin%' Windows )T/S $artition

If you5ve read my e+tensive &!arted tutorial, you know how to do this. It5s rather sim le. Gighlight the artition and click on /esi'e-7ove in the icon menu.

4hoose the new si'e. We5ll lake it smaller by some D&0.

>nce you a rove of the new si'e, click /esi'e-7ove. Nothing will ha en yet. &!arted will write down the task, but it will not run it until you click A ly in the main icon menu. %his is a good thing, as it lets you make new changes and cancel tasks.

#reate +xtended $artition


%he ne+t ste is to create the E+tended artition that will s an the entire free s ace, including the new D&0 freed from Windows.

#reate Linux $artitions


Ne+t, we will create the root, swa and home for Ubuntu. We5ll format the root and home with E+t= filesystem. !lease refer to the Ubuntu installation guide for more details.

/inal layout
%his is the final layout$

0$$ly the changes


%ri le check the layout, make sure you5ve done everything as you lanned. >nce you5re fully satisfied, click A ly and let the tool run. &!arted will start working. It will first run the shrinking task. &!arted is Cuite friendly. &!arted will first run a simulation to make sure it can do the desired task. %hen, it will run a consistency check on the N%#" artition and try to fi+ errors if it finds any, it will then resi'e the artition and co y all the data over. De ending on the chosen si'es and the disk s eed, this can take many hours.

Ne+t, it will create the ,inu+ artitions.

Success, If everything went as e+ ected, &!arted will com lete all of the task successfully. Gowever, lease note there is no guarantee that you will succeed. 6our disk may be damaged or there might be irre arable errors with the filesystem you5re working on. What more, &!arted might not be able to resi'e Windows artitions. /emember, artitioning is a very delicate rocedure. It may (and should) work. %hen again, in a few cases, it may and will fail. 6ou must be aware of this. ,uckily, we had no roblems.

)ew layout
And here5s the desired layout$

Now we can go back and resume the installation.

*esume installation
We will close &!arted and click on the Install icon once again. In "te =, we will now be seeing a whole new layout$

Again, we will use the third o tion (" ecify artitions manually). Ubuntu recommends yet another shrinking of the Windows 7 artition, but it is not necessary. We have all we need. We will now manually assign mount oints to our freshly created root, swa and home artitions.

Gighlight the artitions (sdaH*7) and assign them relevant mount oints. %here5s no need to format them again, because we .ust did that with &!arted.

Gere5s the final setu $

Warning %he installer will warn you that you5re not formatting the root filesystem and that it5s going to destroy any e+isting directories found there. "ince we know we5ve .ust created the artitions and want to use them for our new Ubuntu installation, this is ok.

>ur installation is ready.

0ut there5s one more thing to configure.

#onfigure bootloader
Ubuntu informed us that sda: contains 8ista (loader) on it. %his is e+ ected. Every o erating system must use some form of bootloader to start. When you5re running a dual boot system, you will have two o tions, using either the Windows bootloader or &/U0, which is the default loader in most ,inu+ distros, including Ubuntu. If you5ve read my &/U0 tutorial, you know that &/U0 can be used to boot both ,inu+ and Windows o erating systems. %his is what we5re going to do. We5ll use &/U0 and call on Windows 7 bootloader from it, which will then manage the Windows boot seCuence. %his is a standard rocedure in dual boot systems.

%he default setting is to install the bootloader, so you need not do anything. We5re ready. 4lick Install and let the rocedure com lete.

(nstallation com$lete1 en2oy your dual3boot


After you reboot the system following Ubuntu installation, you will now see the &/U0 menu, showing entries for both ,inu+ and Windows, .ust as we5ve e+ ected. %his is very similar to what we5ve seen with Windows 2! and 3ubuntu. Notice the ?erroneous? Windows 8ista entry. No matter, we can change it. "ee &/U0 tutorial for more details.

!oot Ubuntu
,et5s first boot Ubuntu. Indeed, everything works fine. ,et5s make some more checks. #or e+am le, if you go to !lace, you can see the Windows artitions in the list, called "ystem /eserved and ::.H&0 7edia.

And here are the contents of the ::.H&0 drive$

Now, let5s boot Windows.

!oot Windows
>o s, we get this horrible errorB

%his is e+actly what I wanted you to seeB Don5t anicB Whenever you use a artitioning tool against an installed system, there5s a chance of a roblem, filesystem corru tion and who knows what else. %here is no guarantee for success. /e* artitioning of installed o erating systems is risky. %his is why you should always create your setu 0E#>/E installations, so you never have to face this kind of roblem. What went wrong? Well, my guess is the resi'ing (shrinking) messed u the filesystem. No worries, we will fi+ it. ,uckily, we can solve this one rather easily. %he error message itself suggests the course of action * boot from Windows installation disc, choose ,anguage settings, click on /e air your com uter and let the built*in Windows tools do the .ob. ,et5s do it, then.

*e$air unbootable Windows installation

#ollowing the instructions, we will boot from the Windows installation disc.

4lick on /e air your com uter$

And you will see this menu$

,et Windows re air itself. It should do a retty good .ob. Indeed, we5re u and running. Windows 7 will start booting and recommend you run checkdisk against your disk, offering yet another hint that the resi'ing rocedure messed things u a little. 6ou should indeed let the tool run.

And soon, you5ll see the login menu$

And here we can see the changes in 7y 4om uter and the Disk 7anagement.

>ne thing that Windows 7 does not re ort correctly are the artition ty es for our ,inu+ artitions. It re orts all of them as rimary, for a total of five on the same diskB Im ossibleB 0ut this is a small glitch overall.

4ther Windows re$air 5 reco"ery tools


In case the automated Windows 7 self*re air does not work, you can use additional tools available via the /ecovery console. In addition to "tartu /e air, you can also try "ystem /estore, Image /ecovery, and even check the 7emory.

#ongratulations,
%hat5s it, we5re finally doneB We have our dual*boot system running. Windows 7 and Ubuntu are installed side by side. Everything works as e+ ected. We5ve even had to deal with a serious boot issue in Windows, but we managed it Cuite well. %his is a very im ortant lesson.

6ore reading
6ou might also be interested in the following$ Ubuntu :D.;= !recise !angolin review one and two and three Windows 9 reviews$ 4ustomer !review and Enter rise /%7 review Windows 9 without 7odern UI "tart menu interface Windows 9 recovery o tions

#onclusion
Dual booting Windows 7 and Ubuntu is not a sim le task. It reCuires attention to details and atience. And there is no guarantee that it will work. Gowever, if you follow the instructions carefully and invest time lanning your setu , you will en.oy a leasant, roblem*free e+ erience of running two or more o erating systems side by side. What more, even if you do encounter errors, you have the right knowledge and tools to solve them easily. Go efully, this tutorial has rovided you with the crucial knowledge and real*life e+am les to configuring a com le+, useful dual boot system. We will visit the conce t of dual booting once again when o en"U"E ::.D is launched. In addition to the standard installation guide for o en"U"E, we will again setu a dual boot system. 4heers.

Anda mungkin juga menyukai