Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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 :-)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.