Ubuntu / Windows Dual Boot 'A'
Installing Ubuntu in Hard Disk Two
This web-page is part of a larger site giving examples of how to install Windows+Ubuntu Linux operating systems 'dual boot' in a computer. Illustrated Dual Boot HomePage
'Hard disk two' can be any hard disk inside a PC computer, (IDE or SATA), or a removable disk such as any USB or eSata external disk.
This example of how to install Ubuntu shows you how to install Ubuntu in a separate disk. I started with Windows 7 in the first hard disk, and I installed Ubuntu Meerkat to the second hard disk.
This installation procedure applies to any version of Windows including Windows 7 and Vista, and recent versions of Ubuntu.
The computer used for this demonstration is one I assembled myself for less than half the price I would have paid for a factory made model with equivalent hardware.
It's a fairly standard computer, nothing too fancy, but it's capable enough to run Ubuntu and even Windows 7 or Vista. It has an ASUS P5QL PRO motherboard, and the CPU is an Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz. It only has 2 GB RAM at the moment, and the graphics cars is a GeForce GTS 250.
My regular Ubuntu installation is in an OCZ Vertex Series SSD which can boot Ubuntu in 3.03 seconds.
I'm leaving uplugged while I'm demonstrating these dual boot installations.
The CD used for this installation was made from ubuntu-10.10-desktop-i386.iso, which is downloadable from http://www.ubuntu.com/desktop - free download.
For relevant information, see Ubuntu 10.10 Maverick Meerkat Technical Overview - wiki.ubuntu.com
For a list of all Ubuntu Hashes, use this link, UbuntuHashes.
Checking the integrity of your .iso from a Linux live CD | Checking the integrity of your .iso in Windows
This installation will show you how to choose which hard disk or other device you want to have the GRUB boot manager's MBR code installed to. You may also optionally want to make a backup of the boot loader code area of your first hard disk's Master Boot Record and possibly also the first track of the hard disk.
Here's a link about how to back up and restore your MBR (optional), MBR backup and restore.
It's not advisable to install GRUB or any other boot loader to the MBR of a hard disk if Windows is using Bitlocker Disk Encryption or Symantec or McAfee Disk Encryption.
You may also want to take the precaution of downloading a copy of Super Grub Disk as well, just in case you have any problems booting at first after the installation.
Occasionally, computers with more than one hard disk do have booting problems at first, especially if they have SATA and PATA hard disks mixed together in the same computer, or if they have PATA (IDE) disks and the jumper settings are all messed up. Boot problems are generally easily fixed, but you might need Super Grub Disk to help you boot your computer for a little while until you get the problem solved.
In this installation we won't be using any partition editor to make any changes to partitions containing any other operating systems. The Ubuntu CD contains excellent software for doing so. If you do decide to resize any other operating system's partition you should always make a backup of at least your most important files before using any hard disk partitioning software.
If you need to resize Windows, you should run CHKDSK /R in an NTFS partition before and after resizing with GParted. Defragging does not matter, it's just a waste of time.
For a Windows 7 ot Vista partition make sure you do not allow GParted to align the partition on cylinder boundaries or it will take a long time and you'll need to adjust the boot loader, which will be time consuming and inconvenient.
If you want to install Ubuntu in a Macintosh computer or in a PC with some kind of RAID then please search for a special how-to for your particular requirements. I don't know anything about Macintosh computers or computers with RAID setups and following the examples shown here might not be good for your computer.
Booting the Live CDOkay, so we're going to boot the Ubuntu Live CD now.
We can expect to see a screen something like this screen for a minute or so while the Ubuntu Live CD is booting up.
TIPS for computers with MODEST RAM:
If your PC only has around 256 MB of RAM, your Ubuntu CD might boot and run very slowly.
You can still use the Ubuntu Live CD for installing Ubuntu with, and the trick is to make a swap area in a hard disk or in a USB flash memory stick or somewhere before you boot the Live CD.
The swap area is for the Ubuntu Live CD to use when it needs extra RAM.
The Live CD will search for the swap area in the other disk and find it automatically and that will dramatically improve the Ubuntu Live CD's performance.
You should be able to create a swap area somewhere first with some other Linux Live CD that doesn't require so much RAM to run, such as Parted Magic, or GParted -- Live CD. Then when you try the Ubuntu Live CD again you'll find it will work a lot better.
Otherwise you should try using the Ubuntu 'Alternate' Installation CD instead.
The Ubuntu 'Alternate' installation CDs can perform a minimal installation in a computer with as little as 32 MB of RAM.
Even better, go buy more RAM from somewhere. Memory for modern computers is quite affordable.
Often RAM for older computers is expensive to buy new, if you can still get it at all. However, it can be taken from other old computers that are being discarded, and often you can get it that way for free.
There are two decisions to make here.
The first decision is what language you would like to use?
The second decision is, do you want to skip loading the desktop part of the m'Desktop' Live/Install CD, or do you want to take a shortcut and go right to the installation?
Unless you have already tried Ubuntu out in the computer you want to install Ubuntu in, it's generally better to 'Try Ubuntu', to make sure Ubuntu works properly with the hardware in the computer you're booting it in.
Normally it does and that's good.
There can be computer hardware that is not made to suit all operating systems and if that's the case it's likely there's a way to solve your problem in Ubuntu Web Forums. If you do have a problem that's difficult, you may change your mind about installing Ubuntu in this computer and maybe try a different computer.
Ubuntu runs amazingly well in almost all computers though. :)
Starting the Installer
You can run Ubuntu from here without making any changes to your computer. I have another web page about that, - Live CD Page.
When you are ready to install Ubuntu, you may double-click on the 'Install Ubuntu' icon or else right-click on it and select 'Open' from the right-click menu.
ubuntu languages.png (above) - credit to Elabra Sanchez - (image under creative commons licence).
Ubuntu features language support for more languages than any other operating system.
Ubuntu language support link: Translations/ReleaseLanguages/9.10 - Ubuntu Wiki
Left: This will be the language for the operating system you will be installing.
If you have your computer plugged in to the internet while you are installing Ubuntu, it can automatically download updates while installing. Some updates could be bug fix updates and some could be important security updates, so we recommend you enable this under most normal circumstances.
'Third party software' means software that is not necessarily made by the same people as make the main parts of your Ubuntu operating system, but they are necessary to make Ubuntu work better. For example, Maverick Meerkat can play most music and videos immediately after installation. Earlier versions of Ubuntu could only play a few kinds of music and video file types without extra work to enable them the play a wider range of files.
Ultra security concsious people may want to install third party software later or not at all, maybe they don't care about music and videos. Strict GNU fans may decide to abstain from installing third party software for ethical reasons.
If you do enable these two options, you may notice a small increase in the time taken for the installation to complete if you have a slow internet connection. You won't need to do these things yourself later on after the installation is over, so you'll save time and effort in the long run.
This website has always been about how to specify your partitions manually, (advanced), so as usual, that's the only option we'll be using in this web page.
The other two options, 'Install alongside other operating systems' and 'Erase and use the entire disc' used to be the simpler options. In the past it wasn't worth bothering to make a web page for explaining them. They were too easy and anybody should have been able to figure out what to do.
Now though, in Maverick Meerkat's new installer it seems like they tried to make them even simpler than simple, but it seems to have backfired and they have inadverently made them confusing instead. I have taken a look at those two options and I have to say I can't recommend them to new users, thanks to kansasnoob for alerting us all to the problems in the following thread, Understanding the new live installer/ubiquity.
'Specify partitions Manually' is the only choice I think people should use for Maverick Meerkat.
We need to scroll up and down our list of disks and the partitions within them to find out where we want to install Ubuntu.
There's no such thing as a 'C: drive' in Linux, or any other drive letter, so just forget about it.
If you're new from Windows, you'll soon see why the Linux way of numbering disks and partitions makes a lot more sense.
My first disk is called /dev/sda in Linux speak.
My second disk is called /dev/sdb.
My third disk will be called '/dev/sdc', and so on ...
The first part, '/dev/' stands for 'device', and the second part, 'sdb', means hard drive b.
It used to be 'hdb' in the old days, for 'hard drive b', but they changed the 'h' to an 's' for reasons that are outside the scope of this how-to.
The partition in my sdb disk is /dev/sdb1.
If I had more partitions they'd be numbered /dev/sdb2, /dev/sdb3, and so on ...
Only primary partitions can be numbered 1,2,3 or 4, and logical partitions are numbered from 5 upwards.
If you're not sure what I'm talking about here, don't worry about it too much, it won't be important for this particular how-to. If you're curious you may use this link, Help on Partitioning.
Be very careful here because the viewing area devoted to displaying the very important disk and partition has been reduced in size to make room for fancy graphics. You need to use the scroll bar carefully to scroll up and down the list of disks and partitions.
My /dev/sdb1 partition contains an old NT File System (NTFS), which is empty and that's the one I want to install Ubuntu in today, so I just selected that one.
I'm going to delete the partition, so the entire disk will be free to install Ubuntu in.
It's important to have a backup of your data and be prepared to re-install any operating systems you might have on other disks in case you make a mistake and wipe the wrong disk. We're all human and people do make mistakes, so make sure you cover yourself.
If I had an external USB drive to install Ubuntu in it would have appeared in this list too.
The procedure for installing Ubuntu is exactly the same for installing in a USB external drive.
This installation example can be used just as well for somebody installing to an external drive.
All you need to do is select the desired drive from this list.
The next step is to select the free space for a place to create a new partition in.
Click on the 'Add' button because we want to add a new partition.
I need to reduce the size of the new partition to make room for a small swap area, so I have highlighted the number representing the size of the partition and I'm going to change that by 2000.
The size I set for my new Ubuntu partition has now been set to 2000 less, so I'll have room for a swap area of approximately 2 GB.
Linux shorthand for 'main operating system partition' is '/', and is roughly equivalent to a 'C:' drive in Windows talk.
In this screen I'm showing you how to tell the installer this will be the new / partition.
This will be the partition for the 'root' file system.
Linux operating systems are extremely versatile and they can be installed all in one partition or each folder can have its own separate partition.
Normally it's best to install all in one partition because as we all know, folders resize them selves automatically to accomodate any amount of files we decide to put in them and then shrink to exactly the perfect size when we delete files.
Partitions don't, so if you do decide to divide your installation up into many partitions you'll need to allow plenty of room for adding an unpredictable amount of files in each partition, and that will cost you some disk space.
You'll also have the file system overhead for each file system you decide to make, and your computer will almost always have a file system check to run in some partition or another almost every boot up.
Having the option of being able to install in many different partitions does have its advantages though.
One example of where it might be a great idea is when a computer has several hard disks of various sizes.
In a situation like that, parts of the operating system can be spread out over several hard disks.
Since the hard disk is now the slowest part of most computers nowadays, that would spread the work out over several different hard disks, each with their owen read and write heads and you might be able to get a lttle more speed out of your computer that way.
It's outside the scope of this how-to to show you how to install in more than one partiion and split the installation over more than one disk. My Netbook install page does show how to create a 'Separate /home' in a different drive though, Ubuntu NetBook Install.
Where Do You Want To Install GNU/GRUB?
GNU/GRUB Boot Loader -
By default, the GNU/GRUB boot loader will be installed in whichever hard disk Ubuntu thinks is your first hard disk, called '/dev/sda' in Linux terms. Usually, that's the best thing to do.
It is just the tiny boot.img plus the small core.img we're talking about installing somewhere, not the whole boot loader.
GNU/GRUB is made of three parts, the smallest is called boot.img, only 440 bytes in size, it fits inside a MBR or boot sector. The main job of boot.img is to point to core.img, which is much larger and is normally embedded in the first track of the hard disk. The core.img has a module to enable it to read it's home file system, (normally the Ubuntu partition), to find the /boot/grub directory where there is a large collection of other modules it can load, the largest and most important of those being normal.mod.
Normally, the boot.img is installed in the MBR of a hard disk, preferrably in the computer's first hard disk.
(ii) core.img - GNU/GRUB's core.img helps the boot.img to find the main GRUB files.
The core.img is designed to be embedded in the sectors following the MBR, in the first track of the hard disk which are normally left vacant. The first partition in a hard drive never begins until at least sector 63 by convention, so there's lots of room reserved there for boot loader code.
GRUB's core.img is for a PC is normally assembled from diskboot.img, kernel.img, pc.mod and ext2.mod by the grub-mkimage command, and it can be made of different modules to suit different machines.
(iii) GRUB's main stage2 files, normal.mod and _chain.mod along with grub.cfg and many other files are always installed in Ubuntu's /boot/grub/.
Refer - Details of GRUB on the PC - pixelbeat.org
The best choice for most people would be /dev/sda, the first hard disk.
That will mean the computer will be able to boot automatically right after Ubuntu is installed, and Ubuntu's GNU/GRUB boot loader will take over control of booting not only Ubuntu, but all the rest of the operating systems in the computer too. Normally that's the smartest thing to do, because GNU/GRUB is by far the best boot loader in the world.
There can be some drawbacks to installing GRUB to the first hard disk's MBR for a few people though, so in this installation I want to show you how to select dev/sdb, the drive I'm installing Ubuntu in (my second hard drive), as the drive I want GRUB's boot.img and core.img installed in.
This image shows the drop-down menu for selecting which hard drive's MBR we want to install the GNU/GRUB boot loader to.
In what disks should we not install GRUB to MBR?
Where else should we not install GRUB?
This image shows that I have /dev/sdb set as the target disk for GNU/GRUB's boot.img and core.img to be installed to.
Some computers can be difficult with the way their BIOSes number the drives.
The confusion starts when some people neglect to look at their jumper settings on IDE drives, and people who often plug and unplug drives tend to have more booting problems than others.
Added to that problem, some BIOSes tend to number SATA drives before IDE drives, while others number IDE drives first.
Even more confusion can occur when USB drives are added to the mix. A few computers BIOSes number USB drives before any other kind of drive. The message I'm alluding to here is that it can sometimes happen that GRUB gets installed to the wrong drive.
Usually if that does happen it doesn't do any harm, but you might need to boot with some other GRUB, such as Super Grub Disk or a GRUB2 Rescue Disk and re-install GRUB to another MBR to get things working properly.
You can also see the option there below the one I selected for installing GRUB to /dev/sdb1, which would be the boot sector of my Ubuntu partition. A few people might want to install GRUB's boot.img to a partition boot sector and not to a MBR. That's possible but it's not as good as installing GRUB to a MBR.
Click 'Install Now' when you're happy with your settings for device to install GRUB to.
This is the last chance to quit or go back without writing changes to the hard disk.
In this screen the installation process has started and changes are starting to be written to my hard disk.
Since this installation installed GRUB to MBR in the second hard disk, instead of the first hard disk, I will need to do something special to get my new Ubuntu operating system to boot.
If I have another Linux operating system with GRUB2 in it, I could boot into that and run 'sudo grub-mkconfig -o /boot/grub/grub.cfg' and use the other operating system's GRUB to boot my new Maverick Meerkat installation with.
Otherwise I might use GRUB from a CD or floppy disc, or some other kind of boot disc.
Another method that works for most, (but not all) computers is boot from the BIOS boot menu, the following link explains how to do that, How I boot from my BIOS , (by pressing a special key at the right time while the computer is booting up).
The Maverick Meerkat Live CD is pretty good at guessing what region of the world we may happen to be in.
Just check to make sure it has guessed correctly.
The important thing is to make sure the installer knows which time zone we're in.
For me it's 'Brisbane', and the Maverick Meerkat installer got that correct the first time.
Occasionally, the installer might guess wrong for some locations, so this screen is for letting people see what their proposed time zone settings will be and giving them a chance to alter them if needed.
If it needs changing just click on a different location on the map or else use the drop-down lists under the map.
Most of us use a US English type of keyboard, even in Australia.
If you have a laptop and you're not sure, you probably have a standard US type of keyboard, at least for the purposes of installing Ubuntu.
If you do have a special type of keyboard, you will probably know about it and you should take the time to scroll through these lists, you'll probably find it here somewhere.
I always just click 'Forward' for this one.
Step 5 of 7 - Who are you?
This panel asks me some easy questions.
I always make sure I choose a good secure password.
Here is a link to an easy way to choose a secure password that's easy to remember but hard to crack, password tip.
I could also press a key during the early stages of booting for a BIOS boot menu, offering me a choice of devices to try to boot and select my second hard disk. This is not the most convenient way to boot in the long run, but it will work okay until a better arrangment can be made.
A better arrangement would be to install GRUB to all hard disk's MBRs, that way you're always sure of getting a boot. Whether that's the best idea depends on your circumstances though.
This is the GNU/GRUB boot screen where we choose which operating system want to boot .
GRUB is fully customizable and you can have fun learning about GRUB, for more info on the GNU/GRUB boot loader, click this link, GRUB Page .
This is a screencap of my new Ubuntu desktop.
It's a good idea to open up our repositories and get an update, install the software we want, and start configuring, personalizing and customizing our Ubuntu installations.
Here's a link to a page with some information to get you started, Post-install Page.
a link to a very important new website, UbuntuHCL.org
That's the new Ubuntu Linux Hardware Compatibility Site.
No longer do we need to risk bringing our new hardware home after a trip to the computer store with our hard-earned cash only to find that the new hardware we bought isn't usable with Linux.
Help your fellow Ubuntu users by entering details of hardware that you own that you know does work well with Ubuntu so others will know what to look for when we go shopping for new computer parts.
Look in UbuntuHCL.org first to see what other Ubuntu users had to say about a computer hardware item you are considering before you go ahead with a purchase.
This is a screencap of the Windows 7 desktop just to show you it's still alright.