LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-21-2008, 12:31 AM   #1
knikhil271083
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
Master/Slave Booting Problem in RH Linux 9.0


Hi all,
I really need help on this one.
I have a CPU that has a slot for a 2.5" HDD (20GB) and a compact flash (512 MB). Using the jumper settings on the CPU board, I have made the compact flash as a 'master' & the HDD as a slave.
I want to install RH Linux9.0 on both the HDD & CF. I first installed linux 9.0 on the CF by using the minimum packges required and placed the boot loader in the CF. After the successful installtion in CF, I rebooted the system without the bootable CD & it booted without any problem in CF.
Next I booted the system with the linux CD & installed the Linux in the HDD and this time, on asking, gave the option to install the boot loader in hda i.e the CF (HDD is hdb).Everything went on smoothly for installation.
Then, when i booted the system i saw only one entry in grub menu and the system is booting in the HDD by default. There is a option in the system BIOS to select the booting device. When I select the CF to boot from, it shows, GRUB Error 15.
I want two entries in the GRUB menu, one for the CF & the other for the HDD. And on selecting the respective entry the system should boot from the respective drive. I have linux 9.0 on both the drives. On googling the problem all solutions are for Win/Linux or Windows on one HDD & linux on other HDD. No search highlights on the same linux distribution on two diff. drives.

Expect help in this regards from the forum.
Lookng fwd for some reply

Nikhil
 
Old 02-22-2008, 02:42 PM   #2
graymon
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Rep: Reputation: 0
This might help. I just installed fedora 8 on a CF card. The designators in the grub.conf: root(hd0,0) and root (hd1,0) changed on my system based on the boot order in the bios. your /boot/grub/grub.conf should look something like this.

title Fedora (2.6.23.15-137.fc8)
root (hd0,0)
kernel /vmlinuz-2.6.23.15-137.fc8 ro root=/dev/VolGroup00/LogVol00 rhgb
quiet
initrd /initrd-2.6.23.15-137.fc8.img

title CF
root(hd1,0)
kernel /vmlinuz-2.6.23.1-42.fc8 ro root=/dev/VolGroup01/LogVol00
initrd /initrd-2.6.23.1-42.fc8.img


This boots both the CF card and the HD.

note - if the boot order changes and the it reads grub from the cf first rather that the drive, you will need to flip the (hd0,0) (hd1,0) around. If you plan on changing the boot order, you'd should get familiar with the command line part of grub, and rename the images form vmlinuz-2.6.23.15-137.fc8 to something link vmliuz
 
Old 02-24-2008, 11:54 PM   #3
knikhil271083
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Hi graymon,
first of all, thanx a lot, for showing me some light.
But still, i have a question or two.
1. have you installed the same FC8 with the same kernel version? I got this doubt since the vmlinux & initrd file entries are different for hd0 & hd1.
2. Is it possible to rename the img files to some other names as u've mentioned or there are some limitations for this?

BTW I m going to try ur suggestions 2day. Hope it works.

Once again thanx a lot.

Nikhil
 
Old 02-26-2008, 08:30 AM   #4
graymon
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Rep: Reputation: 0
Sorry about some of the confusion - I just cut and pasted the grub.conf file. I haven't booting into the CF card and "yum update"ed it So the kernel didn't match.

You can rename the kernel and initrd as long as grub.conf matches the actual filename. I usually don't touch them, so when yum updated the kernel, it knows where to find the old ones. But for things like putting rescue disks and installer disks on the flash card, i usually rename them.

kernel /vmlinuz
initrd /initrd

Good Luck, after some hacking around, it should work fine.
 
Old 02-27-2008, 04:14 AM   #5
knikhil271083
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Hi graymon,
i tried your stuff but it didn't work. But by god's grace i seem to have found another solution.

Let me start from the first: I have a system in which a 512MB Compact Flash (CF) is a master and a 20GB 2.5" Hard Disk Drive (hdd-a laptop hdd) as a slave. My requirement was that i must be able to boot both, the CF & hdd, from a common GRUB menu that comes from the grub.conf file in the master i.e CF. It is to be noted that both, the CF & the hdd, has the same linux distribution (Red Hat Linux 9.0 kernel 2.4.20-8).

Solution:
First I installled Linux on the CF (master). Installed the grub (boot loader)on hda i.e CF (master). Then i installed linux on hdd (slave) by choosing the option of not installing the boot loader.
Then i rebooted the system and went to CF (hda).
Run the command "fdisk -l" that list all the disks with their partitions. It shows the CF as hda and hdd as hdb.
there is a /boot folder in CF. Create another folder '/boot1'. Now, mount the /boot partition of hdb (hard disk). You can find there three files viz. "initrd-(ver. no.).img", vimlinz-(ver. no.) & System.map-(ver. no.). Copy these files to '/boot1' folder in the CF.
Now there is time to modify the entries in the menu.lst file in the CF. You can reach the menu.lst file by typing the following command: cd /boot/grub. U can find the menu.lst in this grub folder. The final menu.lst will look as shown below:

default=0
timeout=10
splashimage=(hdo,0)/boot/grub/splash.xpm.gz

#the following entry is for CF that is default
title Red Hat Linux (2.4.20-8) flash
root (hd0,0)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/123
initrd /boot/initrd-2.4.20-8.img

#the following entry is for HDD that I have added later
title Red Hat Linux (2.4.20-8) HDD
root (hd0,0)
kernel /boot1/vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /boot1/initrd-2.4.20-8.img

After you make changes to the menu.lst file, save the changes and reboot the system.

You will see a grub menu that shows the following two lines:

Red Hat Linux (2.4.20-8) flash
Red Hat Linux (2.4.20-8) HDD

Select the required entry and you will be routed to either CF of HDD.


Thanks to graymon once again for the help.

Regards
Nikhil
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux harddisk converted from master to slave. What files to change? jagot Linux - Hardware 6 03-05-2006 11:59 AM
Change former Linux master harddisk to slave thort Linux - Newbie 4 02-28-2006 04:42 PM
How do I change the my hd (with linux) from slave to master and have grub boot? r3dhatter Linux - Newbie 6 02-21-2005 01:06 AM
Problem with XP on master drive and Linspire 4.5 on slave jkdawson Linux - Software 7 01-10-2005 06:42 PM
Problem swapping IDE Master/Slave azjazz Linux - Hardware 17 12-15-2002 09:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration