LinuxQuestions.org
Review your favorite Linux distribution.
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-23-2009, 09:32 AM   #1
adnankhawer
LQ Newbie
 
Registered: Mar 2008
Location: Pakistan
Distribution: Red Hat, Kubuntu, Suse
Posts: 13

Rep: Reputation: 0
GRUB command prompt, which stage??


Hi,

I have questions, please let me know that;

1. Which Linux Distros uses GRUB's stage 1, stage 1_5 and stage 2,all???

2. Which stage is used when we use GRUB commands like 'boot', 'kernel', 'initrd' and etc.???

grub>

Thanks in advance!
 
Old 02-23-2009, 10:56 AM   #2
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Quote:
Originally Posted by adnankhawer View Post
Hi,

I have questions, please let me know that;

1. Which Linux Distros uses GRUB's stage 1, stage 1_5 and stage 2,all???
Any distro that uses Grub can use all those stages; the only stage that can be skipped is stage1.5. When you install Grub to the MBR (Master Boot Record), you are installing stage1 to the MBR and usually stage1.5 to the sectors immediately following the MBR. Stage1.5 has the ability to search for stage2 on a linux partition, and also stage1.5 is what reports various Grub errors. It is possible to install stage1 to the MBR but omit stage1.5, and then stage1 just points directly to the sector location (LBA) of the stage2 file. Thus you won't get any error reporting, and if the location of your stage2 file changes for any reason, that would temporarily break Grub until you reinstall Grub to the MBR again. It is worth noting that when you install Grub to the boot sector of a partition, Grub always omits the stage1.5 file since the sectors immediately following the partition boot sector are usually not free space.
Quote:
Originally Posted by adnankhawer View Post
2. Which stage is used when we use GRUB commands like 'boot', 'kernel', 'initrd' and etc.???

grub>

Thanks in advance!
Grub's stage2 file is what handles all the Grub commands.

Last edited by CJS; 02-23-2009 at 10:58 AM.
 
Old 02-23-2009, 11:39 AM   #3
adnankhawer
LQ Newbie
 
Registered: Mar 2008
Location: Pakistan
Distribution: Red Hat, Kubuntu, Suse
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks very much CJS.

You reply cleared me lot but I have again a question would u please tell me that;

What I know about MBR, is a fixed location(not dependent on any OS) on a drive which always pointed by BIOS when POST complete.

Quote:
usually stage1.5 to the sectors immediately following the MBR
Is the area used by stage 1.5 file is FIXED? or it depends on OS, that how they use that space.
 
Old 02-23-2009, 11:48 AM   #4
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Quote:
Originally Posted by adnankhawer View Post
What I know about MBR, is a fixed location(not dependent on any OS) on a drive which always pointed by BIOS when POST complete.

Is the area used by stage 1.5 file is FIXED? or it depends on OS, that how they use that space.
The MBR is always the first sector of the HDD, and almost always the first partition of the HDD starts at the first track of the HDD or further into the drive (each track is 63 sectors); so the first partition usually starts no sooner than sector 63. That means those sectors between the MBR and sector 63 are generally available, and that's where Grub puts its stage1.5 file. But sometimes anti-virus programs in Windows use those sectors, so that can be a problem with Grub. In those cases you can install Grub without the stage1.5 file as I briefly described in my previous post, and you should be fine.
 
Old 02-23-2009, 11:49 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
The GRUB installation is independent of what distro you are using.

If you want to confirm what goes where, you can read the MBR and following sectors using:
Code:
dd if=/dev/sda bs=512|hexdump -C|more
You can compare this to the files found in /boot/grub (read them also using hexdump)
 
  


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 Stage 1.5, Error 22 Michael AM Linux - Newbie 5 02-19-2008 08:16 AM
Grub laoding stage 1.5 fran4066 Linux - Software 3 05-09-2006 11:14 PM
how do I boot a cd from a grub command prompt? mangolicious Linux - Software 3 02-12-2006 08:17 PM
GRUB stage 2 won't load MALDATA Linux - General 2 03-17-2005 04:32 PM
GRUB booting into it's command prompt .. after choosing Windows on last install~ Mustard010 Linux - General 7 12-01-2004 09:28 PM


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