Subject: bin/21127: fsck_ffs won't update UFS1 standard superblock
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lukem@netbsd.org>
List: netbsd-bugs
Date: 04/14/2003 01:55:25
>Number: 21127
>Category: bin
>Synopsis: fsck_ffs won't update UFS1 standard superblock
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 13 08:56:00 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Luke Mewburn
>Release: NetBSD 1.6Q
>Organization:
>Environment:
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 lukem@argo.mewburn.net:/var/obj/i386/usr/src/sys/arch/i386/compile/ARGO i386
Architecture: i386
Machine: i386
>Description:
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
well".
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...
>How-To-Repeat:
Nuke the primary superblock on a UFS1 partition.
Try and get -current fsck_ffs to fix the primary superblock
(after using the first alternate).
>Fix:
No Idea.
>Release-Note:
>Audit-Trail:
>Unformatted: