How to force use of /etc/rc.initdiskless?

How is it supposed to do that in a non diskless machine?

In the article:

https://www.freebsd.org/doc/en_US.ISO8859-1/articles/solid-state/index.html

it is explained how to install FreeBSD on solid state devices and supposes that use of /etc/rc.initdiskless without explaining how should this happen.

As far as I know, in a real diskless machines this happens automatically because it is recognized that root is mounted with nfs.

Should I edit the rc scripts? Is this the recommended way?
 
Read diskless(8). Browse thru /etc/rc (hint: search for rc.initdiskless), next is /etc/rc.initdiskless, which contains a large description of what it does, on top.
 
Thanks Bobi,

but before answering, could you please read the question you answer?

Did you realy think that I did not take a look at /etc/rc and /etc/initdiskless and that I never read diskless() man page? And did you read them for feeling so sure that they answer my question?
 
Did you realy think that I did not take a look at /etc/rc and /etc/initdiskless and that I never read diskless(8) man page?
Apparently you didn't look closely enough, it took me less than 20 seconds to find it in /etc/rc:
Code:
dlv=`/sbin/sysctl -n vfs.nfs.diskless_valid 2> /dev/null`
if [ ${dlv:=0} -ne 0 -o -f /etc/diskless ]; then
        sh /etc/rc.initdiskless
fi

Note the check on the existence of /etc/diskless.
 
Back
Top