LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation
User Name
Password
Fedora - Installation This forum is for the discussion of installation issues with Fedora.

Notices


Reply
  Search this Thread
Old 02-25-2010, 11:40 AM   #1
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 108

Rep: Reputation: 15
Stuck: GRUB Loading Stage2...


Okay guys looks like I screwed up. Last night I installed Fedora 12 and now GRUB is stuck saying "GRUB Loading Stage2..."

Here's my setup:

/dev/sda -- 250 GB parallel ATA IDE Hard Drive, formatted at NTFS with Windows XP installed. Windows couldn't handle all 250 GB as one partition so it is split up into two.

/dev/sdb -- 60 GB parallel ATA IDE Hard Drive, formatted for EXT4 one partition a 200 MB boot partition, the rest a logical volume management group separated into swap, /home, and root (/).

Here's the background:

Before all of this was done, I had Fedora 8 on /dev/sdb and I believe GRUB was on the MBR of /dev/sda. It was dual boot and I would like to keep it that way. While installing from DVD, the Fedora 12 installer came up I did the above formatting and partitioning for /dev/sdb, and I kept my XP drive completely untouched. Then after that the installer had a check-box that said something like "Install Boot Loader on /dev/sdb" which was checked by default. I thought that this was probably wrong, but fearing destroying my XP boot loader, I rationalized that at least if I messed with /dev/sdb it would not break my Windows install, so I continued and had the boot loader installed on /dev/sdb.

Okay now here's my question:

How do I fix GRUB so I can dual boot Fedora 12 and Windows XP?

I don't fully understand how GRUB's chain-loader works with XP's boot loader, so I am hesitant to do anything else before I know what I am doing.
 
Old 02-25-2010, 01:07 PM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
Can you post your grub.conf here ?

Can you access the old grub.conf on /dev/sda ?

You can boot from the Fedora disc again and choose rescue from the boot menu

http://dailypackage.fedorabook.com/i...ling-Grub.html

See if it finds both grub.conf files (hd0,0) and (hd1,0)
The latter is the new one.
 
Old 02-25-2010, 01:32 PM   #3
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 108

Original Poster
Rep: Reputation: 15
Yes I will do that when I get home from work.

One other idea, does the BIOS factor into whether or not the hard drive will boot? Is it even possible to boot off of a secondary drive?
 
Old 02-25-2010, 02:00 PM   #4
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
Quote:
Originally Posted by mjl3434 View Post
Yes I will do that when I get home from work.

One other idea, does the BIOS factor into whether or not the hard drive will boot? Is it even possible to boot off of a secondary drive?
Yes it is possible to boot off a secondary drive, and you can usually set the boot order in the bios.

I wouldn't change any of that yet though.

It would be interesting to see which disk grub is starting from though.

If you haven't changed the boot order of the disks, then it should find the old grub first. Maybe it is, but it can't understand the config of /dev/sdb and the new settings for grub that it finds there.

Ideally, you would want to copy the entry for fedora in the new grub over to the old grub and modify the disk references to reflect where everything now is.

But try a rescue first.
 
Old 02-25-2010, 09:15 PM   #5
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 108

Original Poster
Rep: Reputation: 15
I booted FC12 in rescue mode, the devices under /dev/sdX are:

/dev/sda1
/dev/sda2
/dev/sda5

/dev/sdb1
/dev/sdb2

It said /dev/sdb1 was already mounted, so that's part of my linux system as expected. When I tried to mount /dev/sdb2 it says "mount: unknown filesystem type 'LVM2_member'". I could successfully mount /dev/sda1 and /dev/sda5, those were clearly the NTFS partitions that contain Windows XP.

If there is a grub.conf installed on /dev/sda I could not find it.


This is grub.conf from /dev/sdb:

Code:
# 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/mapper/VolGroup-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sdb
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora 12 (2.6.31.12-174.2.22.fc12.i686.PAE)
	root (hd0,0)
	kernel /vmlinuz-2.6.31.12-174.2.22.fc12.i686.PAE ro root=/dev/mapper/VolGroup-lv_root  LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
	initrd /initramfs-2.6.31.12-174.2.22.fc12.i686.PAE.img
title Windows XP
	rootnoverify (hd1,0)
	chainloader +1
I also looked in the BIOS and the boot order had the 250 GB Windows one first, followed by the 60 GB Linux drive. I reversed the order, setting the Linux one first. Then when I boot GRUB works, however only Linux will boot, if I try to boot Windows it goes to a blank screen, and hangs there forever.

Last edited by mjl3434; 02-25-2010 at 09:20 PM.
 
Old 02-25-2010, 09:37 PM   #6
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
Ok, that config is the reverse of the way the disks are in real life.

/dev/sda should be (hd0)
/dev/sdb should be (hd1)

have a look at device.map (next to grub.conf in /boot/grub)

Technically it should have the same as above, but I bet it's back to front :
Code:
/dev/sda (hd1)
/dev/sdb (hd0)
Does windows boot ok ?
What's on sda2 ?

Did you run the section from the howto link I posted, where you use a grub prompt ?

That could help find the problem.
The only bit to run (non-destructive) is the :
Code:
find /grub/grub.conf
but run
Code:
/boot/grub.conf
as well

After it gives an answer you can use
Code:
quit
to exit the grub shell.

Last edited by smoker; 02-25-2010 at 09:38 PM.
 
Old 02-25-2010, 10:14 PM   #7
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 108

Original Poster
Rep: Reputation: 15
Does windows boot ok ?

No, Windows DOES NOT boot ok. It hangs at a black screen.

What's on sda2 ?

I think sda2 was created as an extended partition that contains /dev/sda5, this is how it graphically showed up on the FC12 installer, sda5 was literally drawn inside of sda2. I think XP did this when I was installing my 250 GB hard drive because it was too big to all be on one partition (don't ask me why, that's just how it is).

device.map shows:

Code:
# this device map was generated by anaconda
(hd1)        /dev/sda
(hd0)        /dev/sdb
find /grub/grub.conf returns:

Code:
 (hd1,0)
but run /boot/grub.conf as well:

I'm sorry, I do not understand what command I should run? Can you rephrase this one?

Given what we know, should I correct both grub.conf and device.map? What should I do to get Windows XP to boot again?
 
Old 02-25-2010, 10:45 PM   #8
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
I meant run "find /boot/grub/grub.conf" while in the grub shell prompt.

Doesn't matter really.

Can you change the windows section of your grub.conf to be like this :

Code:
title Windows XP
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1,0)
makeactive
chainloader +1
Then try and boot windows.
 
Old 02-25-2010, 11:05 PM   #9
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 108

Original Poster
Rep: Reputation: 15
WOW!!!!! It works!!!! Thanks so much!!!!

Now can you explain exactly what is going on here? What does device.map do? What do those lines I added in the grub.conf do? Why does everything work even though the values in grub.conf and device.map are backwards vs reality?

Basically why is it that what you told me works?
 
Old 02-25-2010, 11:28 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,814

Rep: Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171Reputation: 2171
Windows loader is not multi-boot compliant - it always has to boot off the "first" drive. So we fool it (not too difficult given its inherent stupidity ... ) into thinking it is booted off the first drive.

I think you'll find device.map is only used during install of grub.
 
Old 02-26-2010, 05:07 AM   #11
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
I guess you're still stuck with a non booting Fedora though.
If it's getting to the point of loading stage 2, then it might be worth editing that grub.conf one last tiem and changing the fedora lines to look like:

Code:
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora 12 (2.6.31.12-174.2.22.fc12.i686.PAE)
	root (hd1,0)
	kernel /vmlinuz-2.6.31.12-174.2.22.fc12.i686.PAE ro root=/dev/mapper/VolGroup-lv_root  LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
	initrd /initramfs-2.6.31.12-174.2.22.fc12.i686.PAE.img
You're only changing the root and splashimage lines to reflect the correct drive for Fedora.

Last edited by smoker; 02-26-2010 at 05:09 AM.
 
  


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
Grub Loading stage2.... (hang) zdenisl Linux - Software 8 02-23-2011 03:24 AM
What is GRUB loading Stage2? redhat5 Linux - Newbie 6 08-09-2009 12:20 AM
GRUB Loading Stage2... unicornsoftsol Linux - Newbie 1 06-30-2008 03:19 AM
GRUB Loading stage2 problem SBN Linux - Distributions 3 06-26-2007 08:18 AM
Stuck on grub (loading stage2) Crazy_lenny Linux - Hardware 3 06-23-2006 12:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation

All times are GMT -5. The time now is 01:27 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration