From owner-freebsd-fs@FreeBSD.ORG Sun Jul 22 16:47:04 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 078AB106564A for ; Sun, 22 Jul 2012 16:47:03 +0000 (UTC) (envelope-from andrnils@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 81B3B8FC1A for ; Sun, 22 Jul 2012 16:47:03 +0000 (UTC) Received: by obbun3 with SMTP id un3so10585856obb.13 for ; Sun, 22 Jul 2012 09:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5duMuQFe27oTTGy27eUV8nNsrAfan463TxXl5loDPoY=; b=0QXxCJnfF62ZSS5AvD5VxPhOeqJBg5mrtc/qLj2mKGA1x3frdkulskTXIe3/utORid j88ITrSIwMTb1HvJNkCcy/WjwGXbcM7AHNxeCVwDHBbL//8MGljweLf10VOuOY4kdsbv imFN4dyWK9glYvC1PAMUotoGCc8qSuEW95MQs6JQo+LbFsA3dtPr9Al7od3cpwwImk92 hUigUWo6R8gSM/6LI84iNpcSFlfcjsVuCw2UCsEVwG8w3EpH0/Skhojh+tMzA5qB4t1B egRZZ/rjnE34tf1pyvUU42YS+mpyVWXP/bJUIidaqEfEuFsreJdBDj6dA++RFllA/6pB cGqA== MIME-Version: 1.0 Received: by 10.182.149.105 with SMTP id tz9mr16755814obb.65.1342975622909; Sun, 22 Jul 2012 09:47:02 -0700 (PDT) Received: by 10.60.32.81 with HTTP; Sun, 22 Jul 2012 09:47:02 -0700 (PDT) In-Reply-To: <01f601cd681e$297f2b40$7c7d81c0$@com> References: <01bf01cd66d4$84756b40$8d6041c0$@com> <01f601cd681e$297f2b40$7c7d81c0$@com> Date: Sun, 22 Jul 2012 18:47:02 +0200 Message-ID: From: Andreas Nilsson To: Sam Zehr Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-fs@freebsd.org Subject: Re: Boot disk read-only? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jul 2012 16:47:04 -0000 You're welcome. In /etc/rc there is: dlv=3D`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null` if [ ${dlv:=3D0} -ne 0 -o -f /etc/diskless ]; then sh /etc/rc.initdiskless fi Have you tried to add vfs.nfs.diskless_valid to /etc/sysctl.conf? I usually just touch /etc/diskless , works for me ;) man diskless might have some more insights too, if you have not read it. Best regards Andreas On Sun, Jul 22, 2012 at 5:24 PM, Sam Zehr wrote: > Thanks Andreas**** > > ** ** > > I read the section on NanoBSD, but did not find any reference to =91touch > /etc/diskless/**** > > ** ** > > I also had advice to check to see what files are changing:**** > > find / -mtime -1d =96print**** > > ** ** > > Returns changes in /dev, /tmp, and /var only**** > > ** ** > > /tmp and /var are memory disks, I assume this is expected behavior.**** > > ** ** > > Sam**** > > ** ** > > *From:* Andreas Nilsson [mailto:andrnils@gmail.com] > *Sent:* Sunday, July 22, 2012 5:02 AM > > **** > > On Sat, Jul 21, 2012 at 2:05 AM, Sam Zehr wrote:**= * > * > > {edited for brevity}**** > > How do I make a disk in FreeBSD 9.0 _completely_ read-only? > rc.initdiskless is working > > 1. Add noatime to fstab options > 2. Add vfs.nfs.diskless_valid=3D1 to /boot/loader.conf > So far this is not working on BSD 9.0. It looks like something is changin= g > on the disk during boot > Sysctl vfs.nfs.diskless_valid returns 0 once booted up > Please note that I am not just concerned about files - the entire disk > needs > to be locked, like ROM. > Or perhaps a reason why setting vfs.nfs.diskless_valid=3D1 in > /boot/loader.conf does not appear to work? > > **** > > ** ** > > Perhaps start by reading > http://www.freebsd.org/doc/en_US.ISO8859-1/articles/nanobsd/index.html wh= ich > should contain the basics plus some nice extra features.**** > > ** ** > > Short version: did you do 'touch /etc/diskless' ?**** > > ** ** > > Best regards**** > > Andreas**** >