From owner-svn-src-all@freebsd.org Mon Jan 4 17:58:36 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49F62A623F0 for ; Mon, 4 Jan 2016 17:58:36 +0000 (UTC) (envelope-from 000001520dbaa813-9130e194-040b-43fb-bca8-ea6d92054d7f-000000@amazonses.com) Received: from a9-40.smtp-out.amazonses.com (a9-40.smtp-out.amazonses.com [54.240.9.40]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11A101FA4 for ; Mon, 4 Jan 2016 17:58:35 +0000 (UTC) (envelope-from 000001520dbaa813-9130e194-040b-43fb-bca8-ea6d92054d7f-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=dqtolf56kk3wpt62c3jnwboqvr7iedax; d=tarsnap.com; t=1451929282; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=A0OpwxBHpxI3McOcuL0s1rPa14kh/Z0XACCtwEgZVGE=; b=j1WJm2foSU5QhVe64CAJBbXpCGfn+xS4cED5lwx1lXJi5E9jc7Ey9MPBjAf0cfyb BzwDr/vEzcVzf1uONU2dp5PrKwmQqWOpHa2dpHq2xblmBRnZLUX+B9sVWQjYYCx52YU 7r3ySg4uSM4q2K2zx0g/76QJr0v+oOy39WWwYJxk= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1451929282; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=A0OpwxBHpxI3McOcuL0s1rPa14kh/Z0XACCtwEgZVGE=; b=b7SeTQzF5VQ7XFzD5intkpQg8d9VIh1u7HtrIXBb7AQul+0/R69B/Csd6E6KV008 7BD+9n/2u1Dv+RLPZ08P6KaqrfQ1Q7giaLxpkpLHvKXPPVKtIEWknLZGS2U/e5acS73 CW1Ws4P8OMRcOj5JzgW0/wUZx4Bo5R1hLzwyWSFU= Subject: Re: svn commit: r293115 - head/etc To: Warner Losh References: <201601031918.u03JImBs012182@repo.freebsd.org> <000001520d9553a7-b3ef495a-89d6-44ec-91c1-c4f9afc2c55b-000000@email.amazonses.com> Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" From: Colin Percival Message-ID: <000001520dbaa813-9130e194-040b-43fb-bca8-ea6d92054d7f-000000@email.amazonses.com> Date: Mon, 4 Jan 2016 17:41:22 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2016.01.04-54.240.9.40 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 17:58:36 -0000 On 01/04/16 09:09, Warner Losh wrote: > On Mon, Jan 4, 2016 at 10:00 AM, Colin Percival > wrote: > On 01/03/16 11:18, Warner Losh wrote: > > Fix the read-only > > root case with horrible kludge of mounting rw removing the files, then > > mounting ro. > > The solution I intended when I introduced this (and used elsewhere) was to > set $firstboot_sentinel in /etc(/defaults)?/rc.conf. This case is precisely > why it's a shell variable, in fact. > > Except that's not exactly useful. NanoBSD boots with no filesystems writable > that are permanent. So I could set it to /var/firstboot or something like that, > and the error would go away. However, that wouldn't solve the problem > because /var is repopulated from base seed files every boot with NanoBSD > so we'd get firstboot behavior on every single boot. Or, we could remount > / rw and remove the file and remount it ro when a read-only root was > requested. Huh, ok. I assumed that you had a /conf/ or something like that for storing persistent configuration data. > I wondered to myself why we didn't use the same mechanism as nextboot > for this feature. Do you know? Doesn't that still write to the filesystem? -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid