LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 08-20-2007, 10:53 PM   #1
kojot
LQ Newbie
 
Registered: Jul 2007
Location: Latvia
Distribution: Fedora
Posts: 13

Rep: Reputation: 0
GRUB loading ... (problem)


Hello.
There is a problem:
There are two IDE HDDs 250GB(primary master), 20GB(secondary master) and DVD-ROM(primary slave) on the computer.

###########################################################
fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/sda2 1913 30401 228837892+ f W95 Ext’d (LBA)
/dev/sda5 1913 10199 66565296 7 HPFS/NTFS
/dev/sda6 10200 22114 95707206 7 HPFS/NTFS
/dev/sda7 22115 30401 66565296 7 HPFS/NTFS



Disk /dev/sdb: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 2434 19446682+ 8e Linux LVM

###########################################################

There is WindowsXP on the first disk (sda), on the second - Fedora 7. GRUB is installed on the second disk (sdb) at MBR sector. When boot priority is sat from first disk in BIOS, all work normally (WindowsXP is booting). But when boot priority is sat from second disk in BIOS, there is such situation as:

GRUB loading Stage 1.5

Then dark screen (black), then after (~5 sec.) system is rebooting.
############################################################
grub.conf

# 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 (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sdb
default=1
timeout=15
splashimage=(hd1,0)/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.21-1.3194.fc7)
root (hd1,0)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title WindowsXP
rootnoverify (hd0,0)
makeactive
chainloader +1

#############################################################

#############################################################
device.map

# this device map was generated by anaconda
(hd0) /dev/sda
(hd1) /dev/sdb

#############################################################

If I boot from RESCUE DISK,
chroot /mnt/sysimage
Fedora7 is booting and startx is working (kde, gnome) too. But there is not login screen (login, password).

Can you help me, what is wrong? I’d like to boot system normally, by GRUB.
Thanks.
 
Old 08-20-2007, 11:46 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,222

Rep: Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019
Looks like Fedora was installed while the Windoze disk was the BIOS boot disk. Grub was installed on the second disk (hd1) - it goes looking for itself on the second disk.
But when you change the BIOS boot order, it (grub boot-loader) is now on hd0 MBR (i.e. the boot disk), but still goes looking on the second disk (which is now the Windoze disk) for /boot/grub/.
That's never going to work.

Simplest solution is to change the BIOS to make the Fedora disk the boot disk, and re-install completely. You could fix it manually from rescue mode, but you'd need to correct the MBR, update grub.conf, and correct fstab. If Fedora won't do a decent automatic recovery of grub, it will probably be easier to just re-install.
 
Old 08-22-2007, 11:35 AM   #3
kojot
LQ Newbie
 
Registered: Jul 2007
Location: Latvia
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
I reinstalled Fedora, when the boot priority is sat from second disk in BIOS.
GRUB is situated on sdb (MBR sector).

grub.conf
---
default=1
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.21-1.3194.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title Other
rootnoverify (hd1,0)
chainloader +1
---

device.map
---
(fd0) /dev/fd0
(hd0) /dev/sda
(hd1) /dev/sdb
---

But when boot priority is sat from second disk in BIOS, there is such situation as:
on the screen of monitor

GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB
GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB
GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB
GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB
GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB
 
Old 08-22-2007, 05:59 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,222

Rep: Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019
Mmmm - try this.
Leave the Linux disk as the (BIOS) boot disk, and boot into it from the CD. Open a terminal, and as root enter the following
Code:
grub
root (hd0,0)
setup (hd0)
Reboot and see how you go.

After you get a working system, amend the Windows section as below
Code:
title Other
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
Careful - there are spaces between parms in the "map" lines. That should get you Windoze as well. You might want to change the title on that stanza to something meaningful while you're at it.
 
Old 08-23-2007, 03:58 PM   #5
kojot
LQ Newbie
 
Registered: Jul 2007
Location: Latvia
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
I tried:
grub
root (hd0,0)
Filesystem type unknown, partition type 0x7
root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
setup (hd1)

