From owner-freebsd-fs@FreeBSD.ORG Sun Jul 22 10:01:32 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AFB7A10656D6 for ; Sun, 22 Jul 2012 10:01:32 +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 73D778FC08 for ; Sun, 22 Jul 2012 10:01:32 +0000 (UTC) Received: by obbun3 with SMTP id un3so10013653obb.13 for ; Sun, 22 Jul 2012 03:01:32 -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=xA9cRopD8zK6eU6moWp20t+Dc/dcQLk4lNT3iOtZvLA=; b=OuUyGeub4mrNXpkRHo1iQEX4fChCGPlBAVniOIILr9PBPv4nJ5Juudb/a7qVckONA9 sPGrPA6uOMUpVJnRozooKnfSgMikOB+lH4nFYDfkY7kg6DQoQa+MMwXLY09eNWDur29r 37rlfl0FXIyV+4xl+AWcbPWTQIDd32EwnzeIWWLejdElSYzEY9QkuztlXc6bWfcch0KR yr56dEJCN/97PsCRCCLn4JQfL+JTZDOFschZjZGUWj1iXokvV28g2ZxXaBGC3jogae1g BdlGeWvv10QysuNOhQUc2QVvDRGHEMOV+dc9OI3ZID+OmJdTdQ3YMnQ+ARcyLb1FslSN knfA== MIME-Version: 1.0 Received: by 10.182.88.9 with SMTP id bc9mr15770713obb.4.1342951292089; Sun, 22 Jul 2012 03:01:32 -0700 (PDT) Received: by 10.60.32.81 with HTTP; Sun, 22 Jul 2012 03:01:32 -0700 (PDT) In-Reply-To: <01bf01cd66d4$84756b40$8d6041c0$@com> References: <01bf01cd66d4$84756b40$8d6041c0$@com> Date: Sun, 22 Jul 2012 12:01:32 +0200 Message-ID: From: Andreas Nilsson To: Sam Zehr Content-Type: text/plain; charset=ISO-8859-1 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 10:01:32 -0000 On Sat, Jul 21, 2012 at 2:05 AM, Sam Zehr wrote: > Hello all. > > > > I apologize if this is the wrong place to ask, but I've had good luck with > USB questions in the USB list, so I thought this would be the place. > > > > How do I make a disk in FreeBSD 9.0 _completely_ read-only? > > > > I am converting an embedded system using flash for a disk from BSD 7.0 to > 9.0 > > > > rc.initdiskless is working > > > > I had luck with BSD 7.0 by doing the following additional steps: > > 1. Add noatime to fstab options > > 2. Add vfs.nfs.diskless_valid=1 to /boot/loader.conf > > > > So far this is not working on BSD 9.0. It looks like something is changing > on the disk during boot > > > > The disk is a USB thumb drive > > > > 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. > > > > Is there a way to completely lock the disk, even during the boot? > > > > Or perhaps a reason why setting vfs.nfs.diskless_valid=1 in > /boot/loader.conf does not appear to work? > > > > Thanks > > Sam > Perhaps start by reading http://www.freebsd.org/doc/en_US.ISO8859-1/articles/nanobsd/index.html which should contain the basics plus some nice extra features. Short version: did you do 'touch /etc/diskless' ? Best regards Andreas