Subject: Re: initramfs - CGD root
To: Lubomir Sedlacik <salo@Xtrmntr.org>
From: Malcolm Herbert <mjch@mjch.net>
List: netbsd-users
Date: 07/01/2007 12:03:33
This seems to be similar to something I've been trying to get working
on my machine for some time - I'd like to be able to use disks from my
main server in a workstation but have the system reconfigure itself or
boot into a different root filesystem depending on some system-specific
information (I've been using MAC addresses) and disable various services
which would be appropriate for a server but not a workstation.

I have the code to work out which set of hardware is booting and then
attempt to null mount the appropriate /etc tree from /etc.d/<macaddr>
but the problem is that after /etc is null-mounted, root can't be
remounted read-write[1] ...

I attempted to set up multiple root filesystems but mount complains that
I can't mount these as root since the device I want doesn't match that
for the current root filesystem ... presumably this would also be a
problem for your encrypted setup ... how could one work around that?

If mount (or the kernel) could relax this requirement then this would
be more flexible, however I am not aware of the reasoning behind why
it's there to start with ... 

Regards,
Malcolm

[1] In order to fix this I could get root remounted rw before doing the
null mount but I'd have to heavily modify the startup scripts on the 
host and would prefer to try and keep changes to the default to a 
minimum, especially if things go pear-shaped ...

-- 
Malcolm Herbert                                This brain intentionally
mjch@mjch.net                                                left blank