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:
parent
a8c4fcb9c7
commit
dd8a25a799
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user