aboutsummaryrefslogtreecommitdiff
path: root/release/scripts
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1999-01-05 03:44:08 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1999-01-05 03:44:08 +0000
commit92e86f99203e5a77fb392648577127c25d9a5e04 (patch)
tree884210f27e8274f9bae7ad9441ae864abf6b05c9 /release/scripts
parent891258b7618fa0b737b396261e6049091033d191 (diff)
downloadsrc-92e86f99203e5a77fb392648577127c25d9a5e04.tar.gz
src-92e86f99203e5a77fb392648577127c25d9a5e04.zip
Hammer on the boot floppy generation bits some more. This is looking
a little better.
Notes
Notes: svn path=/head/; revision=42300
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/doFS.sh28
1 files changed, 14 insertions, 14 deletions
diff --git a/release/scripts/doFS.sh b/release/scripts/doFS.sh
index 2dfb118839ba..36fa71773b96 100644
--- a/release/scripts/doFS.sh
+++ b/release/scripts/doFS.sh
@@ -6,6 +6,13 @@ if [ "x$VNDEVICE" = "x" ] ; then
fi
export BLOCKSIZE=512
+if [ "$1" = "-s" ]; then
+ do_size="yes"; shift
+else
+ do_size=""
+fi
+
+FSIMG=$1; shift
RD=$1 ; shift
MNT=$1 ; shift
FSSIZE=$1 ; shift
@@ -17,7 +24,7 @@ deadlock=20
while true
do
- rm -f fs-image
+ rm -f ${FSIMG}
if [ ! -b /dev/${VNDEVICE} -o ! -c /dev/r${VNDEVICE} ] ; then
( cd /dev && sh MAKEDEV ${VNDEVICE} )
@@ -29,12 +36,12 @@ do
vnconfig -u /dev/r${VNDEVICE} 2>/dev/null || true
- dd of=fs-image if=/dev/zero count=${FSSIZE} bs=1k 2>/dev/null
+ dd of=${FSIMG} if=/dev/zero count=${FSSIZE} bs=1k 2>/dev/null
# this suppresses the `invalid primary partition table: no magic'
awk 'BEGIN {printf "%c%c", 85, 170}' |\
- dd of=fs-image obs=1 seek=510 conv=notrunc 2>/dev/null
+ dd of=${FSIMG} obs=1 seek=510 conv=notrunc 2>/dev/null
- vnconfig -s labels -c /dev/r${VNDEVICE} fs-image
+ vnconfig -s labels -c /dev/r${VNDEVICE} ${FSIMG}
disklabel -Brw /dev/r${VNDEVICE} ${FSLABEL}
newfs -u 0 -t 0 -i ${FSINODE} -m 0 -T ${FSLABEL} -o space /dev/r${VNDEVICE}c
@@ -51,19 +58,12 @@ do
set `df -ki /mnt | tail -1`
umount ${MNT}
-
- fsck -p /dev/r${VNDEVICE}c < /dev/null
-
vnconfig -u /dev/r${VNDEVICE} 2>/dev/null || true
- if ! echo $FSLABEL | grep -q minimum; then
- echo ${FSSIZE} > fs-image.size
- break
- fi
-
echo ">>> Filesystem is ${FSSIZE} K, $4 left"
echo ">>> ${FSINODE} bytes/inode, $7 left"
- echo ">>> `expr ${FSSIZE} \* 1024 / ${FSINODE}`"
- echo ${FSSIZE} > fs-image.size
+ if [ "${do_size}" ]; then
+ echo ${FSSIZE} > ${FSIMG}.size
+ fi
break;
done