Support both OSs: Dual boot Windows XP and Red Hat Linux 7.3

At a time when some organisations are investigating the possibility of running Linux instead of Windows on some or all of their desktops, support departments face the possibility of having to support both operating systems. While there are many ways to do this, one that I think works well involves installing both operating systems on a single machine and dual booting.

There are several reasons why it's a good idea. First, you're going to need a Linux machine to run tests on before rolling out Linux company-wide. Second, once Linux has been rolled out, you'll also need a machine that you can use for troubleshooting problems when they occur. Third, if your help desk has multiple techs, each will probably need its own Linux installation for troubleshooting purposes. To save money and space, you can use one machine to boot both OSs. Enter the dual-boot computer.

In this article, I'll explain how to configure a dual-boot Windows XP and Red Hat Linux 7.3 system.

The VMware option

I know what some of you are saying. Why not just run VMware? While VMware allows you to easily switch between multiple operating systems and perform routine tasks, a dual-boot computer works better for testing and troubleshooting—especially when it comes to hardware. VMware also has issues with some Windows operating system features, which makes dual booting your only option.

What to do first?

This article assumes that you can wipe your machine clean and start fresh. If you can’t, and you already have Windows loaded, you will need to purchase a program such as Partition Magic to free up enough space on the hard drive to install Linux. My test machine is a 1-GHz Pentium III with 192 MB RAM and 4 GB of hard drive space.

Loosely, the order of things will be as follows:

  • Install Windows XP Professional and give it 2.0 GB of space out of the 4 GB available.
  • Install Red Hat Linux 7.3 into the other 2 GB.

Simple, eh?

Installing Windows XP Professional

To dual boot, you can install Windows XP exactly as you normally would, while making sure to leave room for the Linux partition.

Installing Red Hat Linux 7.3

Once Windows XP is installed, you can install Red Hat Linux 7.3 by inserting CD One of three and letting it boot. Then, just follow the instructions on the screen. When it's time to partition the disk, I chose the default option to Remove All Linux Partitions On This System since I had no Linux partitions (see Figure A).

Figure A
Figure A
Choose an automatic partitioning option.

Choosing this option will give you a warning that all of your data is going to be removed from the Linux partition. Don’t worry about this warning, because on a fresh system there is no data to be removed. On the next screen, the Linux installer breaks down the layout of the hard drive for you to look at (see Figure B).

Figure B
Figure B
Partition layout overview

At the top of the partition layout, you see that /dev/hda1 is of the type NTFS/HPFS. This is your Windows XP partition. Below that, there are four partitions for Linux. The first one is an ext3 partition labeled /boot. The ext3 type is the standard file system type for Red Hat Linux 7.3 and /boot is the name of the Linux boot partition. Next, there is another ext3 partition named /, which is the rest of the Linux file system. Finally, on an extended type partition, there is a swap partition, which every Linux system needs. After this step, you need to configure the Linux boot loader that is named GRUB.

GRUB will detect that there is already an OS installed in the master boot record and will give you on opportunity to configure it. This is a critical step. If you don't configure it here, you will have to manually edit the configuration files later. For my installation, I named the hda1 partition Windows XP and then clicked Next to continued to complete the installation by installing what I needed to run my system (see Figure C).

Figure C
Figure C
Boot Loader configuration

Rebooting

Once Linux is fully installed, the system will automatically reboot, and you will be greeted with the GRUB boot loader screen (see Figure D).

Figure D
Figure D
GRUB boot loader showing both operating systems

Choosing Windows XP from the list will start up Windows XP, as it should; choosing Red Hat Linux will start that OS instead. If you don't choose any OS selection, Red Hat Linux will start by default.

If you forgot the portion during setup where you needed to tell the system that you also have Windows XP, editing the file /etc/grub.conf and adding the information will do the trick for you. Since you first need to know where everything is (i.e., where the Windows XP partition resides, etc.), you can use the Linux fdisk command to view this. To use it, issue the command: fdisk /dev/hda

Once inside fdisk, issue a p command to print the partition table.

The contents of my /etc/grub.conf to dual boot the system are shown in Listing A.

You're good to go

When complete, you'll have a fully functional, dual-booting system with Windows XP and Red Hat Linux 7.3 residing on the same system. Running both operating systems on one machine will allow you to properly test the actual hardware on which you will be running Linux at a big savings.

TechRepublic is the online community and information resource for all IT professionals, from support staff to executives. We offer in-depth technical articles written for IT professionals by IT professionals. In addition to articles on everything from Windows to e-mail to fire walls, we offer IT industry analysis, downloads, management tips, discussion forums, and e-newsletters.

©2001 TechRepublic, Inc.

Advertisement

