Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ffs can't find superblock
On Thu, 03 Feb 2011, mortee wrote:
> On 02/03/2011 15:09, David Laight wrote:
> > I'd 'hexdump -C' the first part of the partition to a file and look at it!
> > For ffsv1 the superblock is 8k at 8k.
> > For ffsv2 it is at (IIRC) 64k.
> >
> > Comparing it to the header file might be illuminative.
>
> Thanks for the fast reply. To be honest, nowadays I'm not really into
> such hacking (and also having an annoying headache, too), so I'm not
> exactly sure which part to dump, and to compare to what?
dd if=/dev/rwd3a bs=512 count=32 | hexdump -C >somefile
That will get you the first 16kb of the partition. For FFSv1 a.k.a.
UFS1, the superblock is the second half of that. The first half may
contain boot code, and disklabel.
If there's a disklabel, its magic number should appear twice:
00000200 57 45 56 82 04 00 00 00 57 44 33 32 30 30 42 45 |WEV.....WD3200BE|
^^^^^^^^^^^ ^^^^
00000280 00 00 00 00 57 45 56 82 5a d4 04 00 00 20 00 00 |....WEV.Z......|
^^^^^^^^^^^ ^^^^
You should see the "last mounted on" string, and the FS_UFS1_MAGIC
magic number:
000020d0 00 01 00 80 2f 6d 6e 74 00 00 00 00 00 00 00 00 |..../mnt........|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^
00002550 01 00 00 00 00 00 00 00 00 00 00 00 54 19 01 00 |............T...|
^^^^^^^^^^^ ^^^^
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index