Dual boot Windows XP with Ubuntu Linux - using the Windows bootloaderThis is a featured page

Introduction:

This tutorial explains how to install Ubuntu Linux, on a Dell Latitude D420 laptop, that already has a working install of Windows XP professional, and then to dual boot both of them using the Windows boot loader.
I cannot guarantee that it will work with any other setup

***Warning: you can render your computer un-bootable and pretty much knackered by changing the configuration detailed below. Proceed at own risk, and with caution***

Requirements:

-Dell Latitude D420 laptop, with Windows XP professional SP2 installed.
-60GB hard drive (Ideally, can be smaller of course)
-CD Burner/Blank CD's
-Ubuntu Linux 7.04 (Feisty Fawn). Get it here. Details of how to burn it to CD will follow.
-SystemRescueCd. This is a Linux system on a bootable CD-ROM. Get it here. Details of how to burn it to CD will follow.
-ISO Recorder. This is software that allows you to burn CD images. Get it here.


Preparations:

-Download ISO Recorder here, and install it.
-Download Ubuntu Linux here. Once downloaded, right click on the file and select Copy Image to CD.
-In the Source section, select Image File. Browse to where you saved the downloaded Ubuntu Linux ISO file.
-In the Recorder section, select your CD burner. Click finish.
-The CD will eject when finished.
-Download SystemRescueCd here. Once Downloaded, burn the ISO file to CD as explained above.

-Hard disk Preparations - Using the SystemRescueCd to create the correct partitions on your hard drive.

My hard disk had 1 NTFS primary partition with Windows XP installed on it, an extended FAT32 partition and around 11GB of unused space.
Your configuration may differ, you should adjust your partition sizes to how big your drive is. You will basically need your hard disk to be set like this, my configuration:

NTFS Partition (where Windows is already installed)
Linux Ext3 Partition (where we are going to install Ubuntu)
Linux Swap Partition (this should roughly be twice the size of your R.A.M.)
Fat32 Partition (used to share data between both operating systems)


-Restart your computer, and when you see the Dell welcome screen (big blue letters saying Dell) press the F12 key, to enter the one time boot menu

-Make sure you have the SystemRescueCd in your CD drive.

-Once in the boot menu, use the arrow key to highlight CD/DVD/CD-RW Drive and press enter, the computer will now boot from the .SystemRescueCd.

-It will prompt you to hit enter to boot, so go ahead, hit enter. SystemRescueCd will now load. It may ask you for keyboard configuration, Just hit enter for default.

-Once its ready you will see this : root@sysresccd /root % . Type startx and hit enter. The graphical user interface will now load.Once loaded you will see the same prompt in the Terminal window. Type gparted and hit enter. The gparted disk utility will now start.

-Once loaded, right click on the unallocated drive space and select NEW.

-Drag the right hand black arrow until you have the right size for the Ubuntu partition. Mine is around 10GB. From the Create as dropdown menu, select Primary Partion. From the Filesystem drop down menu select ext3. Click Add.

-Click the Apply button in the main window of gparted. The partition will now be formatted. Press close when finished.

-Once again select the unallocated space, right click, select New. This is going to be your Linux Swap file partition, so make it twice as big as the RAM in your computer. From the Create as drop down menu, select Primary partition. From the Filesystem drop down menu select Linux-swap.

-Click the Apply button in the main window of gparted. The partition will now be formatted. Press close when finished.

I finish with a disk like this :
/dev/hda1 NTFS 15GB
/dev/hda2 ext3 10gb. This partition has the boot flag, to set the boot flag, right click on the ext3 partition and click Manage Flags. Make sure the boot tick box is checked
/dev/hda3 Linux Swap 2GB
/dev/hda4 fat32 30GB


-make a note of the /hda numbers.

-close gparted. In the Terminal window type shutdown -r now. When the computer restarts, hold down the F12 key to enter the boot menu.


Installing Ubuntu.

-Insert the Ubuntu CD into your CD drive

-In the boot menu, use the arrow key to highlight CD/DVD/CD-RW Drive and press enter, the computer will now boot from the Ubuntu CD

-Select Start or Install from the menu, hit enter. Ubuntu will load. (and play that evil start up jingle)

-Double click the install icon on the desktop.

-Go through your regional options.

-When you get to Prepare disk space, make sure the Manual check box is ticked. Click Forward.

-Select the ext3 partition you made, in my case it is /dev/sda2. Tick the format check box, next to the ext3 partition.

-Right click on the ext3 partition and select Edit partition.

-In the Mount point drop down men select the /

-Click forward. The next step regards importing user documents and settings. Configure as you wish. Click forward when finished. Then fill out your user details and click forward.

-On the Ready to install screen, click the Advanced button

-In the Device for boot loader installation enter : (hd0,1) This tells the installer where to install GRUB. You want to install GRUB into the ext3 partition which we are going to install Ubuntu on.

