From fa79914ebab0270b0ddf10d91be058d619e2c088 Mon Sep 17 00:00:00 2001 From: imp Date: Wed, 25 Apr 2001 05:46:40 +0000 Subject: 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 --- etc/rc.diskless2 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'etc/rc.diskless2') 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) -- cgit v1.1