[Novalug] More than one linux version on a machine question (Bonnie Dalzell)

James Ewing Cottrell 3rd JECottrell3 at Comcast.NET
Mon Apr 30 14:23:02 EDT 2012


You can share a /boot between different distros if you move each to a 
subdirectory.

Assuming that sda1 = /boot and sda2 = LVM you can do something like this:

[1] Install CentOS 5 using an LV name of 'cos5', installing grub to the 
MBR.

[2] boot it and do the following:

cd /boot; mkdir .cos5; mv .cos5/*+* .; vi .cos5/grub/grub.conf

Add /.cos5 as a prefix on the kernel and initrd lines.

title CentOS 5
     root (hd0,0)
     kernel /.cos5/vmlinuz...
     initrd   /.cos5/initrd...

Add a new stanza that looks something like this:

title New System
     root (hd0,0)
     chainloader +1

Add a new stanza for the system we are about to install

title SUSE
     root (hd0,0)
     configfile /.suse12/grub/grub.conf

[3] Install SUSE 12.x using an LV name of 'suse12' installing grub to 
the boot partition.

[4] boot using the New System stanza. You will be going thru grubs 
twice; the first is the CentOS grub, while the second one is the SUSE grub.

[5] Do the same dance:

cd /boot; mkdir .suse12; mv * .suse12; mv .suse12/*+* .; vi 
.suse12/grub/grub.conf

Some Notes:

[1] *+* matches the lost+found directory
[2] I preceded the subdirs with dots to make them not match *
[3] grub.conf is the RedHat name...others will use menu.lst
[4] Once you have moved a system to its subdirectory, you don't use the 
New System stanza
[5] If you have a system that uses grub2, you can still make a grub1 
entry for it.
[6] When you update the kernel, you will need to move the new files into 
the subdirectory.
[7] When you update grub, you will get a new /boot /grub directory created.

JIM

On 4/30/2012 1:11 PM, Roger W. Broseus wrote:
> In addition to the potential for conflict between config files for 
> different versions of Linux, as previously mentioned, I ran into this 
> problem when dual booting different distros (not in VMs): Installed 
> first was SuSE and secondly, some other, Debian-based variant. When 
> SuSE updated, it MODIFIED menu.lst used by grub and grub could no 
> longer find the second install. SuSE "ignored" the fact that there was 
> another version to boot. (In fact, I was trip booting with Windows. 
> SuSE did not miss the Win partition. I don't know what would happen 
> with grub2 which is now commonly used. It may depend upon what a 
> particular distro does during install / upgrade.
> --
> Roger W. Broseus - Linux User
>      Email:RogerB at bronord.com
>      Web Site:www.bronord.com
>
> On 04/29/2012 09:11 PM, novalug-request at calypso.tux.org wrote:
>>     3. More than one linux version on a machine question (Bonnie Dalzell)
>
>
> _______________________________________________
> Novalug mailing list
> Novalug at calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://calypso.tux.org/pipermail/novalug/attachments/20120430/6a68fd8b/attachment.html 


More information about the Novalug mailing list