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 06-14-2008, 12:18 AM   #1
vineet7kumar
Member
 
Registered: Aug 2005
Posts: 75

Rep: Reputation: 15
How not to install GRUB in MBR in Ubuntu ?


Hi,
While installing ubuntu (8.04) i did not find any option to select where to install the GRUB (i.e MBR or boot sector of the linux partition)... (Earlier when i was using debian and fedora , I used to get an option during the installation whether to install the GRUB to MBR or boot sector)...

Am I right that the other option is the boot sector of the linux partition ?

I guess by default it goes to MBR. How do I change that ?

Also in case I have to recover GRUB ... i.e if I reinstall windows in my dual boot machine and then have to reinstall GRUB ... how do I control the location of installation of GRUB ?

In an installed system how do I find out whether GRUB is installed in MBR or boot sector of Linux partition ?



Thanks ,
Vineet

Last edited by vineet7kumar; 06-14-2008 at 12:27 AM.
 
Old 06-14-2008, 12:30 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I know the problem you refer to, but I'm afraid I don't know the answer. One solution would be not to install it at all, the mount the Ubuntu partition on, say, /mnt and

grub-install --root-directory /mnt /dev/sda4

if sda4 is the partition Ubuntu is on

Note that grub-install /dev/sda would install in the MBR
 
Old 06-14-2008, 07:29 AM   #3
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
Then you did the ubuntu install 7 of 7 click on the advance tab and you can change as to where you want grub to install.
Some grub reading.

http://users.bigpond.net.au/hermanzone/p15.htm
 
Old 06-14-2008, 08:01 AM   #4
Takla
Member
 
Registered: Aug 2006
Distribution: Debian
Posts: 188

Rep: Reputation: 33
Quote:
Originally Posted by vineet7kumar View Post
Hi,
While installing ubuntu (8.04) i did not find any option to select where to install the GRUB (i.e MBR or boot sector of the linux partition)... (Earlier when i was using debian and fedora , I used to get an option during the installation whether to install the GRUB to MBR or boot sector)...

Am I right that the other option is the boot sector of the linux partition ?

I guess by default it goes to MBR. How do I change that ?

Also in case I have to recover GRUB ... i.e if I reinstall windows in my dual boot machine and then have to reinstall GRUB ... how do I control the location of installation of GRUB ?

In an installed system how do I find out whether GRUB is installed in MBR or boot sector of Linux partition ?



Thanks ,
Vineet
It's been a while so I might be wrong but I recall that if you use the alternate CD instead of the desktop CD you get the Debian-like text installer and full control over Grub installation, same as in Debian.

As for recovering Grub I've found the easiest way is to use Super Grub Disk

Quote:
We want Linux newbies to restore their new toy, but also help the Linux advanced user make potentially dangerous operations to the MBR in a safe way. Super Grub Disk is also a teaching tool to help you learn more about bootloaders and the booting process. After all, booting is the most important thing your computer does -- without the boot process, you would not have an operating system to use!
It's a tiny download and a great tool.

Here's something else that might be useful: some BIOS allow you to protect the boot sector (boot sector virus protection). I found that enabling this prevents Windows' installer from writing to the MBR, so Grub in MBR is not deleted if you need to re-install Windows to a partition. This is very useful for dual boot where it's likely that Windows will require re-install a long time before Linux ever does :-)

Last edited by Takla; 06-14-2008 at 08:07 AM.
 
Old 06-14-2008, 08: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
"booting" link below might help.

Note that something always has to be in the MBR. If you put GRUB in the boot sector of a partition, then whatever is in the MBR must be configured to be able to get to that partition.
 
  


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
I need help with GRUB and my MBR(Ubuntu 7.04) namanbagga Ubuntu 1 06-18-2007 12:53 AM
Grub won't install in MBR PB0711 Linux - Software 4 05-02-2007 01:12 AM
Installed FC5> Wrote over Ubuntu MBR: How do i add Ubuntu Partition to Grub Loader Free_beer Ubuntu 4 10-02-2006 06:11 PM
ubuntu: windows took over MBR and can't restore grub eantoranz Linux - Software 3 02-03-2006 08:29 PM
How do you get back into Ubuntu if you don't put Grub on the MBR? Marrea Ubuntu 7 07-21-2005 06:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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