LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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

Reply
 
Search this Thread
Old 07-21-2010, 11:48 AM   #1
wingman358
Member
 
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 40

Rep: Reputation: 16
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).
 
Old 07-21-2010, 11:56 AM   #2
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 3,915

Rep: Reputation: 1047Reputation: 1047Reputation: 1047Reputation: 1047Reputation: 1047Reputation: 1047Reputation: 1047Reputation: 1047
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
 
Old 07-21-2010, 07:28 PM   #3
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,810

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
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
 
Old 07-22-2010, 03:14 PM   #4
jefro
Guru
 
Registered: Mar 2008
Posts: 11,516

Rep: Reputation: 1403Reputation: 1403Reputation: 1403Reputation: 1403Reputation: 1403Reputation: 1403Reputation: 1403Reputation: 1403Reputation: 1403Reputation: 1403
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.
 
Old 07-22-2010, 09:25 PM   #5
wingman358
Member
 
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 40

Original Poster
Rep: Reputation: 16
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
 
Old 07-23-2010, 10:10 AM   #6
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,810

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
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.
Old 07-23-2010, 12:16 PM   #7
wingman358
Member
 
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 40

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by yancek View Post
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!
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple hardware issues / multiple distros stilllearing Linux - Newbie 4 01-29-2010 12:24 AM
Those of you with multiple Linux distros across multiple partitions ... SlowCoder General 14 05-15-2009 03:24 PM
What's a good way to set up partitions for multiple Linux distros? ericthefish Linux - Software 2 08-12-2007 11:44 AM
Wonky bootloaders and multiple distros gregoj Linux - Distributions 1 11-26-2004 02:37 PM
Multiple Boot - Multiple Distros noname Linux - Distributions 3 05-08-2002 10:01 AM


All times are GMT -5. The time now is 07:10 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration