Mounting swap device on iscsi target

Eugene Grosbein eugen at grosbein.net
Sun Jan 17 19:29:15 UTC 2021


18.01.2021 1:43, BERTRAND Joël wrote:

>>> 	If I have understood, varmfs creates whole /var. I have some troubles
>>> with /var/at also. How can I create a file system in memory for /var/run
>>> and /var/at ?
>>
>> Read diskless(8) manual page, section CONFIGURATION.
> 
> 	I don't understand your answer. I have configured this workstation a
> long time ago and I have read this manual page to write its
> configuration. My question was : how create two ramdisks, one for
> /var/at, the second for /var/run in /etc/rc.conf ? I suppose I can write
> a script in /etc/rc.d, but I'm pretty sure somebody use diskless FreeBSD
> workstation also.

We have /etc/rc.initdiskless script that runs if there is (empty) /etc/diskless file at boot time.
In addition to diskless(8) manual page, please read comments at the beginning of /etc/rc.initdiskless,
they describe its mechanics in more details. In particular, it tells:

# The existence of a directory /conf/T/M causes this script to create a
# memory filesystem mounted as /M on the client.

So it is able to create as many in-memory file system as you need
once you provide diskless machine with correct /conf directory.

Use that, it works.



More information about the freebsd-hackers mailing list