LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-07-2006, 10:12 AM   #1
adityamooley
LQ Newbie
 
Registered: Apr 2004
Location: Nagpur, India
Distribution: Fedora Core 4
Posts: 5

Rep: Reputation: 0
Grub problem for Dual boot with two hard disks


Hello all,

I tried to search the forum for the problem I am facing but I didn't get the required answer. So, I am posting my question here. But before that let me say that I am pretty new Linux.

I have FC2 and WinXP installed on one HardDisk (40GB Segate) and is working fine. I got a new HDD (80GB Segate) and installed FC4 on it. Now FC4 boots fine but I am not able to boot from my old HDD. It shows two options in GRUB but when I choose second option (FC2 & XP) it fails to load.

My grub.conf looks like this

Quote:
# 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 (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/hda1
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,0)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img
title FC2 & Windows
rootnoverify (hd1,0)
chainloader +1
I don't know what other information I should provide. If someone let's me know, I will happily provide one

Thanks in advance for all your help.

Aditya
 
Old 02-07-2006, 10:52 AM   #2
TruongAn
Member
 
Registered: Dec 2004
Location: Vietnam (Việt Nam)
Distribution: Gentoo (desktop), Arch linux (laptop)
Posts: 725

Rep: Reputation: 33
Do you see the line
Code:
 title FC2 & Windows
change it to
Code:
title FC2 & Windows
map (hd1) (hd0)
man (hd0) (hd1)
change the last line to
Code:
 chainloader (hd1,0) +1
 
Old 02-07-2006, 11:28 AM   #3
adityamooley
LQ Newbie
 
Registered: Apr 2004
Location: Nagpur, India
Distribution: Fedora Core 4
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for your help.
But now I am getting an error:
Quote:
Error 1 : Filename must be either an absolute pathname or blocklist
The Grub now looks like this
Quote:
Top portion remains the same
........
title FC2 & Windows
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1,0)
chainloader (hd1,0) +1
Thanks
 
Old 02-07-2006, 12:52 PM   #4
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Try changing
Code:
chainloader (hd1,0) +1
to
Code:
chainloader +1
The rootnoverify (hd1,0) has alreday indicated the root partition of your XP. The above only works if you have Xp in the first partition of the second bootable disk.

List the content of
Code:
fdisk -l
here and we can give you the amendment to boot Fc2

Last edited by saikee; 02-07-2006 at 12:55 PM.
 
Old 02-07-2006, 12:59 PM   #5
adityamooley
LQ Newbie
 
Registered: Apr 2004
Location: Nagpur, India
Distribution: Fedora Core 4
Posts: 5

Original Poster
Rep: Reputation: 0
I will try changing the code as suggested.

Meanwhile here's the contents of fdisk -l

Quote:
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1530 12289693+ 83 Linux
/dev/hda2 1531 6119 36861142+ b W95 FAT32
/dev/hda3 6120 6195 610470 82 Linux swap / Solaris
/dev/hda4 6196 9729 28386855 5 Extended
/dev/hda5 6196 9729 28386823+ 83 Linux

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 1912 15358108+ c W95 FAT32 (LBA)
/dev/hdb2 1913 3059 9213277+ 83 Linux
/dev/hdb3 3060 4334 10241437+ 83 Linux
/dev/hdb4 4335 4865 4265257+ f W95 Ext'd (LBA)
/dev/hdb5 4335 4399 522081 82 Linux swap / Solaris
/dev/hdb6 4400 4865 3743113+ b W95 FAT32
Thanks
 
Old 02-07-2006, 01:44 PM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
The easiest way to boot Fc2 would be

Boot up FC4 first, log in as root, make a temporary directory in /mnt, mount the root of FC2 (I estimate it to be hdb3), change root to FC2, while inisde FC2 restore FC2 Grub in its root partition, exit back to FC4, edit FC4's /boot/grub/menu.lst to "chianload" FC2.
Code:
mkdir /mnt/hdb3
mount /dev/hdb3 /mnt/hdb3
chroot /mnt/hdb3
grub-install /dev/hdb3
exit
To make Fc2 chainloadable by FC4 add these lines in FC4's /boot/grub/menu.lst (Grub counts from 0 so (hd1,2)=hdb3)
Code:
title Fc2 in hdb3
root (hd1,2)
chainloader +1
 
