Don't print out 0xaa55 at the end of a vnconfig disk and use the
"canonical" disk name when calling disklabel so that disklabel auto works.
This commit is contained in:
parent
d0615c64a5
commit
9318987eea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89415
@ -45,12 +45,9 @@ dofs_vn () {
|
||||
vnconfig -u /dev/r${VNDEVICE} 2>/dev/null || true
|
||||
|
||||
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=${FSIMG} obs=1 seek=510 conv=notrunc 2>/dev/null
|
||||
|
||||
vnconfig -s labels -c /dev/r${VNDEVICE} ${FSIMG}
|
||||
disklabel -Brw /dev/r${VNDEVICE} ${FSLABEL}
|
||||
disklabel -Brw ${VNDEVICE} ${FSLABEL}
|
||||
newfs -i ${FSINODE} -o space -m 1 /dev/r${VNDEVICE}c
|
||||
|
||||
mount /dev/${VNDEVICE}c ${MNT}
|
||||
|
Loading…
Reference in New Issue
Block a user