User Guides Installing Windows 7 RC 7100 and Ubuntu 9.04

[size=+2]Foreword and Introduction:[/size]
On the 21st of August, 2008, I released my first tutorial on dual booting Windows XP and Ubuntu/OpenSUSE Linux. The tutorial was well received, too well I must say, judging from the number of hits, and the feedback I received. Although Windows Vista was the prevalent OS at the time, I refrained from writing a tutorial on dual booting with Vista as I personally felt that it was another Windows ME. A lot of water has flown under the bridge since then, and we now have a shiny new Windows OS in the form of Windows 7 (RC 7100 at the time of writing this tutorial), which I must say, looks and feels far better than it's predecessor. A month back Canonical also released their new version of their flagship OS, Ubuntu 9.04. This tutorial is intended to guide newcomers on partitioning and installing Windows 7 RC 7100 and Ubuntu 9.04 on their new or existing PCs.

One of the important differences between this tutorial and my earlier one with Windows XP is the compulsory use of a third party bootloader in dualbooting with Windows 7/Linux, due to issues using GRUB on the MBR. If this is too technical for you to understand don't bother, just follow my tutorial step by step and you'll be fine. As before, I have used a lot of screenshots, and I would strongly recommend that you either have a hard copy of this in hand before you start, or have it open on another system.
[BREAK=Assessing your hard disk, partitions]
Assessing your hard disk, partitions
While installing Windows 7 to a new/clean hard disk, you might have noticed that the installer automatically creates a system partition BEFORE the C: drive as shown below.

The system reserved partitin should not be disturbed, lest your Windows become unbootable. You cannot see this partition when you open My Computer in Windows 7.

To install linux on your PC you should first make some free space available on your hard disk for the install. Click on Start->Control Panel->System and Security->and Under Administrative tools click on "Create and format hard disk partitions"



I present two hypothetical scenarios that you might have. The actual partition sizes will vary with the capacity of the hard disk. I have taken a 160 GB hard disk in my example.
  • You only have one C partition of 20 GB and the remaining part of your hard disk is "unallocated" as shown below
  • Your full hard disk is occupied by windows partitions as shown below

If your partitioning scenario resembles the first (I'll refer to it as scenario 1 from now on), then you have a lot of free space on your hard disk to do as you please. You may allot more space to Windows 7 by right clicking on the unallocated space and creating new partitions, or you may use the entire unallocated space for Ubuntu. However it is more likely that your hard disk partition set up resembles scenario 2 :) In that case you have to right click on one or more of the partitions at the end to free up space to install Ubuntu. First back up the data on the partition you want to delete, and then right click on the partition and delete it as shown below.



Note the colour code that Windows Disk Management System uses for various partitions, dark blue for primary partitions, deep green for the extended partition (see the rim around E: and F:), light blue for logical partitions, and light green for free space. Know this, that there can only be four primary partitions in a hard disk. If you would like to have more than four partitions, you have to use logical partitions as has happened in scenario 2. Windows and linux use different ways of naming partitions. While you would just refer to partitions as C:, D:, E:, etc in Windows, A; and B: being reserved for floppy drives, in Linux we refer to them as /dev/sda1, /dev/sda2, etc. for the first, second, and subsequent hard disk partitions. As you can see, in scenario 2, the first partition is a System Reserved partition, and windows has not assigned it any drive letter (alphabet like A, B, C, or anything else). However, linux will not make such a distinction, the first partition is always /dev/sda1, and so in the case of Windows Vista or Windows 7 being your first/primary OS, the C: drive will actually correspond to /dev/sda2, as the first partition, /dev/sda1 is a System reserved partition. Now, I told you that we can have only four primary partitions in a hard disk. So for linux, these would be /dev/sda1, /dev/sda2, /dev/sda3, and /dev/sda4. The first logical partition would number from /dev/sda5, /dev/sda6, etc. This is why linux ALWAYS assigns /dev/sda5 to the first logical partition, irrespective of the number of partitions preceding that.

The idea is to free at least 20 GB for our linux install. This might seem like a lot and other's might disagree, but if you are looking for a full experience I'd recommend it. We will later need this space for creating three partitions.

Swap - Space=1.5 to 2 times your RAM
Root (designated as /) - stores your OS and system files, programs, etc. - Minimum space approx 8GB
Home (designated as /home) - like the Documents and Settings folder of Windows XP or the Users folder of Windows 7. Stores your preferences, bookmarks, wallpaper, My Documents and Desktop. - Space - remaining space

The / is like the base directory in linux, into which all other directories (folders) are incorporated or "mounted". I took a very long time to understand the concept of "mounting". Don't worry about it for now, you will understand when the time is right.

Resizing Partitions is something I do not recommend with any tool unless you have uninterrupted power supply in your part of the country/world or a power back up solution that lasts for a few hours.
[BREAK=Hardware Check]
[size=+2]Hardware check[/size]
With the advances in Linux and the new kernels this step may not be necessary, but will help you in troubleshooting later if required.
Click on Start->Control Panel->System and Security->System->Device Manager
Make a note of the model numbers of your monitor, graphics card (display adapter), and any other devices.

If possible, note the horizontal and vertical sync values of your monitor. These can be found in the manual of the monitor and may be required should you have display problems.
Alternatively you can use a third party software like SiSoft Sandra Lite to probe your hardware and make a list by hand.
[BREAK=Installing Ubuntu Linux]

[size=+2]Installing Ubuntu Linux[/size]
You are now going to install Ubuntu Linux to the empty space on your hard disk that you prepared in the earlier step. Linux by itself is not a single monolithic entity unlike some popular operating systems. It is very much a collaborative effort. It consists of a core (also called a kernel) on which the entire system is built on an runs. Linux is modular. As you become more experienced, you will realise that you can add and remove modules depending on your requirement and create a highly customised system. No hidden agandas, no long cryptic EULAs (the thingy which you blindly scroll down and click "I agree" without batting an eyelid) - just freedom.
So let's get started !!

Ubuntu CDs are available for free from SHIPIT
You can also download it from Ubuntu website or ask a LUG (Linux User Group) near you.

To boot from the cd or dvd your bios should have it as the first boot device. Alternatively some bios allow you to select the boot device. The key used for this varies with different manufacturers. To see if your bios has a boot device select menu please refer the manual of your motherboard or take help from a more experienced friend.

I suggest you try the following - insert the cd or dvd and start your pc. If your pc boots too fast simply restart windows with the cd or dvd in the drive and see what happens. Very often the optical drive would have been set as the first boot device and the system boots from the cd automatically. If it still goes to windows and refuses to boot from your cd or dvd then you will have to adjust your bios settings or search for a boot menu as I described earlier.

If your pc boot successfully from your ubuntu cd you will see this screen



It is prompting you to select the language. Use your arrow keys to select the system language and press ENTER. You will then get this screen



Use the Up and Down arrow keys on your keyboard to select the option Install Ubuntu and press ENTER. The system will start booting.



You will see the Welcome screen in your language. Make sure your language selection is right and click forward



Select your timezone from the list, it is arranged by continent, and click forward



Select your keyboard type, most common is US International (see picture below), but make sure and use the test box made available to you to check your selection. If it does not work try USA -International with AltGr dead keys like I have. I advise you to select this if you use US Intl in India. Check not only for alphabets, capital and small, but also for special characters like ' " ? / + ; If all these are correct then your choice of keybord layout is fine, click forward



You will now be presented with the partitioning options. Ubuntu "intelligently" offers to resize your windows partition and do everything automatically. I advise AGAINST using this option, and instead select the manual option and click forward



You will now come to a screen which shows you the layout of partiitons on your hard disk. Just as I mentioned earlier, note the nomenclature used in linux. The first hard disk is labelled as /dev/sda Partitions within this are labelled as /dev/sda1 /dev/sda2 so on and so forth. /dev/sda2 is the C drive and has an ntfs filesystem, whereas /dev/sda1 is the system reserved partition and has no drive letter.


or

How you proceed from here will now depend on your existing hard disk partitions, and how much space you are willing to allot for Ubuntu.
Select free space and click on the "New Partition" button as shown below

Scenario 1

Scenario 2


Select type of partition logical, size 20000 MB (scenario 1) or 20000 MB (scenario 2), location for new partition Begining, Use as: Ext 4 journaling file system, mount point: / and click OK

Scenario 1

Scenario 2


The proposed partition table layout will get updated as shown below:
<table>Scenario 1


Scenario 2


Again select free space and click New Partition. Select type of partition logical, size: Note the size mentioned, and subtract the amount of space you would like to dedicate to the swap partition. In my case I subracted 1000 MB from that figure. Swap space is recommended to be 1.5 times the amount of RAM you have, so if you have 1 GB RAM, 1-1.5 GB swap should do. Location for new partition Begining, Use as: Ext 4 journaling file system, mount point: /home and click OK. Note that you will manually have to type in the mount point in the box provided as /home

Scenario 1

Scenario 2


The proposed partition table layout will get updated as shown below:
Scenario 1


Scenario 2


Again select free space and click New Partition. Select type of partition logical, size: no change if it is roughly 1.5 times your RAM, location for new partition Begining, Use as: swap area, and click OK
Scenario 1


Scenario 2


This is how your proposed partition table layout finally looks like.
Scenario 1:


Scenario 2:


Remember, nothing has actually happened to your partitions as yet, this is just a proposed layout, so if you make a mistake in your newly created linux partitions you can simply go back and redo the partitioning. Make a note of all the partitions (numbers) on a piece of paper, especially the root partition.

-------------------------------------------------------------------------------------------------------------
Edit:
Mounting Windows partitions:
This is something I forgot to write about in the original tutorial. Note your windows partitions and filesystems in the partition table. They will be marked as ntfs or vfat/fat32. If you have a 100 MB fist partition as is the case here, skip it as this is the boot partition (/dev/sda1). Select on /dev/sda2 or as is in this case, /dev/sda5 and click edit partition.


Against Use as:, click Do not use this partition and change the filesystem to ntfs or fat32, depending on what you read in the proposed partition layout. It is ntfs in this case. Make sure that you do not tick Format this partition.


Enter a suitable mount point. In this case I have entered /windows/c as this is my C drive in Windows 7.


Repeat the above steps for each windows partiiton assigning new mount points for each, so that the final proposed partition layout looks like this

End Edit
---------------------------------------------------------------------------------------------------------------

Click Forward. You will now be asked some details about yourself. You will have to give a password. Make sure you don't forget it. Click Forward



If your password is not strong you'll get the following prompt. You may choose to ignore it and continue or go back and change your password.


Import your windows settings. This is optional you can leave it unchecked and click forward. There is a chance that this step may not appear.

You will now be presented with an overview of the install parameters. Before you proceed you will have to change the install location of the GRUB bootloader which will otherwise get installed to the MBR, and everything will go to hell.



Click Advanced, and in the dialog box that opens click on the dropdown list and select your root partition, and click OK.


&nbsp

Click Install, the installation will begin with the formatting and copying of files to your hard disk.

&nbsp
&nbsp


At the end of installation click on the Restart Now button


As the system shuts down, you will get a message telling you to remove the cd from the drive and press ENTER to reboot the system, which you must do.

Your PC will boot directly to Windows, as the GRUB bootloader has been installed to the root partition. We will now have to install a third party bootloader, the GAG bootloader.


Press 4 to install GAG. You will get this screen



Select your keyboard (usually 1 in India)

then your language, 8



You will then come to this screen. press S to setup the bootloader



The alphabets you have to press to execute a function are highlighted in red in the GAG set up screen. Keys are case insensitive. Press A to add an operating system



As you can see, partition A is the floppy, B is the first ntfs windows partition (which is the boot, system reserved in Windows 7), and the second ntfs windows partition is C, so press B



You will now have to type a name, say Windows 7


You will have to now type a password, optionally, so press ENTER to avoid giving one


You now have to select an icon, Press C for windows


Now you will come back to this screen


Press A to add an operating system



Now if you remember the first partition you made for linux was root (/), to which we installed GRUB. So the alphabet you have to press corresponds to the first "LINUX EXT2" partition in the list you see onscreen. Do that. Simple !

You will now have to type a name, say Linux


You will have to now type a password, optionally, so press ENTER to avoid giving one


You now have to select an icon, Press D for Linux


Now you will come back to this screen


Press H to save in the hard disk, you will get this message, press ENTER



Press R to return to the main menu, you should see this



Extra options in the setup include setting a timer for a default OS to boot.
Read the index.html file in the docs folder of the gag file you downloaded.
[size="+5"]All the best !!![/size]
PDF version of this guide
-------------------------------------------------------------------------
This is a copy of the tutorial published on my website on
88x31.png

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 India License
 
Good stuff, repped :)

