Linux - SoftwareThis 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
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 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!)
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.