NetBSD/regress/sys/fs/lfs/newfs_fsck/mkfs_mount
perseant 5d2f3e4908 Various minor LFS improvements:
* Extend the lfs library from fsck_lfs(8) so that it can be used with a
  not-yet-existent LFS.  Make newfs_lfs(8) use this library, so it can
  create LFSs whose Ifile is larger than one segment.
* Make newfs_lfs(8) use strsuftoi64() for its arguments, a la newfs(8).
* Make fsck_lfs(8) respect the "file system is clean" flag.
* Don't let fsck_lfs(8) think it has dirty blocks when invoked with the
  -n flag.
2005-02-26 05:45:54 +00:00

25 lines
630 B
Bash
Executable File

#!/bin/sh
#
# Make an LFS on TMPIM, fsck it, and mount it on TMPMP.
#
BVND=/dev/${VND}
CVND=/dev/r${VND}
if [ "x$NEWFS_LFS_FLAGS" = "x" ]
then
NEWFS_LFS_FLAGS="-B 131072 -b 4096 -f 4096 -M 6"
fi
echo "*** Creating a dummy directory tree at ${TMPMP} mounted on ${TMPIM}."
dd if=/dev/zero of=${TMPIM} count=5860
vnconfig -v ${BVND}${RPART} ${TMPIM}
disklabel -f ${SRCDIR}/disktab -rw ${VND} floppy288
newfs_lfs ${NEWFS_LFS_FLAGS} ${CVND}${MPART}
echo "*** Checking that fs made by newfs_lfs could be understood by fsck_lfs"
fsck_lfs -f -n ${CVND}${MPART} || exit 1
mkdir ${TMPMP}
mount -t lfs -o-N1 ${BVND}${MPART} ${TMPMP}