freebsd-skq/sbin/newfs
Doug Barton a32bb1b53a When newfs'ing a partition with UFS2 that had previously been newfs'ed
with UFS1, the UFS1 superblocks were not deleted. This allowed any
RELENG_4 (or other non-UFS2-aware) fsck to think it knew how to "fix"
the file system, resulting in severe data scrambling.

This patch is a more advanced version than the one originally submitted.
Lukas improved it based on feedback from Kirk, and testing by me. It
blanks all UFS1 superblocks (if any) during a UFS2 newfs, thereby causing
fsck's that are not UFS2 aware to generate the "SEARCH FOR ALTERNATE
SUPER-BLOCK FAILED" message, and exit without damaging the fs.

PR:		bin/51619
Submitted by:	Lukas Ertl <l.ertl@univie.ac.at>
Reviewed by:	kirk
Approved by:	re (scottl)
2003-05-22 18:38:54 +00:00
..
Makefile Convert newfs to libufs (really). Solves one real issue with previous 2003-02-11 03:06:45 +00:00
mkfs.c When newfs'ing a partition with UFS2 that had previously been newfs'ed 2003-05-22 18:38:54 +00:00
newfs.8 Remove reference to diskpart(8) 2003-04-20 19:16:21 +00:00
newfs.c Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
newfs.h Correct lines incorrectly added to the copyright message. Add missing period. 2003-02-14 21:08:14 +00:00
ref.test Fix the -R flag so that it provides sequential "random" numbers 2003-02-22 23:26:11 +00:00
runtest00.sh Add the undocumented -R option to disable randomness for regression-testing. 2002-03-19 21:05:29 +00:00
runtest01.sh Add the undocumented -R option to disable randomness for regression-testing. 2002-03-19 21:05:29 +00:00