Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
07-21-2010, 12:48 PM
|
#1
|
Member
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 77
Rep:
|
Multiple distros = multiple bootloaders. How do I set THE bootloader that shows?
I know of two separate bootloaders present on my disk: GRUB2 which is on my Ubuntu partition and GRUB legacy on the BackTrack partition. How do I know which bootloader comes up when my computer boots? Is it the MBR that selects the bootloader?
I imagine the booting process happens like this:
--power on--
bios: use disk hd0
hd0 MBR: load bootloader at (hd0,x)
bootloader: select from the following list
...and so on
Am I on the right track?
History of my laptop
Shipped with VISTA, which is the best operating system EVAR, so I immediately wiped and installed good ole' XP. Months later I added Ubuntu - Lucid Lynx 10.04 (dual-boot XP/Ubuntu). Then I added BackTrack 4 (now triple booting XP/Ubuntu/BackTrack).
|
|
|
07-21-2010, 12:56 PM
|
#2
|
Senior Member
Registered: Feb 2009
Posts: 4,667
|
Typically it is whichever distro you installed last, so in your case, Backtrack probably controls GRUB. It should be easy to tell; the GRUB screen should tell you whether it's GRUB or GRUB2.
GRUB is very well documented if, for example, you wanted to switch so Ubuntu controls GRUB.
https://wiki.ubuntu.com/Grub2
|
|
|
07-21-2010, 08:28 PM
|
#3
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,030
|
Quote:
Is it the MBR that selects the bootloader?
|
Generally, it is whoever installs the operating systems on the computer. The default on most systems is to install Grub bootloader to the mbr but you should be informed of this. Sometimes, you will need to click an Advanced or Expert tab to see this options. As a result, as snowpine indicates above, Grub is usually the one from last distro installed.
If you open a terminal as root and type "grub", you should see some output with the version. This is the output I get using Grub Legacy:
Quote:
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
|
Since you have two versions of Grub installed, I'm not sure what your output would be?
I'm not familiar with Grub2 but, here's an informative tutorial which might give you helpful information:
http://www.dedoimedo.com/computers/grub-2.html
|
|
|
07-22-2010, 04:14 PM
|
#4
|
Moderator
Registered: Mar 2008
Posts: 22,177
|
Only one thing controls what bootloader is selected at post. It is the first active bootable partition in the bios order.
You can easily select the loader from bios or hot key at boot if you system offers support. Otherwise you would have to chain load the normal first order to then boot the second loader. Or even move order of disks.
|
|
|
07-22-2010, 10:25 PM
|
#5
|
Member
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 77
Original Poster
Rep:
|
Thank you all for your responses! To clarify my question:
If I boot Ubuntu, sda2 is mounted as the root directory. Going to (sda2)/boot/grub/ reveals Ubuntu's GRUB2 files (signified by the lack of a menu.lst and plethora of .mod files).
Now, My original intent was to change the order and titles in the bootloader list, so I updated these Ubuntu GRUB2 config files on sda2.
Upon rebooting, the list had not changed. Hmm.. strange, didn't I just edit the config files? I verified the changes I made on sda2, rebooted, and still no changes. That's when I thought to check the BackTrack partition, located on sda6.
On sda6 I found the GRUB Legacy menu file /boot/grub/menu.lst, edited it, and now my changes show.
Since I obviously have more than one bootloader, what mechanism controls which bootloader shows on boot? Something has to point to sda6/boot/grub as opposed to sda3/boot/grub
|
|
|
07-23-2010, 11:10 AM
|
#6
|
LQ Guru
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 11,030
|
The stage1 file from Backtrack is in the mbr and points to your Backtrack partition with the remaining Grub files. This would indicate that when you installed Backtrack, you installed its Grub to the mbr.
|
|
1 members found this post helpful.
|
07-23-2010, 01:16 PM
|
#7
|
Member
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 77
Original Poster
Rep:
|
Quote:
Originally Posted by yancek
The stage1 file from Backtrack is in the mbr and points to your Backtrack partition with the remaining Grub files. This would indicate that when you installed Backtrack, you installed its Grub to the mbr.
|
Ah yes, that is exactly what I was looking for!
The GRUB stage1 is installed to the MBR. On boot, the MBR contains the GRUB stage1 which loads stage2 (the rest of GRUB's configuration files located in /boot/grub).
So for my laptop, there were multiple installations of GRUB and therefore multiple different stage1's written to the MBR. The stage2's of each GRUB install were left intact on their respective partitions, while the stage1 was rewritten by each new install (to point to its stage2).
For more detailed info, see the Wikipedia GNU GRUB article, specifically the Installation section: GNU GRUB Installation
Thanks everybody!
|
|
|
All times are GMT -5. The time now is 01:02 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|