When system was rebooted, I saw on the screen:
GRUB loading stage 1.5.
Then I saw black screen and after about 5 sec. system was rebooted automaticaly.

grub.conf
---
default=1
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.21-1.3194.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title WindowsXP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
---
 
Old 08-23-2007, 05:04 PM   #6
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 465

Rep: Reputation: 133Reputation: 133
Hello kojot,
Code:
grub
root (hd0,0)
Filesystem type unknown, partition type 0x7
root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
setup (hd1)
That part was well done. It confirmed that your Fedora /boot partition (the only type 83 in your posted fdisk) is hd1,0. It also installed GRUB in the master boot record of hd1. And according to your posts, that same drive (the 20GB drive with Fedora) is currently first in the BIOS boot order and syg00 told you to leave it that way. But the grub.conf is looking at the other drive (hd0,0) for the Fedora /boot partition...
Code:
grub.conf
---
default=1
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.21-1.3194.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title WindowsXP
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
I think you will be okay now if you edit your grub.conf back to the way it was but leave the BIOS drive boot order alone. If that works to boot Fedora, you also may need to get rid of the map lines for Windows XP. It's possible that you have been chasing your tail by changing two things at once (BIOS boot order & GRUB).

If it still isn't working, set the BIOS boot order to the way that boots Windows XP and don't touch it again. Install Fedora and allow it to install GRUB in the master boot record (the default, don't interfere with it). The BIOS should then boot GRUB which in turn will boot Fedora and XP. That is probably the the most popular method to dual boot XP and Fedora. It's the default. It's what you said you want in your first post. But it didn't happen because of this...
Quote:
Originally Posted by kojot in the first post

There is WindowsXP on the first disk (sda), on the second - Fedora 7. GRUB is installed on the second disk (sdb) at MBR sector.
P.S.: If you are doing all this on a Dell with the Dell PC Restore (Ctrl+F11) feature, then don't install GRUB in the master boot record. In that case, you have been very correct in avoiding that, but booting with the XP boot loader is an excellent option for that situation if you never get this to work out. Details available.

Last edited by stoat; 08-24-2007 at 07:19 PM.
 
Old 08-23-2007, 11:19 PM   #7
kojot
LQ Newbie
 
Registered: Jul 2007
Location: Latvia
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
I did some changes in 'grub.conf'.
Code:
default=1
timeout=15
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.21-1.3194.fc7)
   root (hd0,0)
   kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
   initrd /initrd-2.6.21-1.3194.fc7.img
title WindowsXP
   rootnoverify (hd1,0)
   map (hd0) (hd1)
   map (hd1) (hd0)
   chainloader +1
Now I can see 3 different messages on the screen:
Code:
GRUB loading stage 1.5.
Then I saw black screen and after about 5 sec. system was rebooted automaticaly.
Code:
GRUB loading Stage 1.5 


GRUB loading, please wait... 
Error 22
Code:
GRUB loading Stage 1.5 


GRUB loading, please wait... 
internal error: the second sector of stage 2 is unknown
 
Old 08-24-2007, 11:51 AM   #8
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 465

Rep: Reputation: 133Reputation: 133
I can't see any difference in your last two posted grub.conf files except for some indented lines. The last one still has Fedora on (hd0,0) and XP on (hd1,0), but the last known location of the Fedora /boot partition was (hd1,0).

Of course you should do want ever you want, but I strongly urge you to stop now, regroup, and do a standard default installation of Fedora alongside XP. That means this:
  1. The 250GB drive with XP is first in BIOS
  2. XP is booting normally and directly from BIOS
  3. Do no more changes to the BIOS drive order
  4. Install Fedora allowing the default installation of GRUB in the master boot record of sda.
P.S.: If you are doing all this on a Dell with the Dell PC Restore (Ctrl+F11) feature, then don't install GRUB in the master boot record. In that case, you have been very correct in avoiding that, but booting with the XP boot loader is an excellent option for that situation if you never get this to work out. Details available.

Last edited by stoat; 08-24-2007 at 07:20 PM.
 
