LinuxQuestions.org
Visit Jeremy's Blog.
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 05-31-2004, 08:32 PM   #1
Flak Pyro
Member
 
Registered: Jul 2003
Distribution: Fedora Core 5
Posts: 126

Rep: Reputation: 15
Grub installation/config


When installing a distro you are given a choice to install the boot loader to the default position or to the mbr of the first hard drive. I have windows on my first drive and and to install linux on my second drive, do i want to install grub to the mbr of the primary hard drive? I notice on my other pc that my grub config is in /boot/grub, where will it be if i put it on the mrb of the first hard drive? I tried to find this in my linux book i bought but they dont seem to cover boot loaders much.

Thanks
 
Old 05-31-2004, 09:21 PM   #2
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
almost all the time, your best bet is to put it in the mbr
 
Old 05-31-2004, 09:23 PM   #3
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
When we speak of installing to the mbr, we aren't speaking of where menu.lst, the stage files, etc. reside. Those are always in /boot/grub. We're talking about where you want grub's pimary bootloader to be installed. If you install to the mbr of the first bootable drive (win c: drive) then it will be primary boot program, executing immediately after the bios. This is my preference. Anywhere else and you have to configure some other bootloader to hand off to grub.

Installing grub (to an mbr) involves replacing the existing mbr with a first stage grub boot sector to which info regarding which partition menu.lst,etc. are to be found has been added.

See

info grub

for more details.

Last edited by kevinalm; 05-31-2004 at 09:28 PM.
 
Old 05-31-2004, 09:40 PM   #4
Flak Pyro
Member
 
Registered: Jul 2003
Distribution: Fedora Core 5
Posts: 126

Original Poster
Rep: Reputation: 15
I have grub .92 installed there now (last time i let redhats installer do it by itself and that was before i got this second drive) When i hookup this other drive and install Fedora to it do i have to erase the MBR of the first hard drive using fdisk mbr or will the FC2 installer be smart enough to overwrite it when im installing to the second hard drive? (Of cource i will have to tell it to install it to the right place but will it be smart enough to overwright it)
 
Old 06-01-2004, 12:07 AM   #5
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Because of the way grub handles booting windows, it would probably be safer to restore the mbr with fdisk /mbr and then do the linux install. Likely, it wouldn't matter but I prefer to play safe. Plus if something goes wrong windows should still boot, giving you internet access for help.
 
Old 06-01-2004, 01:32 AM   #6
Flak Pyro
Member
 
Registered: Jul 2003
Distribution: Fedora Core 5
Posts: 126

Original Poster
Rep: Reputation: 15
sounds good. Also this isnt my primary pc im doing this on so if something does go wrong my main box is still intact .
 
Old 06-01-2004, 08:37 AM   #7
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
if you can, get linux disk 1, and at the boot: prompt, type

linux rescue

when you get a shell, type in
chroot /mnt/sysimage

then run
grub-install

this will reinstall grub


or reinstall linux, either one
 
Old 06-06-2004, 10:30 PM   #8
Flak Pyro
Member
 
Registered: Jul 2003
Distribution: Fedora Core 5
Posts: 126

Original Poster
Rep: Reputation: 15
yeah so right now my grub files are loacated on hda and grub is installed on the mbr of hda, if i install fc2 on hdc (my second hard drive) and then install its grub to the mbr of HDA what will happen there? Will the config files that are on HDA's boot dir be magically deleated? I am going to assume that my config files for the new grub will be stored on HDC but will these old config files on HDA cause problems?
 
Old 06-06-2004, 11:02 PM   #9
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Only one set of menu.lst, etc. files will be used at a time. The old set won't be deleted. You could use either one you want. This is encoded into the mbr as a pointer to the partion containing the fileset you want when installing. This can be done manually with the grub prompt. For a full explanation see:

info grub

and read the section on installing natively, but as an example suppose you wanted to setup to use your current fileset. As root:

grub
root (hd0,0) ...your menu.lst is on the first partition of first hd.

setup (hd0) ...installs to the mbr of hd0

Root in grub's context refers not to / or /root but to the partition containing menu.lst and company.

I should probably point out that hd0 is not necessarily hda. Grub scans for hd's only on hd(a-f) and assigns a number for each drive it finds. My hde=hd0 and hdf=hd1.

Last edited by kevinalm; 06-06-2004 at 11:05 PM.
 
Old 06-06-2004, 11:04 PM   #10
Flak Pyro
Member
 
Registered: Jul 2003
Distribution: Fedora Core 5
Posts: 126

Original Poster
Rep: Reputation: 15
very interesting, so it will by default use the new config , but i could set it to use the old one if i wanted to.
 
Old 06-06-2004, 11:08 PM   #11
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
You got it!
 
  


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 config Julian2005 Linux - Newbie 2 06-21-2005 12:39 PM
grub config in ubuntu linusownsme Linux - Newbie 1 05-07-2005 04:45 PM
grub ./config error darkRoom Linux - General 3 02-09-2005 07:26 AM
Installation Questions: GRUB / LILO / RAID Config & MBR Zaphod98 Linux - General 1 09-09-2004 01:32 PM
Grub.config help iLLuSionZ Linux - Newbie 19 11-09-2003 04:02 AM


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