Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jul 2012 18:47:02 +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%2BStwJenwoDEjgsdoQ6qe%2B%2Bbz8Cn9G80yU6OzJDxi1nHPmg@mail.gmail.com>
In-Reply-To: <01f601cd681e$297f2b40$7c7d81c0$@com>
References:  <01bf01cd66d4$84756b40$8d6041c0$@com> <CAPS9%2BStQY%2B3W3aYHaXsqOeFGus18Mt0x1pGV1OTYOvRc1Wf=vw@mail.gmail.com> <01f601cd681e$297f2b40$7c7d81c0$@com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sam@athyriogames.com> 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 <sam@athyriogames.com> 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****
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPS9%2BStwJenwoDEjgsdoQ6qe%2B%2Bbz8Cn9G80yU6OzJDxi1nHPmg>