From owner-freebsd-arch@FreeBSD.ORG Tue Aug 24 15:48:59 2010 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 773AD1065679 for ; Tue, 24 Aug 2010 15:48:59 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 3CC018FC18 for ; Tue, 24 Aug 2010 15:48:58 +0000 (UTC) Received: from critter.freebsd.dk (unknown [192.168.51.2]) by phk.freebsd.dk (Postfix) with ESMTP id 204C23F5B7; Tue, 24 Aug 2010 15:48:56 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.4/8.14.4) with ESMTP id o7OFmq7J012991; Tue, 24 Aug 2010 15:48:53 GMT (envelope-from phk@critter.freebsd.dk) To: Marcel Moolenaar From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 24 Aug 2010 07:56:08 MST." <760A97A4-62D2-4900-915D-CA5D889855E1@mac.com> Date: Tue, 24 Aug 2010 15:48:52 +0000 Message-ID: <12990.1282664932@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: "freebsd-arch@FreeBSD.org" Subject: Re: RFC: enhancing the root mount logic X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2010 15:48:59 -0000 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.