Date: Tue, 24 Aug 2010 15:48:52 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Marcel Moolenaar <xcllnt@mac.com> Cc: "freebsd-arch@FreeBSD.org" <freebsd-arch@FreeBSD.org> Subject: Re: RFC: enhancing the root mount logic Message-ID: <12990.1282664932@critter.freebsd.dk> In-Reply-To: Your message of "Tue, 24 Aug 2010 07:56:08 MST." <760A97A4-62D2-4900-915D-CA5D889855E1@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <760A97A4-62D2-4900-915D-CA5D889855E1@mac.com>, Marcel Moolenaar wri tes: >I'm perfectly happy to say that the ramdisk approach >is the most generic and solution for desktop and >server machines but I'm not at all ready to have it >include embedded systems just yet. It's just too >heavy weight... I'm with Marcel here. Except for one detail: In deeply embedded applications the ramdisk is actually preferable, because that saves you from providing a root filesystem any other way. Our solution for that is MD_PRELOADED which is quite a hack. The bit missing for the ramdisk approach is the root-fs-swizzle, code. There are two ways to do that, either a very magic mount-like system call, or by pid==1 setting the name of the real rootfs with a sysctl and exiting, which calls into the existing root-mount code again. The latter is almost trivial to implement, just remember to start the new /sbin/init with pid==1 Poul-Henning -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12990.1282664932>