[lug] 2 Hard Drive Configuration

Andrew J Jenkins andrew at winston.homelinux.org
Wed Jul 9 13:45:35 MDT 2003

On Wed, 2003-07-09 at 09:27, Michael D. Hirsch wrote:
> On Wednesday 09 July 2003 10:35 am, Gregory Haggquist wrote:
> > What I want is to be able to have both hard drives connected at the same
> > time and choose which system to boot. If I boot on Hard Drive A I would
> > still like to access data on Hard Drive B and vis-à-vis.
> >
> > Any suggestions I how to configure this?
> Grub of LILO should be easy to configure to the root partition on each 
> drive easily.  You just add a line (Grub) or a stanza (LILO) that points 
> to the appropriate kernel and partition and away you go.

I would think it would be a lot easier to configure GRUB, because then
you won't have to copy over a bunch of kernel images, but I'm not a GRUB
expert.  I'll try though.

Your first problem is going to be that Hard Drive 2 is now going to be
called /dev/hdc1, and it was called /dev/hda1 before (this assumes HD2
was previously a main hard drive in a system).  Here's how it sounds
like your system looks:

Hard Drive "A" is now /dev/hda.  RedHat 8.0 is installed on /dev/hda1
Hard Drive "2" is now /dev/hdc.  RedHat 9.0 is installed on /dev/hdc1

We have to edit a grub config file on either of the redhats.  Boot into
one of them, preferably redhat 8.  RedHat 8 is on /dev/hda1, so I'll
assume you get there.  As root, do "mkdir /mnt/redhat9"

then add to /etc/fstab:

/dev/hdc1        /mnt/redhat9        ext3    defaults    1 0

then try "mount /mnt/redhat9" - with any luck, /mnt/redhat9 now contains
your redhat 9 setup.  You can read all the files from that partition. 
We need to now know the names of the kernel image and the initrd
(initial ramdisk) of redhat9 - try "ls /mnt/redhat9/boot" and look for
"vmlinuz-something" and "initrd-something.img" and remember (write down)
these filenames.  Now, edit /etc/grub.conf and add an entry for redhat
9.  Yours should look like this:

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/hda1
#          initrd /boot/initrd-version.img
title Red Hat Linux 8 #change this label to whichever version of RH you
are currently in
        root (hd0,0)
        kernel /boot/vmlinuz-2.4.19 ro root=LABEL=/ #leave alone
        initrd /boot/initrd-2.4.19.img #leave alone
# Start Adding Here
title Red Hat Linux 9 #this is the number of the other version of RH
        root (hd2,0)
        kernel /boot/vmlinuz-something ro root=LABEL=/  #Replace
something with what you wrote down
        initrd /boot/initrd-something.img #replace again here

# end grub.conf
Now, when you restart, you should get to choose which version of RH you
boot.  I'd recommend that you only edit the grub.conf on RH8, then you
only have to keep track of one set of changes.

One last thing - while RH8 can read RH9s files, RH9 cannot yet read RH8s
- to fix this, edit "/mnt/redhat9/etc/fstab" and add the line:

/dev/hda1    /mnt/redhat8    ext3    defaults    0 0

and run "mkdir /mnt/redhat9/mnt/redhat8"

Andrew J Jenkins
GPG Public Key ID: 2DB6DA63

More information about the LUG mailing list