[FreeBSD Questions] Filesystem image as root
cyberleo at cyberleo.net
Sun Nov 15 02:30:06 UTC 2009
I have been thinking and experimenting for weeks, but I cannot figure
I have an Intel SS4200 NAS that I wish to use as a ZFS NAS with FreeBSD 8.0.
The device has 4 SATA bays, and I don't want to use one for a UFS root disk.
I don't want to use up hundreds of megabytes of RAM preloading an
mfsroot that can never shrink.
The single IDE connector is accessible via the legacy ISA ports, and is
thus limited to PIO modes (about 1.6MB/sec max, even with an actual hard
drive instead of a CF card).
Performance is acceptable when using a geom_uzip image from a CF card on
the IDE connector, as a lot of it ends up cached in RAM (and is
evictable in case of memory pressure, unlike an mfsroot).
Try as I might, I am unable to figure out how to use a uzip imagefile on
UFS as a root filesystem, without dedicating a slice/partition to it.
There seems to be nothing approximating GNU/Linux's pivot_root, and
using a stub init (which cannot be a shellscript...?) to mdconfig and
mount the image, then chroot to that to exec /sbin/init appears to lead
to instant deadlock.
I don't really like the idea of mounting the image somewhere below root,
and using symlink spaghetti to get everything proper; especially since I
wish to place such essentials as /sbin and /etc thereupon, which leads
to a bit of a chicken-and-egg problem with setting up and mounting an
image that contains its mdconfig and mount...
Am I missing something obvious here, or am I truly treading unexplored
<CyberLeo at CyberLeo.Net>
Furry Peace! - http://wwww.fur.com/peace/
More information about the freebsd-questions