From owner-freebsd-arch@FreeBSD.ORG Mon Aug 23 22:07:32 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 50C8F10656A5 for ; Mon, 23 Aug 2010 22:07:32 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D1CD58FC17 for ; Mon, 23 Aug 2010 22:07:31 +0000 (UTC) Received: by bwz20 with SMTP id 20so575813bwz.13 for ; Mon, 23 Aug 2010 15:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=th6aRvS8GyJMiz5FWpFntdCAjLvzpHTJZQPm5u5gLXg=; b=mxqh2521jJh71mvxOd92oZYDj5v0w3Nq4JXtsL9PvBwWDEq++qwH7mhMSKUqNsKRa2 OzaVEXxwy+XKhwT+s4DqgwlzSO8Tl1FZ0Ja2hokelNMJaytGGye0t45RrM2XBL503+dt Iw6t7RcVzK+xAw7u+WKzSKvrTUceQToGkhM5I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=TO2WJlIpO2OmoaXkF2L56QY233gVM9LapmJZY+LRiELQCqb9SuBDaLiBJNwi60BPo1 0DWTbG1t9olp7lHL1m9FPqHg44h7T2MS9w+OMmZ4dp/zB8ELYrnrxQCVMcuIphInMAWH SvAuonLGpfSZTPVwPoteGVQ5QfR5AEmeEhqoQ= MIME-Version: 1.0 Received: by 10.213.114.67 with SMTP id d3mr4667777ebq.73.1282601250485; Mon, 23 Aug 2010 15:07:30 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.213.20.144 with HTTP; Mon, 23 Aug 2010 15:07:30 -0700 (PDT) In-Reply-To: References: Date: Mon, 23 Aug 2010 15:07:30 -0700 X-Google-Sender-Auth: HZjnI6JaPW68ua7gcToaSnODCSs Message-ID: From: mdf@FreeBSD.org To: Marcel Moolenaar Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Arch 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: Mon, 23 Aug 2010 22:07:32 -0000 On Mon, Aug 23, 2010 at 2:30 PM, Marcel Moolenaar wro= te: > In embedded products, software is possibly installed as an image onto > an actual storage device. This means that mounting the storage device > as root is not enough to have a usable root file system. The rough > draft below is an idea to enhance the root mount from having ad-hoc > quirks to a well-defined and recursive mechanism to allow a wide- > range of use cases. I am not making any claims to the overall desirability of this, but as a suggestion for the file format: > =A0 [devfs] =A0 =A0 =A0/.mount.conf: > =A0 =A0 =A0 =A0ufs:/dev/da0 > =A0 =A0 =A0 =A0.ask > =A0 =A0 =A0 =A0.wait 5 > =A0 =A0 =A0 =A0.onfail panic To me, this should wait 0 seconds (or whatever the default is) until after the .ask mount point has been tried. I'd suggest something like: =A0 [devfs] =A0 =A0 =A0/.mount.conf: =A0 =A0 =A0 =A0.wait 10 =A0 =A0 =A0 =A0ufs:/dev/da0 # wait up to 10 seconds for ufs .wait 5 =A0 =A0 =A0 =A0.ask # wait up to 5 seconds for the prompt-returned filesystem =A0 =A0 =A0 =A0.onfail panic The two reasons for such a usage: 1) simplifies parsing, since the file only needs to be read to a mount directive, not read in its entirety. 2) allows different timeouts for each root mount location I could also imagine, instead, a .mount directive, so that all "commands" start with a '.' which would be like: .mount ufs:/dev/da0 8 which would be an 8 second timeout on the specified mount point. Anyways, as a flexible mechanism this sounds reasonable. I have no idea how it compares to what other operating systems do, which is only relevant insofar as making migration from another platform easier. Thanks, matthew