Talkback 27 comments

  1. I am so greatful for this article!!! Thank you thank you thank you Irina Tsar -- 26/07/02

    I am so greatful for this article!!!

    Thank you thank you thank you

  2. 'Support both OSs: Dual boot Windows XP and Red Hat Linux 7.3' Ahhh! More 'RedHat' s***! When will zdnet and its magz realize that redhat is one of the bad instalations? It had better happen soon! For once i would like to see a review/news item about anot Rowan John Lewis -- 06/08/02

    'Support both OSs: Dual boot Windows XP and Red Hat Linux 7.3' Ahhh! More 'RedHat' s***! When will zdnet and its magz realize that redhat is one of the bad instalations? It had better happen soon! For once i would like to see a review/news item about another linux distro... start with SuSE... PLEASE!!!

  3. The writer dismissed VMware as the answer to running Windows and Linux side by side, and was correct in his comments. I run VMware myself, so I agree that it is not always appropriate. However, given that the write was attempting to show a dual- Anonymous -- 30/08/02

    The writer dismissed VMware as the answer to running Windows and Linux side by side, and was correct in his comments. I run VMware myself, so I agree that it is not always appropriate.

    However, given that the write was attempting to show a dual-boot configuration *without* VMware, why was the whole demonstration conducted from within it? The RH installer clearly shows that it is being installed onto a VMware virtual IDE disk!

  4. I'm in a class where we've installed Windows XP and will install Red Hat 7.3 next week. We're going to install .NET server as well, later on. Our instructor is concerned that .NET will overwrite the boot record. I've been looking online for information ab Rachel Garrett -- 20/09/02

    I'm in a class where we've installed Windows XP and will install Red Hat 7.3 next week. We're going to install .NET server as well, later on. Our instructor is concerned that .NET will overwrite the boot record. I've been looking online for information about this, but haven't found anything so far. Do you know anything about installing .NET server once we have the XP/Red Hat dual boot working? Thank you.

  5. Please help!!! I've just installed Linux Red Hat 7.2 on my system which already had Windows XP on the first partition.When I installed it, I chose "Keep all partitions and use existing free space" when it comes to partition the disk, and I Anonymous -- 26/09/02

    Please help!!!
    I've just installed Linux Red Hat 7.2 on my system which already had Windows XP on the first partition.When I installed it, I chose "Keep all partitions and use existing free space" when it comes to partition the disk, and I selected "Use LILO as the boot loader" at the Boot Loader configuration. After I finished installing, My computer only boot Linux and did not dual boot. Is there any way I can make it dual boot without reinstall the OS. Please help me.
    Thank you very much
    Dan

  6. Even though the installation order can be either, I find that when setting up dual-boot systems the installation of LINUX should be first. I do, however, create and format the partition that XP is going to go on prior to any installations - allowing eithe Stephen Kuhn -- 30/09/02

    Even though the installation order can be either, I find that when setting up dual-boot systems the installation of LINUX should be first. I do, however, create and format the partition that XP is going to go on prior to any installations - allowing either GRUB or LILO the ability to add it as a bootable partition. With this in mind, I can either make use of BootMagic or the LILO/GRUB boot manager. As well, it also allows me to setup automounting quickly from the beginning of the process. The XP partitions I set up are generally using FAT32 instead of NTFS as there isn't a way to easily setup NTFS access for read-write in LINUX - and swapping data between the two OS's is very important in my field.
    Dual-boots are a norm for my particular line - my own machine having RH 7.3, BeOS 5.0.3, Windows98, Windows2000 Pro and finally WindowsXP Pro. In all reality, most of this is very "old shoe" and is only coming into the limelight nowadays. Sad, but 10 years ago I had to deal with multi-boot machines running OS/2, DOS w/ Desqview, and Windows 3.11 - but that's ancient history today!

  7. RE:Please Help! What you're going to need to do is to re-run lilo after you've booted into LINUX; then it will automatically add your DOS/NT partition. After reboot, you'll see it as an option on your lilo menu...if you need more help, feel free to e Stephen Kuhn -- 30/09/02

    RE:Please Help!
    What you're going to need to do is to re-run lilo after you've booted into LINUX; then it will automatically add your DOS/NT partition. After reboot, you'll see it as an option on your lilo menu...if you need more help, feel free to email me at: skuhn@telpacific.com.au

    Stephen

  8. I have two separate hard drives one is 20GB and the other is 60GB. I would like to run Windows XP on one and Windows ME on the other. How can I dual boot between the two? I have not installed Windows XP yet. Your application looks very Anonymous -- 21/11/02

    I have two separate hard drives one is 20GB and the other is 60GB. I would like
    to run Windows XP on one and Windows ME on the other. How can
    I dual boot between the two?

    I have not installed Windows XP yet. Your application looks very interesting.

    Jim Switzer

  9. Hi I was just reading your article on dual booting. I thought that linux could resize partitions as well - certainly the installer for Mandrake could when I installed it on a Win98 machine with FAT32. Do you know if it (or Redhat) can resize Anonymous -- 27/11/02

    Hi

    I was just reading your article on dual booting. I thought that linux could resize partitions as well - certainly the installer for Mandrake could when I installed it on a Win98 machine with FAT32. Do you know if it (or Redhat) can resize NTFS partitions for XP home?

    Thanks

    Paul

  10. Help! I've got 2hard drives using RAID0 for performance, however in linux installation unlike xp where it allows me to run my raid drivers, linux seem to see my two hard drives as completely different drives and thus making it impossible to install, let a Timothy Yip -- 09/12/02

    Help! I've got 2hard drives using RAID0 for performance, however in linux installation unlike xp where it allows me to run my raid drivers, linux seem to see my two hard drives as completely different drives and thus making it impossible to install, let alone dual boot. Any solutions?

  11. Please advise re my EPSON STYLUS PHOTO EX printer. It is important to me to use EPSON STATUS MONITOR. When I had Windows 98, ESM2 proved invaluable. Now that I am running Windows XP Pro Corp, ESM is not available. I have scoured sites for E JOHN SCHAPEL -- 12/12/02

    Please advise re my EPSON STYLUS PHOTO EX printer.
    It is important to me to use EPSON STATUS MONITOR.
    When I had Windows 98, ESM2 proved invaluable.
    Now that I am running Windows XP Pro Corp, ESM is not available. I have scoured sites for ESM3, but all the models it is listed for do not appear to include my EPSON STYLUS PHOTO EX, per se.
    Is there any latitude here? Or am I doomed to guessing which cartridge (black or colour) is causing the low-ink light to be flashing. This is a real pain because unless I can overcome this, I can no longer manage expensive ink refills responsibly.

  12. RE Paul Morris's question re resizing NTFS partitions, the following is copied from a review of the 'Xandros' distribution on Distrowatch "One unusual aspect of the the installation procedure is its ability to resize partitions using the NTFS file sy Anonymous -- 18/12/02

    RE Paul Morris's question re resizing NTFS partitions, the following is copied from a review of the 'Xandros' distribution on Distrowatch "One unusual aspect of the the installation procedure is its ability to resize partitions using the NTFS file system as used by Windows XP/2000, a feature presently not offered by any other distribution."

    Cheers
    Barry

  13. File dual access?? I already have my own setup of dual boot Linux/Window2000. My problem is that I need to run programs on Linux and save files that I need to access from the Windows side after reboot. There seems to be 2-3 options: Anonymous -- 07/01/03

    File dual access??
    I already have my own setup of dual boot Linux/Window2000. My problem is that I need to run programs on Linux and save files that I need to access from the Windows side after reboot.

    There seems to be 2-3 options:
    1) mount the /dos directory on linux /dev
    2) save the linux files to a floppy, zip or USB drive
    3) get on line and email the files

    My question is, under scenario 2) what are the options? Are there hard drives (USB, mini disk) that allow you to do this?

    Thanks very much,

    L Du
    Branford, CT

  14. Hey anonymous just had the same problem. Not sure what the cause is; but if you have a windows boot disk, and you want to get back to XP, just boot from the floppy and type "fdisk /mbr". Be careful this will rewrite your master boot record. Anonymous -- 29/01/03

    Hey anonymous just had the same problem. Not sure what the cause is; but if you have a windows boot disk, and you want to get back to XP, just boot from the floppy and type "fdisk /mbr". Be careful this will rewrite your master boot record.

  15. Red Hat hands down forget Suse Jason -- 29/01/03

    Red Hat hands down forget Suse

  16. Hi, Thanks for this support, I have a problem, my problem is I have a Compaq AMD ATHLON XP 1.8 ghz laptop with 30GB HDD. I was trying to install Windows XP Professional, Linux 8.0 and Solaris 8.0 with multi operating system. I could easily install Wi Sagar Gattepalli -- 05/02/03

    Hi,
    Thanks for this support, I have a problem, my problem is I have a Compaq AMD ATHLON XP 1.8 ghz laptop with 30GB HDD. I was trying to install Windows XP Professional, Linux 8.0 and Solaris 8.0 with multi operating system. I could easily install Windows XP and Solaris 8.0 but I could not install Linux 8.0. I am getting a message
    Partion:
    hda: interupted IRQ7, at this stage my system get stuck. I made 3 unformated partitions like windows xp with 12GB, Linux with 11GB and Solaris with 7GB. I will appreciate for your help

  17. I must say.. in 1 page, you perfectly described how to do this. Now i dont have to listen to a bunch of complicated instructions from people that have no clue what they're talking about. Thank you. Awesome article. Anonymous -- 14/02/03

    I must say.. in 1 page, you perfectly described how to do this. Now i dont have to listen to a bunch of complicated instructions from people that have no clue what they're talking about. Thank you. Awesome article.

  18. Will these instructions work for Windows XP and Mandrake? Anonymous -- 08/03/03

    Will these instructions work for Windows XP and Mandrake?

  19. Is there any way to redefine the partitions on harddrives once an OS is installed. Can I repartition an existing drive to install a new OS? Is it possible to do in WindowsXP without a program such as PartitionMagic Anonymous -- 29/04/03

    Is there any way to redefine the partitions on harddrives once an OS is installed. Can I repartition an existing drive to install a new OS?

    Is it possible to do in WindowsXP without a program such as PartitionMagic

  20. Thank you, thank you. I seach for doing this for days, and it works!!! Anonymous -- 13/05/03

    Thank you, thank you.
    I seach for doing this for days, and it works!!!

  21. So cool....It work... Thanks. Anonymous -- 10/06/03

    So cool....It work...

    Thanks.

  22. Worked For Me!! Thank You! Anonymous -- 10/06/03

    Worked For Me!!

    Thank You!

  23. Wow, finally! I spent all day searching for a clear explanation of how to do this on the web and usenet and my brain was about to explode. In one simple, easy set of instructions, it looks like I've got what I need. Can't thank you enough... I'll certain Anonymous -- 31/08/03

    Wow, finally! I spent all day searching for a clear explanation of how to do this on the web and usenet and my brain was about to explode. In one simple, easy set of instructions, it looks like I've got what I need. Can't thank you enough... I'll certainly bookmark this website...

    Jim Kroger

  24. How do I remove the redhat completely from my harddrive running on Windows XP Pro if I selected the grub loader? Anonymous -- 24/09/03

    How do I remove the redhat completely from my harddrive running on Windows XP Pro if I selected the grub loader?

  25. Help! I installed Linux on a computer that already has Windows XP on it. I am using Grub and it seems to not give me the option of accessing Windows. Do I have to make a partition for Windows through Linux? Or is there a easier way? Masud -- 03/11/03

    Help! I installed Linux on a computer that already has Windows XP on it. I am using Grub and it seems to not give me the option of accessing Windows. Do I have to make a partition for Windows through Linux? Or is there a easier way?

  26. Hi, I've encountered the same problem like this: "Help! I installed Linux on a computer that already has Windows XP on it. I am using Grub and it seems to not give me the option of accessing Windows. Do I have to make a partition for Windows thr Anonymous -- 28/03/04

    Hi, I've encountered the same problem like this:
    "Help! I installed Linux on a computer that already has Windows XP on it. I am using Grub and it seems to not give me the option of accessing Windows. Do I have to make a partition for Windows through Linux? Or is there a easier way?"

    First, I installed Windows XP, then I installed RedHat Linux 7.3, opted GRUB option.
    Then I only choose the option Windows XP, the Linux option did not display.
    If I want to start Linux, I have to use Startup Disk.
    Do you know how to display the option for choosing Booting option (XP and Linux)
    Thanks so much

  27. Great article... it was so easy to understand and follow. Anonymous -- 15/02/05

    Great article... it was so easy to understand and follow.

Add your opinion


Latest Videos

ZDNet's CIO Vision Series

Department of Defence | Greg Farr, CIO (part two)

In the second part of his interview, Defence CIO Greg Farr talks about outsourcing, the skills crisis and reveals his most urgent IT priority.

Sponsored content

Power Centre - Content from our premier sponsors

Blogs

  • Angus Kidman I'm a celebrity, don't back me up
    Celebrity comes with its perks — free alcohol, better-looking partners, lots of holiday time — and disadvantages — constant media intrusions, being forced to appear in films with Eddie Murphy for the long-term good of your career, and having to do mindless radio interviews with angry men who've been awake since 4am.
  • Array Lies, damned lies and telco stupidity
    Earlier this month, Telstra put out a press release trumpeting that it's come up with a new phone coaching service to help people who are "bamboozled" by their mobiles. Another excellent example of wrongheaded thinking from the mobile industry.
  • Array Dear carriers: More walking, less talking
    Sometimes, a well-placed and well-timed letter can make all the difference. Other times, it can make no difference at all — and even hurt your case. This week's missive by the Competitive Carriers' Coalition, I would suggest, falls into the latter category.
  • More blogs »

Tags

Back to top

Featured