You are not logged in.

#1 2010-01-06 22:07:08

TiborB
Member
Registered: 2008-12-09
Posts: 103

two Arch linuxes on 1 box - how to distinguish files in /boot/

Hi
I want to have two arch linux installation on my PC (like "production" and "testing"), they would use the same filesystems - except for root partition of course, and I need to keep them from overwriting the files in common boot partition:

/boot/kernel26.img
/boot/kernel26-fallback.img
- these two are allright, i will edit /etc/mkinitcpio.d/kernel26.preset to save newly generated images under different names.


BUT there are also vmlinuz26, initrd26 and  System.map26 files. Do I need to care about them? How can I have them generated and saved under different names?

I have to add, that both installations might use different versions of kernel, so this might be a problem....

Offline

#2 2010-01-06 22:44:49

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,791

Re: two Arch linuxes on 1 box - how to distinguish files in /boot/

How about a second boot partition with a separate copy of GRUB.  Have the primary boot partition chainload the second boot partition?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2010-01-06 22:57:27

TiborB
Member
Registered: 2008-12-09
Posts: 103

Re: two Arch linuxes on 1 box - how to distinguish files in /boot/

I have no experiences with this.... Does it mean, that i will see grub menu twice during the boot?

I would prefer cleaner (simplier solution) if possible...

Offline

#4 2010-01-06 23:24:03

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: two Arch linuxes on 1 box - how to distinguish files in /boot/

Don't share the /boot partition.

On one of them, mount /boot as /realboot (or whatever you want) (ill assume you doing this with "testing"), and edit you menu.lst with these changes:
title  Arch Linux Testing
root   (hd0,n) # This should be whatever it is seen on linux as -1 (sda5 -> (hd0,4) )
kernel /boot/vmlinuz26 root=/dev/sdxY ro
initrd /boot/kernel26.img

Last edited by some-guy94 (2010-01-06 23:25:17)

Offline

#5 2010-01-06 23:33:58

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: two Arch linuxes on 1 box - how to distinguish files in /boot/

Sharing the boot partition will cause some hassles, I think.  One idea is to have a pacman wrapper maintain each kernel in its own subdirectory, and have that alias'd to 'pacman' on each system.

An untested (and incomplete) script to show the concept:

pacman $@

if [ <simple test to identify system> ]; then
    bootdir='/boot/arch1'
else
    bootdir='/boot/arch2'
fi

find /boot -maxdepth 1 -type f -exec mv '{}' "${bootdir}" \;

Offline

#6 2010-01-07 22:40:06

TiborB
Member
Registered: 2008-12-09
Posts: 103

Re: two Arch linuxes on 1 box - how to distinguish files in /boot/

It will be second boot partition and chainloaded grub... It seems to be simpliest solution. Thanks all

Offline

Board footer

Powered by FluxBB