Question: Why go for GAG and not the default/usual sequence of installing GRUB to MBR? You could have the normal/usualy way and also mention this GAG thing as an optional step... is there a reason for saying "all will go to hell" with GRUB installed as MBR?

Noobs will needlessly have to go for an extra step of installing GAG thinking this is the normal/usual way then when something goes wrong and they need community support, people will tell them to take a hike :D

This one? -> GAG, the Graphical Boot Manager - looks technically nice, but screenshots are fugly :p
 
Ok

All I have read is this one
Howto Boot Grub from windows - Super Grub Disk Wiki

Looks too complicated.

The advantage of using a third party bootloader and NOT having GRUB on the MBR is that you are insulated from anything that affects your GRUB, like kernel updates. I have had my Ubuntu (earlier versions) broken by kernel updates when the GRUB entries fail to get updated properly. If you use a third party bootloader, you'll at least be able to use the system and try to repair GRUB later. So each OS in it's own partition with it's own bootloader, and one master bootloader taking care of them all, that makes me feel safer.

Then offcourse it's a matter of choice !
 
Right I was thinking that if you follow the normal Ubuntu installation procedure, you get GRUB in the MBR with an entry to boot into Windows...

You can then use the "startupmanager" package to adjust GRUB settings like background image, default OS to boot, timeout etc...

So you can boot into both Windows and Linux, no need for the Vista boot loader...

Although I've read about possible problems if things like BitLocker are enabled in Windows...
 
I haven't faced the problem if there is no system reserved partition as above. If you format and install into an existing Windows XP partition you will not face the problem as the system reserved partition is not created.
Does your Windows 7 install have a system reserved partition before C:?
Why I ask is when you install Windows 7 to a clean hard disk with no partitions, it forces you to accept that first partition that you seen in the first few screenshots of the tutorial.
 
Oh, no such thing with me so far - I've installed on a hard disk with existing partitions - no repartitioning done.

If this is true, looks like Microsoft is up to its dirty tactics as usual to try to mess up Linux dual booters :) This will nicely frustrate newbies who want to try out Linux...
 
Back
Top