Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 2003 21:52:54 -0800 (PST)
From:      "Scott I. Remick" <scott@sremick.net>
To:        FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: "Cannot find file system superblock" error - how to recover?
Message-ID:  <20031209055254.43869.qmail@web41110.mail.yahoo.com>
In-Reply-To: <20031205135430.6252d368.doublef@tele-kom.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--- Sergey 'DoubleF' Zaharchenko <doublef@tele-kom.ru> wrote:
> I wonder what did destroy it. Of course, system crashes can do wonders,
> but...

Well, I was trying to save a file to that drive when my system spontaneously
rebooted for no apparent reason.

> In fact, there should be a way, because a valid superblock copy has a
> correct checksum. Perhaps I'll hack up a program to do that taking
> information from the /usr/src/sys/ufs/... There's also a magic number
> for a superblock, mentioned in fs.h (in 4.8 it's 0x011954). 

I see:

#define FS_UFS1_MAGIC   0x011954        /* UFS1 fast filesystem magic number
*/
#define FS_UFS2_MAGIC   0x19540119      /* UFS2 fast filesystem magic number
*/

And I remember this drive was UFS2, because I was wondering if I should be
concerned that this drive was UFS2 and the system drive was UFS1 (/, /var,
/usr). However, the following command turns up no results after several
mins:

su-2.05b# hd < /dev/ad6s1 | grep "19 01 54 19"

Yet this won't work unless the bytes all line up on the same line. If
they're split across lines in the hd output, there'll be no match.

Even though your command is for UFS1, I get several matches, but they must
be false-positives as I know I used UFS2:

su-2.05b# hd < /dev/ad6s1 | grep "54 19 01 00"
00001620  54 19 01 00 74 10 68 81  23 00 00 e8 d5 03 00 00 
|T...t.h.#.......|
00002550  01 00 00 00 00 00 00 00  00 00 00 00 54 19 01 00 
|............T...|
00004550  01 00 00 00 00 00 00 00  00 00 00 00 54 19 01 00 
|............T...|
002e6550  01 00 00 00 00 00 00 00  00 00 00 00 54 19 01 00 
|............T...|
00548740  51 19 01 00 52 19 01 00  53 19 01 00 54 19 01 00 
|Q...R...S...T...|
00549740  51 19 01 00 52 19 01 00  53 19 01 00 54 19 01 00 
|Q...R...S...T...|

Unless somehow I am confused...?

Any other ideas for finding an intact superblock off this drive and
repairing it? Anyone?

=====
Scott I. Remick   --==--   ICQ: 450152 
Save the internet - Use a Mozilla-based browser: http://vtbsd.net/mozilla/
FreeBSD: Because making unix user-friendly is easier than debugging Windows. http://vtbsd.net/freebsd/
"Voici mon secret. Il est tres simple: on ne voit bien qu'avec le coeur. L'essentiel est invisible pour les yeux."

Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031209055254.43869.qmail>