Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jul 2012 12:01:32 +0200
From:      Andreas Nilsson <andrnils@gmail.com>
To:        Sam Zehr <sam@athyriogames.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Boot disk read-only?
Message-ID:  <CAPS9%2BStQY%2B3W3aYHaXsqOeFGus18Mt0x1pGV1OTYOvRc1Wf=vw@mail.gmail.com>
In-Reply-To: <01bf01cd66d4$84756b40$8d6041c0$@com>
References:  <01bf01cd66d4$84756b40$8d6041c0$@com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jul 21, 2012 at 2:05 AM, Sam Zehr <sam@athyriogames.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPS9%2BStQY%2B3W3aYHaXsqOeFGus18Mt0x1pGV1OTYOvRc1Wf=vw>