LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-13-2006, 07:15 PM   #1
glenn69
Member
 
Registered: Jul 2003
Location: Chicagoland
Distribution: ArchLinux
Posts: 261

Rep: Reputation: 32
How does GRUB work with multiple linux distros ?


I like to try as many Linux distros as possible. My method is to create many partitions on my hard drive, then install a distro allowing it to put GRUB on MBR. Then for my next distro I do tyhe same, and so on.

The result is that the last distro that I have installed (Ubuntu) placed its version of GRUB on MBR.

Now for the question : How do I modify GRUB from another distro on another partition? I noticed when using LILO, that lilo had to be run after any changes were made to the conf file, subsequently it makes the changes to MBR. GRUB does not have to be run, so how do changes in the conf file make their way to the MBR?
 
Old 10-13-2006, 07:23 PM   #2
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
When GRUB boots, the small application installed on the MBR reads the menu.lst file and then offers you the menu of options. If you want to add other distros, mount the partition the /boot/grub/menu.lst file is on, edit it with a text editor and add the distros you want.
 
Old 10-13-2006, 07:32 PM   #3
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
There should be an example file /boot/grub/grub.conf.sample which shows multiple examples for different operating systems.
 
Old 10-13-2006, 07:45 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
You are better off getting a working distro and keeping that in the MBR. Subsequent distros should install the loader to the bootsector (or not at all).
Saikee used to have a truckload of links in his sig (I don't see sigs anymore, so this may be wrong now). Have a look for a doco he did - not the only way, but will give you some ideas.
 
Old 10-13-2006, 07:49 PM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You can use the same /boot partition for every Linux distribution. Some distributions requires more than 100 MB of space for /boot which is very ridiculous. With just 16 MB you can have several Linux distribution stored.

Just add more information to what Andrew Benton have said. GRUB is userspace. This means you edit a file and grub will default to a specific file directly like menu.lst. Also you can define storage devices to desire names instead using the default hd0 for hda or the first drive. Grub is able to access FAT16, FAT32, NTFS, XFS, EXT2, EXT3, ReiserFS, JFS directly with out being dependent with the OS. I prefer EXT3 to store Grub's files. With its latest release, it can boot to a CD/DVD disc.
 
Old 10-13-2006, 07:58 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quote:
Originally Posted by Electro
With just 16 MB you can have several Linux distribution stored.
...
I prefer EXT3 to store Grub's files.
How does that work ???
Hopefully you meant ext2 - journal is pointless on /boot. But a gentoo user would already know that ...
 
Old 10-14-2006, 12:45 AM   #7
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
syg00, Journaling is not pointless on /boot. If are editing a config file or forgot to unmount /boot and the power goes out, journal filesystems saves a lot of time. I prefer EXT3 for /boot for added safety. If you like to live dangerously, use EXT2 for /boot. Many distributions have /boot unmounted, if you forgot to mount it before running a backup, you have to depend on the journal when a screw comes loose.
 
Old 10-14-2006, 01:26 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
We can agree to disagree - the amount of update to /boot is meaningless. And I would do more than most.
However, I did just try putting a journal on a small partition, and it used significantly less space than I was expecting.
So ...., go for it people
 
Old 10-14-2006, 06:03 AM   #9
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I am not going to repeat myself but Post #9 of this thread documents the easy way.
 
Old 10-14-2006, 10:24 PM   #10
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
It maybe the easy way, but it is the hardest way to control how it boots up. Many distributions like Fedora for an example uses special kernel options are require that the chainloader will not know about. I myself uses initrd that contains xfs and hpt366 modules that needs to be loaded. The chainloader will not work.

I suggest making a boot partition and a swap partition then make seperate root partitions. When it comes time to use SATA or SCSI hard drives, you will be able to boot up.
 
Old 10-15-2006, 01:45 AM   #11
eerok
Member
 
Registered: Nov 2005
Location: Canada
Distribution: Mint, Debian
Posts: 168

Rep: Reputation: 32
I've used a common /boot (and swap, and for that matter, a /home/data partition) shared between several distros for a couple years now, and it works fine with grub. I just have to remember to clean out old kernels when I install new distros.

I suppose that some day my grub config syntax/format might become obsolete, though it's also possible this box will die first
 
Old 10-15-2006, 05:12 AM   #12
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
The method I suggested is booting 100+ systems.

It is a common method that works for evry OS I could find in Dos, Windows (includinh Vista), BSD, Solaris and Linux. From over the 100 Linux installed I have not met one that refuses to boot.

Please note in every system the boot loader created by the installer is untouched and preserved in its original form. I keep every system in a single partition.

I just let the boot loader residing in the MBR to boot the other boot loaders. It is one of the two common booting methods and every boot loader in existence uses this method.

Most users do not know a Linux can be boot same as a Windows by another Linux.

As every system has its own boot loader preserved so the user can elect any of them to come out to take control of the MBR, be it a Grub, Lilo or Windows NTLDR. However Windows NTLDR can only boot 10 systems. Lilo maximum is 27. Sky is the limit for Grub.

There is no easier way to multi boot than "chainloading".

Last edited by saikee; 10-15-2006 at 05:14 AM.
 
1 members found this post helpful.
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple distros&grub devil28 Linux - Newbie 8 04-14-2005 09:09 AM
grub and multiple distros rabelais Linux - Newbie 10 01-07-2005 11:26 AM
Multiple Linux Distros - Will This Work? Campy19 Mandriva 2 02-20-2004 11:50 AM
Need Grub to boot multiple distros but can't get back into fedora darinfranzoni Mandriva 1 01-21-2004 05:49 PM
GRUB and multiple distros hollering Linux - General 3 09-30-2003 09:40 AM


All times are GMT -5. The time now is 03:10 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration