summaryrefslogtreecommitdiffstats
path: root/etc/rc.diskless2
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-04-25 05:46:40 +0000
committerimp <imp@FreeBSD.org>2001-04-25 05:46:40 +0000
commitfa79914ebab0270b0ddf10d91be058d619e2c088 (patch)
treefa0eb22c0abbc2cc056385e256defa2df2f7d2c8 /etc/rc.diskless2
parent3b8fad2c5973912ad3f2cbc7ac26dc242ab95134 (diff)
downloadFreeBSD-src-fa79914ebab0270b0ddf10d91be058d619e2c088.zip
FreeBSD-src-fa79914ebab0270b0ddf10d91be058d619e2c088.tar.gz
Move to using md.
o create a simple wrapper function mount_md that makes it easy to move from mount_mfs. # NOTE: you will need to MAKEDEV md[0123] in order for this to work. Reviewed by: bsd, keichii
Diffstat (limited to 'etc/rc.diskless2')
-rw-r--r--etc/rc.diskless211
1 files changed, 9 insertions, 2 deletions
diff --git a/etc/rc.diskless2 b/etc/rc.diskless2
index e69f6ee5..043b72f 100644
--- a/etc/rc.diskless2
+++ b/etc/rc.diskless2
@@ -29,6 +29,13 @@
# rc.diskless2
#
+mount_md() {
+ /sbin/mdconfig -a -t malloc -s $1 -u $3
+ /sbin/disklabel -r -w md$3 auto
+ /sbin/newfs /dev/md$3c
+ /sbin/mount /dev/md$3c $2
+}
+
# If there is a global system configuration file, suck it in.
#
if [ -r /etc/defaults/rc.conf ]; then
@@ -39,7 +46,7 @@ elif [ -r /etc/rc.conf ]; then
fi
echo "+++ mfs_mount of /var"
-mount_mfs -s ${varsize:=65536} -T qp120at dummy /var
+mount_md ${varsize:=65536} /var 2
echo "+++ populate /var using /etc/mtree/BSD.var.dist"
/usr/sbin/mtree -deU -f /etc/mtree/BSD.var.dist -p /var
@@ -65,5 +72,5 @@ mount -a # chown and chgrp are in /usr
# extract a list of device entries, then copy them to a writable partition
(cd /; find -x dev | cpio -o -H newc) > /tmp/dev.tmp
echo "+++ mount_mfs of /dev"
-mount_mfs -s 4096 -i 512 -T qp120at dummy /dev
+mount_md 4096 /dev 3
(cd /; cpio -i -H newc -d < /tmp/dev.tmp)
OpenPOWER on IntegriCloud