GRUB syntax works like this (hd0(disk number),0(primary partition). Grub code counts the first primary partition as (hd0,0), so because my Ubuntu ext3 partition is the second primary partition I enter (hd0,1).

You should see something like the following :
The Following partitions are going to be formatted:
partition #2 of SCSI (0,0,0)(sda) as ext3
partition #3 of SCSI (0,0,00(sda) as swap
-Click Install. Make a coffee, take a few deep breathes. Relax.
-Once complete, hit Restart now.


Fixing the Boot loader.

-Remove the Ubuntu disc when prompted and replace it with the SystemRescueCd.

-Restart the computer and hold F12 at the startup screen to enter the boot menu, and boot from the SystemRescueCd.

-Once loaded type startx. Once the interface has loaded, type in the terminal window: gparted.

-Once gparted has started, select the NTFS partion where Windows is installed. Right click on it, and select Manage Flags. Tick the Boot checkbox, and click close. Close gparted

-Restart the computer. You should know boot into Windows XP. Click on My Computer, you should now see the drive D: (the FAT32 partition). Right click on D: and select rename. Rename it data.

-Restart the computer. Press F12 at the start up screen, and once in the boot menu, boot from SystemRescueCd.

We need to copy data from Ubuntu onto the shared FAT32 partition, so that we can add it to Windows, to give the option of booting Ubuntu at start up. To do this:
-Type startx

-In the Terminal window type : (press enter after each line)
mkdir /mnt/data
mount -t msdos /dev/hda4 /mnt/data

Note:/hda4 is the fat32 partition that we use to transfer data between Linux and Windows, if you dont remember the /hda number, you can run gparted, and see which number the FAT32 partion has. Just type gparted in the terminal

now type:
dd if=/dev/hda2 of=/mnt/data/ubuntu.bin bs=512 count=1

Note:/hda2 is the ext3 partition where you installed Ubuntu.

You should see something like this :
1+0 records in
1+0 records out
512 bytes (512 B) copied 0.333455 s, 1.5kb/s

-In the Terminal window type: shutdown -r now, and reboot into Windows.

-Click on My Computer, then double click the D: (data) drive.

-Copy the Ubuntu.bin file.

-Double click the C: drive and paste the file there.

-Click on Start, then select Settings -> Control Panel. Select System.

-Select the Advanced tab, then click on Settings, in the Startup and Recovery section

-Click on the Edit button
-Add this as the last line : C:\UBUNTU.BIN="Ubuntu Linux 7.04 (Feisty Fawn)"

-Go to File -> Save and save the file, then close it.

-Restart the computer.

You should now be greeted with a boot menu, for Windows XP ,and Ubuntu.........enjoy the commieware.



dr0ne
dr0ne
Latest page update: made by dr0ne , Jun 2 2007, 8:37 PM EDT (about this update About This Update dr0ne Edited by dr0ne


view changes

- complete history)
More Info: links to this page
Started By Thread Subject Replies Last Post
kcapizzi trouble with 'msdos' in mount command 3 Mar 31 2008, 8:16 PM EDT by kcapizzi
Thread started: Mar 19 2008, 10:02 AM EDT  Watch
Using the recovery CD, Ubuntu 7.10 now, and a d420. Everything chugged along happily until I came to:
mount -t msdos /dev/hda4 /mnt/data
and got error:
mount: unknown filesystem type 'msdos'

Also tried making the data drive an NTFS partition as 7.10 can use NTFS according to a friend.
Then I get an error that it is read-only when trying to dd:
dd if=/dev/hda2 of=/mnt/data/ubuntu.bin bs=512 count=1
error:
dd: opening '/mnt/data/ubuntu.bin': Read-only file system

Suggestions?
Do you find this valuable?    
Show Last Reply
volha !!! 1 Oct 9 2007, 10:19 AM EDT by dr0ne
Thread started: Sep 4 2007, 11:21 PM EDT  Watch
I wasnt sure how to install Ubuntu with WinXP dual boot...But actually it was kind of easy, easy because I followed your instructions though. Thanks a lot! It was very helpful and now i finally have my dual boot.
Thx, Volha.
Do you find this valuable?    
Keyword tags: None
Show Last Reply
jack_arrow dual boot 1 Oct 9 2007, 10:18 AM EDT by dr0ne
Thread started: Aug 28 2007, 12:13 AM EDT  Watch
I was sweating it out to install ubuntu with a winxp dual boot... GRUB wasnt kicking in after installation (I installed it in the LINUX partition and not the MBR for obvious reasons). Your tips above worked like a charm... am on "dual boot" at the moment....

thanx a ton...

regards
Jack
Do you find this valuable?    
Keyword tags: None
Show Last Reply
Showing 3 of 3 threads for this page

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)