From owner-freebsd-fs@FreeBSD.ORG Sat Jul 21 00:22:43 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 5CDED106566B for ; Sat, 21 Jul 2012 00:22:43 +0000 (UTC) (envelope-from sam@athyriogames.com) Received: from madonna.sslcatacombnetworking.com (madonna.sslcatacombnetworking.com [174.133.19.130]) by mx1.freebsd.org (Postfix) with ESMTP id 276DD8FC16 for ; Sat, 21 Jul 2012 00:22:43 +0000 (UTC) Received: from c-98-206-215-156.hsd1.in.comcast.net ([98.206.215.156] helo=laptopv) by madonna.sslcatacombnetworking.com with esmtpa (Exim 4.69) (envelope-from ) id 1SsN4f-0007rV-8q for freebsd-fs@freebsd.org; Fri, 20 Jul 2012 18:57:33 -0500 From: "Sam Zehr" To: Date: Fri, 20 Jul 2012 19:05:15 -0500 Message-ID: <01bf01cd66d4$84756b40$8d6041c0$@com> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac1m1IGSCDeEA97+S7qCQ7u+tb9g1g== Content-Language: en-us X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - madonna.sslcatacombnetworking.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - athyriogames.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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: Sat, 21 Jul 2012 00:22:43 -0000 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