[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Choosing which device gets mounted as root [RESIGNATION!]



On Fri, 9 Aug 2002, andrej hocevar wrote:

> On Fri, Aug 09, 2002 at 02:42:42PM -0400, Patrick Wiseman wrote:
> > You didn't mention boot floppies, but I thought (if your computers have
> > floppy drives, or if either of them does) that you could achieve more or
> > less what you wanted (having the drive and partitions properly recognised
> > regardless of which machine the drive was in) by creating a boot floppy
> > specific to each machine.  Sorry if that's not responsive to your problem.
> 
> No, please, go on and tell me how to do it.

The Linux Bootdisk HOWTO at

http://www.tldp.org/HOWTO/Bootdisk-HOWTO/

should help, especially Ch. 6.  I had initially thought of two boot
floppies but of course one will do.  I use LILO, but presumably GRUB
provides similar functionality.  I'd create two lilo.conf sections, one
for 'home' and one for 'bro', say.  Each would call up an initrd as
initial root system and copy the appropriate /etc/fstab over to the
appropriate partition.  Then you exit initrd and change to the other root.

Here's how

file:/usr/src/linux/Documentation/initrd.txt

opens:

initrd provides the capability to load a RAM disk by the boot loader.
This RAM disk can then be mounted as the root file system and programs
can be run from it. Afterwards, a new root file system can be mounted
from a different device. The previous root (from initrd) is then moved
to a directory and can be subsequently unmounted.

That sounds to me to be precisely what you want to do.  See that
documentation for more details.  I've never actually used initrd myself
(well, except insofar as distributions use it :) so I can't offer much
more help; but it seems doable to me.

hth

Patrick

-- 
Patrick Wiseman
pwiseman@mindspring.com
Linux user #17943



Reply to: