LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2006, 01:02 PM   #1
shellshock
LQ Newbie
 
Registered: Sep 2005
Posts: 15

Rep: Reputation: 0
Questions re: MBR and Grub configuration


Hi everyone. I'm still kind of new at this, so please bear with me.

I have a few questions regarding the MBR and Grub.

On my AMD64, I have a few different distros right now, all variants of Ubuntu. I've got a a 64-bit Dapper, a 32-bit Breezy, and a 64-bit Xubuntu.

It seems that everytime I install a new distro to try it out, the MBR changes location. I say this because I have at the moment three different /boot/grub/menu.lst files -- one for each distro -- but the one that matches the boot menu that I see when powering up is the newest one (the menu.lst for Xubuntu).

Question 1a: Beyond what I just described, is there a way to determine where the MBR is located at any given time? Does its location have anything to do with /boot/grub/default?

Question 1b: Is it possible to move the MBR? I would like to have it back on the 64-bit Dapper partition, since that's my main system.

As for menu.lst, this seems to be something that is generated upon installation. However, if I add or remove a distro after installation -- on a different partition of course -- the original menu.lst doesn't reflect these changes.

Question 2: Is there a way I can update menu.lst whenever I want to reflect the current state of my HD as a whole? (Besides doing it manually -- I'd be afraid to mess it up!)

Thanks for reading.
 
Old 06-11-2006, 02:50 PM   #2
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
The MBR is always on the boot sector (right at the beginning) of the first disk, although on many motherboards you can specify in the BIOS to boot from other drives. Hopefully that answers your first question.

I think what you are actually asking about is the /boot folder. Everytime you install a version of Linux, it will ask you if you want to reinstall grub. When grub is installed, it is told where to look for its configuration files, which will be wherever the latest installation has its /boot folder. In order to use the configuration of your 64-bit Dapper installation, you need to reinstall grub from inside 64-bit Dapper. Be careful though! You could also try using symlinks to point the configuration files from your other Linux installs to point to the configuration you want to use. I don't know whether grub will like this though. Maybe this sheds a little light on your second question.

Installing a new version of Linux is not going to update the grub configurations of existing Linux setups. My advice would be to create a /boot partition and put your configuration in there. However, I don't think there is a really elegant answer to this situation, you just need to pick a distro and stick with it! Incidentally, you do realise that if you have 64-bit Dapper, you can just install xfce in it, without needing a separate install of xubuntu? You should be able to choose which desktop environment to use when you log in.

Last edited by Gethyn; 06-11-2006 at 02:53 PM.
 
Old 06-11-2006, 03:31 PM   #3
shellshock
LQ Newbie
 
Registered: Sep 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for replying.

I did notice when I partitioned this HD with the SUSE 9.3 installer last fall that 15 Megs were not accounted for. I suppose this is where the MBR resides?

As for reinstalling grub within Dapper, is that something I do from within a regular terminal, or from within the grub shell?

Quote:
My advice would be to create a /boot partition and put your configuration in there.
Okay, but if I've got more than one distro, don't I have more than one /boot partition too? I'm sorry if I'm just not getting it....

Quote:
Incidentally, you do realise that if you have 64-bit Dapper, you can just install xfce in it, without needing a separate install of xubuntu? You should be able to choose which desktop environment to use when you log in.
On Breezy I tried that with Gnome and KDE, but it seemed messy somehow, although I don't recall exactly what the problem was (maybe it was icons from one desktop showing on the other?). So this time I thought I would just do a separate install, since I have more than enough space and my drive is partitioned into ten pieces.
 
Old 06-13-2006, 07:33 AM   #4
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
The missing 15MB is not due to the MBR, which is somewhere in the region of 512B (i.e. very small). I don't know what the cause is, but it's not uncommon to be left with small bits of unpartioned space.

To reinstall grub, you need to be inside Linux. You want to be careful doing this though, I advise reading up on it. The command you probably want is 'grub-install hd0' but please read up on it before trying it!

I would still advise having one install with two window managers, instead of two separate installs. If it doesn't work and you run into problems like last time, you can always uninstall one of the window managers. Up to you of course though.

As for the /boot partition... Every distro will have a /boot folder. On most distros, by default, this boot folder is stored inside the / (root) partition. However, you can leave the /boot folder empty and mount a separate partition on the /boot folder, in much the same way as you can with /home or any other directory.

There are two separate issues here really. First is that when you install/re-install grub, it will store information about the location of /boot for the distro that just installed grub. Second is that the /boot folder (or partition) for any given install of Linux will contain settings that are independent of the settings stored in other versions of Linux that exist on the same computer. While most Linux installers are now smart enough to pick up other Linux installations on your computer and create a menu.lst or grub.conf accordingly, I'm not aware of any that are smart enough to detect when those other installations change.

To make a long story short, you are making things much more complicated for yourself than you need to. While running 3 different versions of Ubuntu at once might be helpful while you're learning how things work, it is unnecessary and overcomplicated in the long run. I think you should resign yourself to updating the menu.lst by hand in the short term, and in the long term picking one of the installs and sticking with it.

Last edited by Gethyn; 06-18-2006 at 02:13 PM.
 
Old 06-13-2006, 01:51 PM   #5
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Moved: This thread is more suitable in Linux - Software and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 06-17-2006, 06:12 PM   #6
shellshock
LQ Newbie
 
Registered: Sep 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Okay Gethyn, thanks for your detailed reply.
 
  


Reply

Tags
grub, mbr


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 on MBR ... dipenchaudhary Linux - General 12 02-16-2006 11:52 AM
Grub and MBR tavienu Fedora 2 01-12-2006 08:22 PM
GRUB MBR overwritten by WIN98 MBR TOuseef Linux - General 7 11-14-2004 04:25 PM
MBR Configuration varunnarang Linux - General 1 10-24-2004 03:19 PM
Installation Questions: GRUB / LILO / RAID Config & MBR Zaphod98 Linux - General 1 09-09-2004 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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