Feedback Form
Home Open Source Tips and Tutorials Dual Booting on a single hard drive - Windows XP Pro and Debian 5 (Lenny)
Monday, 06 April 2009 10:50

I used a dual-boot system with Windows XP and Debian previously, but in that box the operating systems was separated on two different hard drives. But now I need a dual boot system on a single hard drive.
It takes a little work, but it is not a magic.
Let's do it.

Resources:

Operating systems: Windows XP Pro, Debian 5 (Lenny)
Boot Manager: Grub
Hard drive: 80GB
Partitions (partitions will be created under installation procedure)
1, Windows: 60GB
- C: 25GB NTFS (Windows Op System)
- D: 35GB NTFS (Data)
2, Debian: 20 GB
- 19 GB ext3 (ext3 partition has been created automatically by Debian)
- 1GB SWAP (SWAP partition has been created automatically by Debian)
RAM: 1GB (only impotant for Linux SWAP partitioning, if you want to create it manually)

Boot Manager

You need a boot manager that you will be able to select which OS you want to run when your machine boots up.
Your possible choices:

  • NTLDR - Windows XP Pro's boot manager
  • Grub - Debian's boot manager
  • 3rd-party boot manager

I use Grub, because it is the most simple way in my opinion.

I install Windows first, and Debian second, but you could reverse.

 

Install Windows XP

1. Insert the Windows XP setup CD to your CD-ROM, setup your system boot from CD-ROM in BIOS and reboot your computer.

2. In the Welcome to setup screen press Enter to setup Windows XP

3. Read and agree the license agreement

4. Create partitions

I usually create 2 partitions, one for Windows(C:) and one for data(D:). 
In this case I created 25GB for C: and 35GB for D:

  • Press C to create a partition, setup the size of this partition and select the file system NTFS.
  • Repeat this step if you want to create more than one partition.
  • Pay attentiton to leave sufficient free space for Debian (I left there 20GB free space on the hard drive).
  • Now select a partition (C:) for Windows installation and press Enter.

5. Setup will now copy system files to the system/boot partition(s) you just created.
When the file copy is complete, Setup will initialize and save your XP configuration.
It will then reboot your system.

6. GUI Setup begins
Once the system reboots, you will be presented with the GUI Setup phase.

7. Regional and language Options

  • Customize the regional and language settings
Click Next

8. Personalize your software

  • Now, enter your name and, optionally, your company.

Click Next

9. Enter your product key
Click Next

10, Enter a computer name and administrator password
Computer name will identify your Windows system on your network.
Click Next

11, Supply your date and time settings
Click Next

12, Network setup
Setup now installs the networking components.

13, Choose networking settings

  • Select typical setting.

Click Next

14, Enter workgroup or domain information
Click Next

15, Setup completion
Setup will now copy files, complete installation  and then reboot.
You can remove the XP Setup CD now.
Setup your system boot from hard drive in BIOS.

19, First boot
Now, Windows XP will boot from hard drive.
Go across to the XP's dialog boxes and your are done.

Now, you have a working Windows XP, go and install Debian.

You can read a more detialed Windows XP installation tutorial with screenshots here

 

Install Debian

You can download Debian installation CD/DVD images from here

I use debian-500-i386-CD-1.iso for this installation.

1. Insert your Debian CD to your CD-ROM, setup your system boot from CD-ROM in BIOS and reboot your system.

When your system boot from Debian CD the Debian splash screen appears with the installer boot menu.

If your system does not have internet access take a look around for instruction here

My system has internet access, if yours also has it, simply:

  • Select Install menu point from the Debian installer menu.

2. Select your desired language, country, and keymap. Once this is done hardware will be detected and installer componenets will be loaded.

3. On the next menu select the time zone that your system is located in.

4. Next is hard-drive partitioning.

  • On the partition list screen arrow down to the line "FREE SPACE" (you left it free when you created the Windows partitions)

If you want to create partitions manually, read more about it here

If you want to create partitions automatically, like me, do the following:

  • On the "How to use this free space" screen select Automatically partition the free space and press Enter. (This will create both the root and swap partitions.)
  • When asked for a partitioning scheme use the default All files in one partition scheme by pressing Enter.
  • Select Done setting up the partition and press Enter to return to the parition list screen.
  • Arrow down to Finish partitioning and write changes to disk selection and press Enter and answer Yes at the confirmation screen.


When the partitions are formatted the base installation will begin.

5. The next series of dialogs will be password and account related.

  • You'll be prompted to enter, and re-enter, a password for the root (super-user) account.
  • You'll be be asked to to create a non-root user account entering the full name, username, and password.


6. Tab to No when asked if you want to use a network mirror

7. Accept the default No answer when asked if you want to participate in the package usage survey.

8. Next the "Software Selection" windows appears with several pre-defined software collections listed.

  • Select Desktop Environment

The installation will continue by installing all of the software packages that were included in the "Desktop Environment" collection.

9. Near the end of the installation the Grub boot loader will be installed. Simply answer Yes to installing it in the master boot record.

10. At this point the CD/DVD drive will open. Be sure to remove the CD/DVD and boot your system from hard drive (setup in BIOS)

Now, the installation is complete, the Grub boot menu will appear and Debian will load by default.

Now login to Debian with your root account, and edit Grub.

 

Edit Grub

Grub will load Debian by default. Windows XP will be the third Grub menu selection.
If you want to change this to default to Windows XP, you'll need to edit the file: /boot/grub/menu.lst

nano /boot/grub/menu.lst
Find the line:
Default       0
And change it 3

You can also edit the timeout value, I changed it to 20 (20 second).

Reboot your system. Windows XP will be the default selection in the Grub boot menu.

That's all. You have a dual-boot system on a single hard drive.

 

Last Updated ( Tuesday, 16 June 2009 20:08 )
 

Visitor Map

Recent Readers