Multibooting Fedora 3 and Windows XP


 

 

 

 

 

Introduction

The page describes how to set up a pc to multiboot between Red Hat Fedora 3 and Microsoft Windows XP, where it is required to use the Windows XP boot loader as the master boot loader.

There is a webpage elsewhere on this website about setting up multibooting between Red Hat Linux 9 and Windows XP - however there is a big difference between setting up multibooting Red Hat Linux 9 with XP, and multibooting Fedora 3 with XP - this is due to the fact that the kernel of Fedora 3 is too big to fit on a floppy, so we can`t use a floppy based boot disc to boot Fedora, in order to extract the boot file.

So we need to change the way we achieve the setup.

 

Boot loaders

Most if not all operating systems require some form of boot loader - the boot loader is a small chunk of code that lives in the Master Boot Record section of the first and active hard drive of the pc.

When the pc is booted up, the BIOS goes to the Master Boot Record, reads the code, from which it learns which partition is to be booted, and what boot file to look for.

The boot file then starts the boot up process of the actual operating system.

Alternatively, the boot file may point to another boot loader somewhere else. In this case, this second boot loader starts the relevant operating system.

Again, alternatively, this second boot loader may point to a third boot loader, and so on.

It is this ability to chain boot loaders that allows us to set up multibooting of Fedora 3 linux and XP

 

Choice of boot loader

Both Linux and XP have their own boot loaders, which are installed as part of the installation of the operating system.

It is possible to use either of them as the master boot loader, but for both of them, setting them up is not trivial.

This web page describes how to set up a pc to use the Windows XP boot loader as the master boot loader. If you want to use Grub as the master boot loader, then refer to the previous web page about multibooting Red Hat Linux 9 and Windows XP - I think the method is the same, but I haven`t tried it, so no guarantees about that.

 

Windows XP

The installation of XP will overwrite any existing boot loader, and if there is an earlier version of Windows, XP will add the boot loader for the earlier version to the boot loader menu.

This behaviour is not controllable, it is built into the installation procedure.

So if you install Linux before you install XP, the XP installation will overwrite the Master Boot Record which points to the Linux boot loader, and it will not be possible to boot Linux, unless Linux has been installed in a particular way.

Therefore install XP first, and then install Linux.

 

Fedora Linux 3

Fedora Core 3 uses GRUB as its boot loader by default. The use of LILO is no longer an option.

The installation programme for Fedora 3 ( the programme is called Anaconda ) allows GRUB to be configured in various ways - it is these variations that allow us to choose which boot loader to use as the master boot loader.

 

How we do it - a summary

Here is a summary of what you are going to do :-

 

install XP

XP sets up a master boot loader

install Linux

GRUB installed on the Linux boot partition ( not on the master boot partition )

copy Linux boot partition record into file called linux.boot

copy linux.boot file into master boot partition

add Linux to XP boot loader using linux.boot file

 

How we do it - the details

Now the details - install XP first.

Just do the normal install, XP will create or overwrite the master boot record, and the pc will then boot up into XP or an earlier version of Windows, if it exists.

Now install Fedora Core 3 Linux from the DVD - follow the set up instructions until you get to the section about configuring GRUB - now stop - the next few steps are critical.

There are various options available for this screen.

Start by clicking on the "Change boot loader" button. The pop-up window should provide two options :-

  • Use GRUB as the boot loader

  • Do not install a boot loader

You want to use GRUB as the boot loader, so make sure that button is highlighted - it is by default.

Click on OK to get back to the main screen.

You do not want to add any other operating systems.

It is your choice if you want to add a GRUB password.

Now click on the button for "Configure advanced boot loader options"

Then "Next", to take you to the next screen.

You should now have a screen which offers you a choice of where to install the boot loader.

Go for the second choice - "/dev/hdxx First sector of boot partion"

NB - the /dev/hdxx will automatically be pointing to the Linux boot partition created earlier in the installation programme, so it could be /dev/hda2 or /dev/hdb1, or something like that. Write down what it says, you will need it later.

Have a think about the box "Force LBA 32". If you have a hard drive which is greater than 32 GB`s, work out where the start of the Linux partition is. If it is more that 32 GB`s from the start of the hard drive, then there might be problems of the master boot loader not being able to find the Linux boot loader. So you are going to have to bear that in mind. Normally you don`t need to tick it.

Carry on with the rest of the linux install. Leave the DVD in the drive unit. The pc will reboot, and go back into the installation process again.

As soon as the prompt

       boot :   

appears, press F5. This takes you into Rescue Mode.

At the command prompt, type in

       boot : linux rescue   

and press "Return"

The pc will load up a kernel from the DVD, and then you get various boxes with options for Language and Keyboard, and you don`t need to start the network interface.

You then get a bigger box, with quite a lot of text about mounting your Linux installation. What this is offering to do is to mount the installation of Linux you have put on the hard drive, into the version of Linux you are currently running temporarily on the pc. It doesn`t matter if you don`t understand this, as we don`t need the facility anyway. Select the default option of "Continue".

After an intermediate message about searching for Fedora installations, there is a screen which advises that your system has been mounted under /mnt/sysimage. The rest of this box is wrong, ignore it. Just select "OK".

You now get the beginnings of a command prompt shell environment. At the command prompt type

        sh-3.00# cd /   

then

        sh-3.00# ls    

You`ll get the directory structure of the temporary Linux version you are running on the pc.

We now need to create a temporary folder to mount our floppy drive into, so type

        sh-3.00#  mkdir /floppy   

Put a formatted floppy into the floppy drive, and type

        sh-3.00# mount /dev/fd0 /floppy   

You can check that it is mounted ok by typing

        sh-3.00# ls /floppy   

which should give you a listing of any files already on the floppy. We are now going to extract the information about the linux boot loader, and dump it into a file called "linux-boot" which will be stored on the floppy.

        sh-3.00# dd if=/dev/hdxx of=/floppy/linux.boot bs=512 count=1   

Of course, instead of /dev/hdxx, put in the partition number you wrote down earlier, during the installation process.

Check that the file "linux.boot" is safely on the floppy by using "ls" again.

        sh-3.00# ls /floppy   

Now we need to unmount the floppy -

        sh-3.00# umount /dev/fd0 

Now remove the floppy and the DVD, then close down Linux by using the "CTRL + ALT + DEL" keys and reboot into XP.

Once XP is up and running, copy the file "linux.boot" from the floppy into the root of the boot partition of the first hard drive - ie, into the root of C:\

You will know it is the boot partition because of the existence of the files "ntldr" and "boot.ini".

Now open the "boot.ini" file in notepad, and add the following line at the end :-

        C:\linux.boot="Fedora Core 3"    

Save it, reboot, and now you should find the Fedora Core 3 entry in the boot up menu list.

 


© 2005 Ron Turner


Return to the Index page