LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-05-2005, 08:55 PM   #1
jesusphreak
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Rep: Reputation: 0
Question Installed GRUB on 3rd hard drive, how do I boot 1st drive?


Hi,
I have 3 hard drives with several different partitions.
I have 2 copies of Windows XP Pro, Ubuntu linux, and Fedora Core 2 linux all installed on the first physical hard drive (different partitions obviously)
I have been using Grub to boot between them all but yesterday Windows got messed up and required me to reinstall. After that I was unable to boot Linux so I installed another version of Fedora Core 2 onto my third physical drive.
Now the new install of Fedora (on the third drive) boots but not any of the other versions.
I tried configuring grub.conf to boot the others but I am assuming that it is failing because of grub being installed on my third drive (hdd) but the other OSs are all installed on hda.
I do not have a GRUB boot partition on hda because I was not aware of how much trouble it would save me in the long run.
Here is my grub.conf as well as my hard drive information:

grub.conf

Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd2,0)
#          kernel /boot/vmlinuz-version ro root=/dev/hdd1
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd2,0)/boot/grub/splash.xpm.gz
title Fedora Core 2 (2.6.5-1.358)
	root (hd2,0)
	kernel /boot/vmlinuz-2.6.5-1.358 ro root=LABEL=/1 rhgb quiet
	initrd /boot/initrd-2.6.5-1.358.img
title Fedora Core 2 (.771)(hda7)
	root (hd0,7)
	kernel /boot/vmlinuz-2.6.10-1.771_FC2 ro root=/dev/hda7
	initrd /boot/initrd-2.6.10-1.771_FC2.img
title Windows XP a
	rootnoverify (hd0,0)
	chainloader +1
title Fedora Core 2b
	rootnoverify (hd0,6)
	chainloader +1
title Windows XP b
	rootnoverify (hd0,4)
	chainloader +1
title Ubuntu
	rootnoverify (hd0,8)
	chainloader +1
The first boot option, "Fedora Core 2 (2.6.5-1.358)" is the only one bootable. It was automatically set when Fedora installed it. All the other entries were desperate attempts, by myself, at getting the other OSs to boot.

Here is my drive information:

Code:
[root@localhost root]# /sbin/fdisk -l
 
Disk /dev/hda: 40.0 GB, 40027029504 bytes
16 heads, 63 sectors/track, 77557 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          20321     10241406     c  W95 FAT32 (LBA)
/dev/hda2           20321       77552     28844676+   f  W95 Ext'd (LBA)
/dev/hda5           20321       36577     8193118+    b  W95 FAT32
/dev/hda6           36577       38665     1052226     82  Linux swap
/dev/hda7           38665       57009     9245376     83  Linux
/dev/hda8           57009       59097     1052226     82  Linux swap
/dev/hda9           59097       77552     9301603+  83  Linux
 
Disk /dev/hdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1       19457   156288321    c  W95 FAT32 (LBA)
 
Disk /dev/hdd: 33.8 GB, 33820284928 bytes
16 heads, 63 sectors/track, 65530 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1   *           1           30883     15565000+  83  Linux
/dev/hdd2           30884       32508      819000   82  Linux swap
/dev/hdd3           32509       34133      819000   82  Linux swap
I'm sure this is something really easy to fix or at least an easy answer of the best way to start over.
Thanks for any help,
Stephen
 
Old 04-05-2005, 09:18 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I'm at a lost to explain why XP won't boot - maybe try adding makeactive to each entry.
For the other Fedora, try
Code:
title Fedora Core 2 (.771)(hda7)
	root (hd2,0)
	kernel (hd0,6)/boot/vmlinuz-2.6.10-1.771_FC2 ro root=/dev/hda7
	initrd (hd0,6)/boot/initrd-2.6.10-1.771_FC2.img

Last edited by syg00; 04-05-2005 at 09:19 PM.
 
Old 04-05-2005, 09:48 PM   #3
jesusphreak
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Wow, quick reply.
I have worked on this for so long and retyped the entries so many times and Windows never worked but I guess I did something right at one point and never checked again as I pull all my focus on getting Fedora to boot. Windows does boot.
After editing grub.conf with the alterations you suggested it works like a charm. Thanks!
I'm just trying to understand this now... Why would Windows boot but not Linux (well, didn't) when they are both on the same drive? I read the:
Quote:
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd2,0)
# kernel /boot/vmlinuz-version ro root=/dev/hdd1
# initrd /boot/initrd-version.img
but couldn't make sense of where to put "(hd2,0".

Also, Now that I have it all running again, what should I do to be prepared for next time I can't boot (either after reinstalling windows, reinstalling linux, or just boot failure.)? Since I have access to everything right now I would like to be prepared next time. Just the info that I've learned so far will help out allot, but is there a way to make a backup or something?
Thanks again for the quick response! You have no idea how long I tried doing this on my own!
-Stephen
 
Old 04-05-2005, 10:20 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally posted by jesusphreak
I'm just trying to understand this now... Why would Windows boot but not Linux (well, didn't) when they are both on the same drive?
Nothing to do with the physical drive - more the partition. Once loaded, ntldr has all the info it needs in the XP partition. Grub simply needs to know where it is, and transfer control to it. After all, ntldr *is* a boot-loader, and handles it all itself.
For Linux, you need a boot-loader - all the smarts are in the directory you installed grub to.
Hence the need for the root(hd2,0) directive - this is for grub.
Normally you would have your kernel images in here too, but as you see, you can address it absolutely in need.
Quote:
Also, Now that I have it all running again, what should I do to be prepared for next time I can't boot (either after reinstalling windows, reinstalling linux, or just boot failure.)? Since I have access to everything right now I would like to be prepared next time. Just the info that I've learned so far will help out allot, but is there a way to make a backup or something?
All you need is grub.conf. Create a copy on disk, put another on floppy, whatever.
Trying to backup the MBR is a mugs game. Seriously not worth trying.
Better option is to re-install if it gets over-written/corrupted.

Last edited by syg00; 04-05-2005 at 10:22 PM.
 
Old 04-06-2005, 09:34 AM   #5
jesusphreak
LQ Newbie
 
Registered: Jan 2005
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks,
 
  


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
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Installed FC3 on hard drive that contained SuSE 9.0, now it won't boot wyldeone Fedora 3 01-16-2005 12:28 AM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 01:47 AM
FC2 install on 2nd drive, no dual-boot, will install modify 1st WinXP drive at all? Equisilus Fedora - Installation 14 06-27-2004 02:38 AM
3rd Hard drive as slave to CDRW?? rberry88 Linux - General 2 12-07-2003 12:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:01 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