How can I fix "Cannot find file system superblock" problem?

FK fk at zepher.dyndns.org
Sat Dec 9 13:31:11 PST 2006


Dear list members,

How can I fix "Cannot find file system superblock" problem?

I thought there would be a solution on the Internet, and
googled but could not find one yet. 
I hope you would have some hints. Thank you.

Background:
FreeBSD6.0-RELEASE.

#disklabel /dev/da0s2
# /dev/da0s2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
a: 18994687   524288    4.2BSD     2048 16384 28552 
b:   524288        0      swap                    
c: 19518975        0    unused        0     0       # "raw" part, don't edit


What I did:

#fsck_ffs /dev/da0s2a
** /dev/da0s2a
Cannot find file system superblock

LOOK FOR ALTERNATE SUPERBLOCKS? [yn] y

32 is not a file system superblock
SEARCH FOR ALTERNATE SUPER-BLOCK FAILED. YOU MUST USE THE
-b OPTION TO FSCK TO SPECIFY THE LOCATION OF AN ALTERNATE
SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8).

#newfs -N /dev/da0s2a
/dev/da0s2a: 9274.7MB (18994684 sectors) block size 16384, fragment size 2048
        using 51 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
 160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976,
 3387328, 3763680, 4140032, 4516384, 4892736, 5269088, 5645440, 6021792,
 6398144, 6774496, 7150848, 7527200, 7903552, 8279904, 8656256, 9032608,
 9408960, 9785312, 10161664, 10538016, 10914368, 11290720, 11667072, 12043424,
 12419776, 12796128, 13172480, 13548832, 13925184, 14301536, 14677888,
 15054240, 15430592, 15806944, 16183296, 16559648, 16936000, 17312352,
 17688704, 18065056, 18441408, 18817760, 19194112

I "fsck_ufs"ed every alternative superblock like below,
but the program complained they are not superblocks.

# fsck_ufs -b 160 /dev/da0s2
Alternate super block location: 160
** /dev/da0s2
160 is not a file system superblock
# fsck_ufs -b 376512 /dev/da0s2
Alternate super block location: 376512
** /dev/da0s2
376512 is not a file system superblock
# fsck_ufs -b 752864 /dev/da0s2
Alternate super block location: 752864
** /dev/da0s2
752864 is not a file system superblock

-- snip --

# fsck_ufs -b 18441408 /dev/da0s2
Alternate super block location: 18441408
** /dev/da0s2
18441408 is not a file system superblock
# fsck_ufs -b 18817760 /dev/da0s2
Alternate super block location: 18817760
** /dev/da0s2
18817760 is not a file system superblock
# fsck_ufs -b 19194112 /dev/da0s2
Alternate super block location: 19194112
** /dev/da0s2
19194112 is not a file system superblock


If alternatives are all copies of the master,
they must have the same contents. I checked and
found they are equal.

# dd if=/dev/da0s2a skip=160 bs=512 count=16 of=sb1
16+0 records in
16+0 records out
8192 bytes transferred in 0.013373 secs (612571 bytes/sec)
# dd if=/dev/da0s2a skip=376512 bs=512 count=16 of=sb2
16+0 records in
16+0 records out
8192 bytes transferred in 0.425421 secs (19256 bytes/sec)
# dd if=/dev/da0s2a skip=752864 bs=512 count=16 of=sb3
16+0 records in
16+0 records out
8192 bytes transferred in 0.018652 secs (439198 bytes/sec)

#diff -s sb1 sb2
Files sb1 and sb2 are identical
#diff -s sb1 sb3
Files sb1 and sb3 are identical
#diff -s sb2 sb3
Files sb2 and sb3 are identical


If you have any suggestions, I really aprreciate.
Thank you.

--
FK.



More information about the freebsd-questions mailing list