Old 02-07-2006, 02:05 PM   #7
adityamooley
LQ Newbie
 
Registered: Apr 2004
Location: Nagpur, India
Distribution: Fedora Core 4
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks a lot.
I am too tired at the moment to try this out.
I will do this tomorrow and report back here.

BTW
Quote:
Originally Posted by saikee
Try changing
Code:
chainloader (hd1,0) +1
to
Code:
chainloader +1
The rootnoverify (hd1,0) has alreday indicated the root partition of your XP. The above only works if you have Xp in the first partition of the second bootable disk.

List the content of
Code:
fdisk -l
here and we can give you the amendment to boot Fc2
took me directly to my XP installation so my half job is done

Thank you very much once again.

Aditya
 
Old 02-08-2006, 07:18 AM   #8
RanDrake10
Member
 
Registered: Oct 2004
Location: Florida
Distribution: Debian
Posts: 319

Rep: Reputation: 30
Add an entry in FC4 grub like,

title Fedora Core 2
root (hd1,1)
kernel /boot/vmlinuz-2.6.* ro root=LABEL=/1 rhgb quiet
initrd /boot/initrd-2.6.*.img

Look in hdb2 /boot and add the vmlinuz and initrd entrys for FC2 in place of * above.
Change root (hd1,1) for the FC2 root partition. In GRUB start counting at 0.
 
Old 02-08-2006, 08:03 AM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
RanDrake10's recommendation is one of the two alternative to boot FC2.

His method is "direct" booting where the root partition reference, kernel, initrd and the root location must be accurately specified. I refrained from doing it as you may have a job to locate the correct label for the root of FC2, especially from a LVM.

My proposed method is "indirect" booting whereby you use Grub to boot the FC2's Grub. That method requires only the root partition and the rest of the information can be omitted. That is exactly the same method your FC4 is booting Windows. The indrect booting method works on any Linux with Lilo too, in addition to any Dos, Windows, BSD and Solaris. That is why I labelled it as the "easiest" way.
 
Old 02-08-2006, 12:53 PM   #10
adityamooley
LQ Newbie
 
Registered: Apr 2004
Location: Nagpur, India
Distribution: Fedora Core 4
Posts: 5

Original Poster
Rep: Reputation: 0
@RanDrake10
I tried your solution but I got Kernal Panic error while booting in FC2.

@saikee
I tried your solution also, the only change I did is used hdb2 instead of hdb3 (my FC2 root is in hdb2) and I got
Code:
/dev/hdb2 does not have any corresponding BIOS drive.
I don't if this information is of any help, but both my HDD's are on Cable select and it shows only one HDD at a time in the Boot Priority section in BIOS.

This is turning out be a great experience for me and I am ready to play more with grub. So, please post other solutions if any.

Last edited by adityamooley; 02-08-2006 at 12:57 PM.
 
Old 02-08-2006, 01:14 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
In FC4, log in as root, invoke Grub shell and setup the boot loader agin in hdb2
Code:
grub
root (hd1,1)
setup (hd1,1)
All my disks are on cable select. The disk plugged to the end of the cable is automatically a master while the one plugged to the middle plug of the cable is always a slave. I have over 25 disks and swap them around all the time. My disks are in caddies insertable into any PC in seconds via mobile racks.

Remeber you have done a "fdisk -l" so the information in Linux is cast in stone. Some distros do report the bios drive not found in grub-install command and accept instruction in Grub shell. If it doesn't it can still be booted directly. That is based on my experience of booting over 100 of them. From the link you will find my FC2 in hda54, Fc3 in hda59, FC4 in hda22 and FC5 in hdc33.

If the Grub shell fails list the following information of FC2 here

(1) content of /boot/grub/menu.lst
(2) list the directory of /boot
(3) content of /etc/fstab
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot with 2 Hard-disks cooldeal Linux - Newbie 4 01-04-2006 03:53 PM
Two hard disks better for dual boot? zigzago Linux - Hardware 5 03-18-2005 03:29 AM
dual boot xp and mandrake 10.0 on two different hard disks bmxpunk Mandriva 9 04-25-2004 09:04 AM
Dual-boot on two Hard Disks, MBR, etc admanb Linux - Newbie 4 02-06-2004 04:45 PM
GRUB, MBR, red hat 9 winxp in dual hard disks samik Linux - Newbie 2 10-15-2003 02:29 PM


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