Is there any way to override the flag on a device that permits it from
being mounted twice?    MNT_FORCE isn't it.

I've got an embedded environment I'm setting up where I want to transfer
the root (/) file system from an rd(4) to an MFS.

To do this, I have to add some customizations to copy() in
sbin/newfs/newfs.c.  This is because as soon as a I call mount_mfs(8)
from my RD's /etc/rc, all of / goes away, so I have to accomplish thing
in C functions until I can get the previous (/) re-mounted as /rescue.

I can call mount(2) manually from newfs::copy(), but /dev/rd0a refuses
to unmount from it's previous ubiquitous "root_device".

Even if I explicitly mount /dev/rd0a as /, it refuses to dis-mount after
I mount a new memfs at /, even with MNT_FORCE to unmount(2).

Is it possible that rd(4)'s simply can't be unmounted?  I'm assuming
they can be, and that unlike their MFS counter-part, their contents do
not reset (well, they would reset to whatever the contents of the RD
image in the kernel is, assuming changes had been made).

This is truly a chicken-and-egg scenario.  Any thoughts would be
appreciated.

~BAS

Reply via email to