Subject: Re: dump_lfs issue
To: Marcin Michal Jessa <m.jessa@gmail.com>
From: Konrad Schroder <perseant@hhhh.org>
List: current-users
Date: 04/30/2007 17:29:42
On Tue, 1 May 2007, Marcin Michal Jessa wrote:

> On 5/1/07, Juan RP <juan@xtrarom.org> wrote:
>> Yeah... it should find the LFS partition, at least on my test seems to
>> work fine:

I could be wrong about this, but it would appear from the source (and your 
example) that scan_ffs will not give the address of the superblock 
relative to the partition, but attempts to infer the address of the 
partition from the superblock(s) it finds on the raw disk.  So the number 
it reports will be off by 16.  Still better than the shell script I posted 
:^) but it seems important to understand the limitations.

> Using Juan's example, how do I calculate the block size to use with
> fsck_lfs -b ?
> Would that be as simple as using the bsize value?

Well, no, "fsck_lfs -b NN" takes a _sector number_ as NN, not the block 
size.  You have to specify an alternate superblock for fsck_lfs to use, 
because the ordinary one got overwritten with "DUMP: bad sblock magic 
number" or the like.

Take care,
 						Konrad Schroder
 						perseant@hhhh.org