LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-08-2009, 04:37 AM   #1
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Rep: Reputation: 15
Red face What is GRUB loading Stage2?


I have a RHEL5 Desktop installation on a NOTEBOOK Compaq 6710.

5 out of ten times, when i turn the system ON, the screen at which it stops says

GRUB loading Stage2...


And it does not move forward from that and ultimately, i turn the system off by pressing the power button for few minutes, and restart it.

What is it all about? Is there some problem with my installation of RHEL5?
 
Old 08-08-2009, 04:55 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,613

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
redhat5:

You asked: "What is it all about? Is there some problem with my installation of RHEL5?"

REPLY:

How does GRUB work?

When a computer boots, the BIOS transfers control to the first boot device, which can be a hard disk, a floppy disk, a CD-ROM, or any other BIOS-recognized device. We'll concentrate on hard disks, for the sake of simplicity.

The first sector on a hard is called the Master Boot Record (MBR). This sector is only 512 bytes long and contains a small piece of code (446 bytes) called the primary boot loader and the partition table (64 bytes) describing the primary and extended partitions.

By default, MBR code looks for the partition marked as active and once such a partition is found, it loads its boot sector into memory and passes control to it.

GRUB replaces the default MBR with its own code.

Furthermore, GRUB works in stages.

Stage 1 is located in the MBR and mainly points to Stage 2, since the MBR is too small to contain all of the needed data.

Stage 2 points to its configuration file, which contains all of the complex user interface and options we are normally familiar with when talking about GRUB. Stage 2 can be located anywhere on the disk. If Stage 2 cannot find its configuration table, GRUB will cease the boot sequence and present the user with a command line for manual configuration.

Stage 1.5 also exists and might be used if the boot information is small enough to fit in the area immediately after MBR.

The Stage architecture allows GRUB to be large (~20-30K) and therefore fairly complex and highly configurable, compared to most bootloaders, which are sparse and simple to fit within the limitations of the Partition Table.

hope this helps.

Good luck.
 
Old 08-08-2009, 05:56 AM   #3
redhat5
Member
 
Registered: Jul 2009
Posts: 50

Original Poster
Rep: Reputation: 15
Ya, it really helped.

This information has given some sort of idea to me of the way in which computer systems work or Operating systems boot.


It means, when my sustem ceases to move forward with the grub loading stage 2, it is looking for an active partition
and its has stopped because it is not able to find one.

One more question

Why does it behave this way, when most of the times it can find a n active partition( which i think in my case is the partition with rhel5 installation)? Why does not it find some times the required information?

Is it because partions are not mounted properly?

Thank You!

By the way, where did you learn all this. I have become an enthusiast for Linux and would Love to learn it to the depth.

Is there any such guide available online which can help me?

Again TY

Last edited by redhat5; 08-08-2009 at 06:00 AM.
 
Old 08-08-2009, 06:25 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by redhat5 View Post
It means, when my sustem ceases to move forward with the grub loading stage 2, it is looking for an active partition
and its has stopped because it is not able to find one.
No. The default MBR code looks for an active partition. The Grub MBR code does not. It directly loads the stage2 grub code for which it was configured.

Quote:
Why does not it find some times the required information?
I have no guess.

Quote:
Is it because partions are not mounted properly?
No. Mounting a partition is something that happens inside the OS. No partition are nor should be mounted when grub is loading.
 
Old 08-08-2009, 10:16 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Linux (GRUB) does not care about partitions being marked as active. In the case of GRUB, it looks for a kernel at the location specified in the config file (/boot/grub/menu.lst) and then passes control to the the kernel.

Quote:
By the way, where did you learn all this. I have become an enthusiast for Linux and would Love to learn it to the depth.

Is there any such guide available online which can help me?
One place to start would be http://tldp.org. Also, many people recommend the RUTE guide, but I have never read it.

Mostly, I learned with LOTS of Googling---and of course here at LQ.
 
Old 08-08-2009, 01:38 PM   #6
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,613

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
redhat5:

Take the advice of the Senior Member and Moderator above, they are indeed truly helpful.

As addenda, allow me to reply few of your queries:

Q-- "And it does not move forward from that and ultimately, i turn the system off by pressing the power button for few minutes, and restart it.
What is it all about? Is there some problem with my installation of RHEL5?"


REPLY:
It is premature to judge the entire RHEL5 installation on the basis of facts given, but it should be very helpful if you will reinstall grub, as this may heal whatever is wanting.
-----------

Q --"Why does it behave this way, when most of the times it can find a n active partition( which i think in my case is the partition with rhel5 installation)? Why does not it find some times the required information?"

REPLY:
Actually, unlike M$ windows, Grub doesn't need an active partition: it boots linux seated anywhere, active or not active partition, primary or logical, this is the beauty of Grub.

All that you need is to configure /boot/grub/menu.lst properly so that the entries thereon are accurately stipulated. To do this you will need learn enough background about Grub, a link is hereunder my signature, click it and give time to read: focus on the menu.lst entries.
---------

Q --"It means, when my sustem ceases to move forward with the grub loading stage 2,"

REPLY:
Running on single OS boot in a laptop, Grub doesn't necessarily employ Stage 2. In this system I use now I boot two Linuxes, Grub uses only Stage 1.5. This slackware, my mainstay has no boot loader installed, rather, I only added an entry on the /boot/grub/menu.lst installed in another linux sitting on 1st Partition: anyway Stage 1 at the MBR knows it already, so I just had it "pass" OS control into another partition to boot my Slackware image located three slices farther off to the logical area. Yes you can do that in your laptop, this is how powerful grub is. Also, experience assured me that this single installation of grub in the first partition has capability to boot as many as 5 linuxes in the logical area: by only manipulating the /grub/menu.lst entries. So rest be assured that your laptop can get well soon. Just read a little of the tutorial.
----------

Hope this helps.

Good luck.
 
Old 08-09-2009, 01:20 AM   #7
Thelionroars
LQ Newbie
 
Registered: Aug 2009
Location: Melbourne, Australia
Distribution: Ubuntu
Posts: 19

Rep: Reputation: 1
It's a bit strange that it is loading sometimes and not others.

There is a very small (4MB) live CD called super grub disk http://www.supergrubdisk.org/ that would be worth downloading and burning. Reboot, running the CD and see if it fixes the problem.
 
  


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 04:24 AM
GRUB Loading Stage2... unicornsoftsol Linux - Newbie 1 06-30-2008 04:19 AM
GRUB Loading stage2 problem SBN Linux - Distributions 3 06-26-2007 09:18 AM
Stuck on grub (loading stage2) Crazy_lenny Linux - Hardware 3 06-23-2006 01:13 PM
GRUB Loading stage2.read error?? angstsix Linux - General 2 12-12-2005 11:00 AM


All times are GMT -5. The time now is 07:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration