Replace md(4) usage in diskless(8) script rc.initdiskless with tmpfs(5).

Need to multiply the size of the disk passed to mount_md by 512 as mdmfs
expects number of 512-byte blocks while tmpfs size option wants number of
bytes.

Reviewed by:	brooks
Approved by:	sjg (mentor)
Obtained from:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D11106
This commit is contained in:
stevek 2017-06-15 20:06:41 +00:00
parent 7fc0b94656
commit 2f1d89586e

View File

@ -195,10 +195,10 @@ handle_remount() { # $1 = mount point
to_umount="$b ${to_umount}"
}
# Create a generic memory disk
# Create a generic memory disk (using tmpfs)
#
mount_md() {
/sbin/mdmfs -S -i 4096 -s $1 -M md $2
mount -t tmpfs -o size=$(($1 * 512)) tmpfs $2
}
# Create the memory filesystem if it has not already been created