Old 08-25-2007, 12:58 AM   #9
kojot
LQ Newbie
 
Registered: Jul 2007
Location: Latvia
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
I'm sorry. I was wrong in my last post.
grub.conf
Code:
default=1
timeout=15
splashimage=(hd1,0)/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.21-1.3194.fc7)
   root (hd1,0)
   kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
   initrd /initrd-2.6.21-1.3194.fc7.img
title WindowsXP
   rootnoverify (hd0,0)
   map (hd0) (hd1)
   map (hd1) (hd0)
   chainloader +1
By the way, is it correct?:
Code:
grub>root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
grub>setup (hd1)
  Checking if "/boot/grub/stage1" exists... no
  Checking if "/grub/stage1" exists... yes
  Checking if "/grub/stage2" exists... yes
  Checking if "/grub/e2fs_stage1_5" exists... yes
  Running "embed /grub/e2fs_stage1_5 (hd1)"... 15 sectors are embedded.
succeeded
  Running "install /grub/stage1 (hd1) (hd1)1+15 p (hd1,0)/grub/stage2 /grub/grub.conf"... succeeded
Done
 
Old 08-25-2007, 08:26 AM   #10
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 465

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by kojot

By the way, is it correct?
Hello again kojot,

Yes, it tells you that the Fedora boot partition is hd1,0 and GRUB was successfully installed in the master boot record of hd1.

If that drive still does not boot when first in the BIOS drive order, then let's stop and recap for a moment...

1. XP is installed on the 250GB drive and Fedora is installed on the 20GB drive. (post #1)

2. You originally installed GRUB in the MBR of the 20GB drive and it would not boot when first in the BIOS boot order. (post #1)

3. You reinstalled Fedora on the 20GB drive with it set as first in the BIOS boot order and installed GRUB in the MBR of what you identified as "sdb". That wouldn't boot. (post #3)

4. Using linux rescue and the GRUB shell, you confirmed that the Fedora boot partition was at that moment hd1,0 and you reinstalled GRUB in hd1. But the grub.conf posted had the drives reversed from that. That wouldn't boot. (post #5)

5. You corrected the grub.conf by reversing the drive devices. It still did not boot. (posts #7 & #9)

Now then, if you are not interested in my suggestion (posts #6 & #8) to do a normal standard dual boot installation of XP+Fedora with GRUB in the MBR of the XP drive (an understandable objection...many agree with you), then there is one more idea to try and salvage what you are now trying to do:
  1. Power down the computer and unplug the XP drive's power connector.
  2. Power back up and enter the BIOS setup.
  3. Set the the 20GB drive to first in the BIOS boot order and leave it that way.
  4. Install Fedora again with GRUB in the MBR.
  5. Power down and reconnect the XP drive.
  6. Power back up and boot into Fedora. Finish the initial setup screens.
  7. Add the drive mapping lines to the XP section of grub.conf (see post #4 by syg00).
  8. Now BIOS boots GRUB which offers Fedora and XP, but your XP drive's MBR remains unchanged by GRUB.
I didn't make this up. It's known by many as Jim Lawrence's dual boot method. He describes it in his wiki. That site is down a lot. It's down right now. You can read my paraphrasing of it in another thread. There's a link to Jim Lawrence's wiki there, too (when it works).

Think about things, decide, try again. This is not supposed to go like this with such a typical hardware setup as yours. Good luck.

Last edited by stoat; 08-25-2007 at 09:45 AM.
 
Old 09-01-2007, 12:48 AM   #11
kojot
LQ Newbie
 
Registered: Jul 2007
Location: Latvia
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by stoat View Post
Now then, if you are not interested in my suggestion (posts #6 & #8) to do a normal standard dual boot installation of XP+Fedora with GRUB in the MBR of the XP drive...
I did it before. When I install GRUB on MBR of XP drive, there are the same problems as I posted before.

I tried:
1.
Quote:
Power down the computer and unplug the XP drive's power connector.
It's OK.
2.
Quote:
Power back up and enter the BIOS setup.
It's OK.
3.
Quote:
Set the the 20GB drive to first in the BIOS boot order and leave it that way.
It's OK.
4.
Quote:
Install Fedora again with GRUB in the MBR.
It' OK.

When I reboot system (I did not connect XP drive):
Code:
GRUB loading stage 2
Then I saw black screen and after about 5 sec. system was rebooted automaticaly.
I tried:
Code:
grub> root (hd0,0)
grub>setup (hd0)
When I reboot system (I did not connect XP drive):
Code:
GRUB loading stage 1.5
Then I saw black screen and after about 5 sec. system was rebooted automaticaly.
5.
Quote:
Power down and reconnect the XP drive.
It's OK.
But the problems are the same.
 
Old 09-01-2007, 10:44 AM   #12
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 465

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by kojot

I tried:

1. Power down the computer and unplug the XP drive's power connector.
It's OK.

2. Power back up and enter the BIOS setup.
It's OK.

3. Set the the 20GB drive to first in the BIOS boot order and leave it that way.
It's OK.

4. Install Fedora again with GRUB in the MBR.
It' OK.

When I reboot system (I did not connect XP drive):
Code:
GRUB loading stage 2
Then I saw black screen and after about 5 sec. system was rebooted automaticaly.
I tried:
Code:
grub> root (hd0,0)
grub>setup (hd0)
When I reboot system (I did not connect XP drive):
Code:
GRUB loading stage 1.5
Then I saw black screen and after about 5 sec. system was rebooted automaticaly.
Hello again kojot,

I've been thinking about this all morning today. After what you just posted, I can't think of a reason why Fedora does not boot now. You installed Fedora as the only system on a single drive with GRUB installed in the master boot record.

I searched the Internet with the phrase fedora hangs "GRUB loading stage2". There are lot of things to read going back a few years. One thing that I thought could be relevant is a motherboard issue. You should post your motherboard model here. Maybe someone will recognize it and confirm an issue with it and GRUB. In one post like that, a person installed LILO and used it to boot Fedora. It was a compromise, but it worked. I wouldn't like having to do that.

But the LILO thing gave me one last idea for you to think about: Try using the Windows boot loader (NTLoader) to boot Fedora. If other people experiencing such an unsolvable GRUB hang can use LILO, why couldn't NTLoader work as well? It's my preferred dual booting method. I won't list instructions now in case you're not interested, but there is another thread here where someone with a kind of similar GRUB hang used the XP boot loader. It's a two-page thread but might be worth a few of your minutes to read through it. The instructions to boot with NTLoader are in that thread, too. I will have no hard feelings if you are not interested. I think I am out of ideas now.

Anyone with a new or better idea, please help kojot now.
 
Old 09-02-2007, 01:42 PM   #13
kojot
LQ Newbie
 
Registered: Jul 2007
Location: Latvia
Distribution: Fedora
Posts: 13

Original Poster
Rep: Reputation: 0
Thank you, stoat.
I upgraded my motherboard BIOS. Reinstall Fedora.
It's working !!!
No more problems !!!

By the way, my computer configuration:
CPU - Pentium4 3.06GHz
motherboard - Intel D102GGC2
Video - inegrated Radeon Xpress 200 (128Mb)
RAM - DDR2 1024Mb
IDE:
Primary master - HDD 250 Gb
Primary slave - DVD-ROM/CD-ROM/CD-R/CD-RW
Secondary master - HDD 20 Gb
 
  


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
what is Grub loading error 21, and how can I fix the problem! logiplex Linux - Software 26 06-30-2009 03:20 PM
GRUB Loading stage2 problem SBN Linux - Distributions 3 06-26-2007 08:18 AM
Problem loading W2k with Grub JulyForToday Linux - Newbie 2 07-10-2006 11:26 PM
grub loading problem cool123 Linux - Software 2 03-12-2006 10:18 AM
Boot problem with GRUB (for loading DOS) djkoe Linux - General 1 01-03-2004 08:00 PM


All times are GMT -5. The time now is 04:26 AM.

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