LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-30-2007, 08:13 AM   #1
prashsharma
Member
 
Registered: Sep 2006
Posts: 38
Blog Entries: 1

Rep: Reputation: 15
grub install


While installing grub using grub-install command, do we specify root partition or boot partition?

Thanks
 
Old 05-30-2007, 10:04 AM   #2
Xian
Member
 
Registered: Feb 2004
Location: 33.31N -111.97W
Distribution: SuSE
Posts: 919

Rep: Reputation: 32
If a separate boot partition then that is the choice unless you want it to install to the MBR.
 
Old 05-30-2007, 12:22 PM   #3
ECRocker
Member
 
Registered: May 2007
Distribution: RHEL 5, Ubuntu 9.10, Fedora 12
Posts: 85

Rep: Reputation: 17
Excuse me, would you please be more specific/expand that answer? I'm currently wondering about installing grub myself, and I'm a little slower than the rest. :-P

Thanks!
 
Old 05-30-2007, 12:40 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by Xian
If a separate boot partition then that is the choice unless you want it to install to the MBR.
This is answering a different question than OP is asking.
Something needs to be in the mbr--if you put GRUB in a partition boot sector, you still need to point to it somehow.

To the original question: You have to tell the GRUB installer where /boot is---ie where it will find it's config files, kernel, etc.

My site (link below) has an article on booting which may be useful...
 
Old 05-30-2007, 03:03 PM   #5
ECRocker
Member
 
Registered: May 2007
Distribution: RHEL 5, Ubuntu 9.10, Fedora 12
Posts: 85

Rep: Reputation: 17
I enjoyed your article and gave a lot of insight. Thanks!
 
Old 05-31-2007, 06:34 AM   #6
prashsharma
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Blog Entries: 1

Rep: Reputation: 15
grub install

But my question is still there. where to install grub-install?

root partotion or boot partition?
 
Old 05-31-2007, 07:03 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by prashsharma
While installing grub using grub-install command, do we specify root partition or boot partition?

Thanks
OK--so you mean "where do we install GRUB"??
It is neither of the above...

Normally, GRUB gets installed in the MBR. The other typical option is to put it in the boot sector of a partition. If you do it this way, you then have to have SOMETHING in the mbr that points to that partition--eg using the "chainload" command.

If you have a Linux install with separate partitions for /boot and /, then I guess GRUB would go in the boot sector of the partition which contains /boot.
 
Old 06-01-2007, 07:35 AM   #8
prashsharma
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Blog Entries: 1

Rep: Reputation: 15
grub install

let me repharse it again.

To install 1st stage grub we use grub-install /dev/hda

in /dev/hda part should we specify the location of our boot filesystem or root file system? or even if they are on the different partition we still use only grub-install /dev/hda command.

thanxx......
 
Old 06-01-2007, 07:48 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
grub-install /dev/hda puts stage1 on the MBR of hda---it has nothing to do with where /boot or / are.

To install GRUB (by any method), you have to specify 2 things:
Where the /boot directory is
Where to install GRUB

grub-install apparently defaults to assuming that /boot is in /, and is all in the current Linux partition.
Note from the GRUB manual that the "native" method--using the GRUB shell--is preferred. In this latter method, the "root" command is required:
grub
root (hdX,Y) tells grub where /boot is
setup (hdX) installs grub in the MBR

Look at the booting article at my site--link to the GRUB manual is there.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
Grub - Does fedora automatically install a bootloader like grub? or... mitchell7man Linux - Software 10 05-09-2007 10:49 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk whencat Fedora 4 03-05-2006 02:01 PM
Grub 0.97 issues on slackware - grub-install is very slow, & updating menu.lst fails dieyouspammer Linux - Software 1 02-27-2006 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:37 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
Open Source Consulting | Domain Registration