Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jun 2017 20:06:41 +0000 (UTC)
From:      "Stephen J. Kiernan" <stevek@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r319987 - head/etc
Message-ID:  <201706152006.v5FK6fak045607@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: stevek
Date: Thu Jun 15 20:06:41 2017
New Revision: 319987
URL: https://svnweb.freebsd.org/changeset/base/319987

Log:
  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

Modified:
  head/etc/rc.initdiskless

Modified: head/etc/rc.initdiskless
==============================================================================
--- head/etc/rc.initdiskless	Thu Jun 15 19:56:59 2017	(r319986)
+++ head/etc/rc.initdiskless	Thu Jun 15 20:06:41 2017	(r319987)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706152006.v5FK6fak045607>