Subject: bin/21127: fsck_ffs won't update UFS1 standard superblock
To: None <email@example.com>
From: None <firstname.lastname@example.org>
Date: 04/14/2003 01:55:25
>Synopsis: fsck_ffs won't update UFS1 standard superblock
>Arrival-Date: Sun Apr 13 08:56:00 PDT 2003
>Originator: Luke Mewburn
>Release: NetBSD 1.6Q
System: NetBSD argo.mewburn.net 1.6Q NetBSD 1.6Q (ARGO from GENERIC-$Revision: 1.546 $) #0: Wed Apr 2 09:17:18 EST 2003 email@example.com:/var/obj/i386/usr/src/sys/arch/i386/compile/ARGO i386
I ran a -current fsck_ffs on a UFS1 file system that had a
superblock that wasn't usable, but the first alternate was usable.
Unfortunately, fsck_ffs would not write the fixed alternate
superblock back over the primary superblock (it didn't even
prompt me). This meant that the file system is alwasy corrupt
as far as "fsck" and "fsck -p" is concerned...
I managed to "fix" this by using an older fsck_ffs which *DID*
prompt me with "UPDATE STANDARD SUPERBLOCK"; once that was
done I ran -current fsck_ffs -f a couple of times and "all was
From examining fsck/utilities.c::ckfini() (rev 1.36 or newer),
the "UPDATE STANDARD SUPERBLOCK" question will NOT be asked
unless the file system is a UFS2 file system.
This means that fsck_ffs is now effectively useless for UFS1
file systems with corrupt superblocks...
Nuke the primary superblock on a UFS1 partition.
Try and get -current fsck_ffs to fix the primary superblock
(after using the first alternate).