Installing
Linux on a Second Hard Drive (two drives on the system):
If you want to install Linux on a second hard drive in your system, the
process can be a little more complicated, depending on the distro that
you choose. In this case, we will use Fedora as the example.
I don't want to install Linux on my main hard drive, as I am afraid I
might mess up my xyz operating system.
You most likely came to this section, if you have more than one hard
drive on your system and have decided to install Fedora on a second
hard drive. In this case, you want to preserve the main hard
drive which
has Windows on it, or another operating system. This is fine, but some
considerations must be made when choosing this option.
Fedora assumes that you are installing on a single hard drive
on
your machine. Most users have only one hard drive, so this is by
design. In this case, you must tell Fedora what you want to do, as it
does not know, unless you tell it that this is your preference.

Figure 4.1
In this case, you will see more that one drive in the "Select the
drive(s) to use for this installation. Drive hda will be you primary
master drive (that you don't want to touch) and your second drive will
be named according to where it is jumpered when you installed it. The
naming scheme will be as follows;
hda = primary master drive
hdb = primary slave
hdc = secondary master
hdd = secondary slave
Remember, the drive order may not be in exact order, as you may have
your second hard drive cabled on the primary interface, or the
secondary one. So, if you cdrom drive is on the primary master, that
drive will be hdb.
Obviously, you will uncheck hda, as you don't want to use this drive
and make sure your second drive is checked for the installation.
Note that the default choice is to "Remove Linux partitions on selected
drives and create default layout." This is fine if you have a previous
installation of Linux and want to remove any previous Linux
partitions on
the
system,
Use the option
"Remove all partitions on selected drives
and create default layout" if you want
Fedora to "take over" the entire hard drive. Use this option with care.
Doing so will remove all the partitions on the selected drive.
If
you want Fedora to use empty (non-formated) space on the hard drive,
choose the "Use free space on the selected drives and create default
layout." The key
here is non-formatted. This means free space not formatted with any
filesystem at all, at the end of the drive.
Use the "create custom layout" if you want to tell Fedora to use
pre-existing Linux partitions that you made on the hard drive. In this
scenario, you need to know what you are doing.
For a more detailed explanation, see the Fedora
Core 5 installation guide - partitioning section.
The important thing here, is that you want to modify grub, so that you
can boot the system.
I installed Fedora and
chose all the
suggested default settings. Now my system does not boot, or goes
straight into Windows when I boot the machine.
In a default Fedora installation on a second hard
drive, Fedora
assumes that that is the only drive in the system, unless you pick the
advanced partition option when formatting the drive during the
installation.
A boot directory on the drive is always made, which houses the vmlinux,
initrd, config file, grub reference files
and system.map file. This does not mean that the bootloader
itself was written to your boot drive and the system will boot from the
primary master drive.
Even though you installed Grub to the MBR (Master Boot Record) the
actual stage files reside on the hard drive in the Fedora install /boot
directory. Only the part of grub that catches the MBR (the actual
bootloader) resides on the
MBR that directs things to the actual location of the grub stage files,
menu.lst and device.map files.
If you choose to install the actual bootloader to the second drive
(which is by default in your case when you installed Fedora), the MBR
is written to the second drive.
Hence, this is why you booted right into Windows. The MBR of the
actual boot drive (primary master) still had the bootloader for Windows
only.
OK, I
understand this, but if
I change the boot order in the bios to my second drive (where
the
bootloader is), Fedora boots/does not, and the system just hangs when I
try to boot Windows.
In terms of Windows, changing
the boot order of the physical hard drives confuses the boot.ini file,
which is set to look for the Windows start-up files on a specific
drive. Changing the boot order in the bios changes the logical order of
the drives, as seen by the bios. Now when Windows tries to boot, the
boot.ini file looks for the Windows system files on the primary master
drive (where Windows was originally installed), which is now your
Fedora hard drive. The Windows system files and the boot.ini file is
now your secondary hard drive. Windows is unable to boot.
Same thing with Fedora's grub is looking for the start-up files on the
wrong drive. Grub tries to boot, but can't find the files it needs to
complete the process. In this case, you know that Grub's bootloader is
on the MBR of the drive where Fedora was installed on, not the MBR of
your original primary master hard drive.
There is a workaround for this. See
Recovering
Grub when you make a Mistake - Fedora on a second hard drive in the
system.