LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-13-2003, 03:26 PM   #1
zuele
LQ Newbie
 
Registered: Sep 2003
Location: Moncton
Distribution: shrike
Posts: 11

Rep: Reputation: 0
Grub with Multi-drives/Multi Redhats


Hello all, i'm @ wits end right now trying to figure out how to get grub booting my most recent linux installation so let's start @ the beginning. HDA=XP HDB=Redhat9 with 2 kernels HDC=Redhat 9 with 2 kernels using grub as bootloader. Copy of grub.conf as follows:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/hdb2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-20.9)
root (hd1,0)
kernel /vmlinuz-2.4.20-20.9 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-20.9.img
title Red Hat Linux (2.4.20-8)
root (hd1,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
title Redhat Copy Cat (2.4.20-8)
root (hd2,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img
title Redhat Copy Cat Kern2 (2.4.20-20.9)
root (hd2,0)
kernel /vmlinuz-2.4.20-20.9 ro root=LABEL=/ hdd=ide-scsi
initrd /initrd-2.4.20-20.9.img

This is my "rendition" of what i beleive to be valid entries for booting redhat 9 on hdc (last 2 Redhat copy cat). However everytime i select it (redhat on hdc) from the boot menu redhat from hdb is booted......where am i going wrong. Does my problem lie in the kernel number inside the brackets beside the title?) FYI, installed XP first, Redhat 9 on hdb with Grub bootload, Redhat 9 on hdc last no bootloader installed during installation of OS. Partition layout for both hdb & hdc are duplicate. This whole setup with 2 redhat installations allows me to "attempt" anything i'd like on hdc without destroying my hdb installation. I'd like to ditch the floppy for booting to hdc very much and just select it from the menu. Can anyone shed some light as to what i'm doing wrong?
 
Old 11-13-2003, 04:59 PM   #2
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
If you take a close look at the "root=LABEL=/" argument you will see that you are using it to refer to two different partitions. The solution is to relabel the partitions. It would probably be easier to relabel both of them to avoid confusion. To boot RH9 on hdc you will have to select it in the grub menu and then press "a" so you can edit the kernel arguments. Change "root=LABEL=/" to "root=/dev/hdc1" and hit enter.

Once you do manage to boot there is a good chance that RH9 on hdc may complain about not being able to find the root filesystem when it tries to fsck it and remount it. In the case it will drop you to a maintainace shell. You can still make you changes using the maintaince shell. It you do get dropped to a maintaince shell you have probably managed to boot off hdc. It you don't get dropped to a maintainace shell then you have booted off hdb. Assuming your root filesystem on /dev/hdb1 is ext2/ext3 then you can relabel it using e2label.

# e2label /dev/hdc1 "rh9_2:/"

You may also do this from after booting RH9 from hdb if you wish. If you are in the maintainance shell then you will need to remount the root filesystem and in read-write mode before you can make the necessary changes to /dev/fstab.

# mount -wo remount /

The line in fstab that you have to change will either look line

LABEL=/ / ext3 defaults 1 1

or

/dev/hdc1 / ext3 defaults 1 1

Find this line and change it to

LABEL=rh9_2:/

If you have booted RH9 from hdb then you will have to mount the root filesystem of RH9 on hdc somewhere so you can edit it.

# mkdir /mnt/hdc1
# mount /dev/hdc1 /mnt/hdc1

The last step is to edit grub.conf, which ever partition you have it on, and change the entries for the second copy of RH9 to

title Redhat Copy Cat (2.4.20-8)
root (hd2,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=rh9_2:/ hdd=ide-scsi
initrd /initrd-2.4.20-8.img
title Redhat Copy Cat Kern2 (2.4.20-20.9)
root (hd2,0)
kernel /vmlinuz-2.4.20-20.9 ro root=LABEL=rh9_2:/ hdd=ide-scsi
initrd /initrd-2.4.20-20.9.img

The final step is the reboot and check if you can boot RH9 off hdc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Boot Multi Windows & Multi Linux olkar Linux - Newbie 5 10-03-2005 11:52 AM
multiboot, multi HD, multi distro install help pfschim Suse/Novell 4 05-25-2005 06:28 PM
How do you change card# of multi multi-media cards. Nichole_knc Slackware 3 12-01-2004 12:49 PM
2 Hard drives, multi OSes, LILO & GRUB Failures B4UTRUST Linux - Newbie 1 02-29-2004 07:13 AM
GRUB, Multi Linux/Multi Disk Boot gtnorton Linux - Software 1 03-16-2003 03:48 AM


All times are GMT -5. The time now is 08:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration