2. Partition "versaut"

Message
Author
winner
Posts: 16
Joined: 04. Sep 2005 13:32

#31 Post by winner »

klopskuchen wrote:dumpe2fs will bei mir keinen alternativen Superblock. e2fsck schon.
1. es war die frage bei debugfs nicht dumpefs
2. alle 3 ( e2fsck , debugfs, dumpe2fs ) akzeptieren einen Alternativsuperblock, sowie eine Blockgrössenangabe .....
Auszüge aus den Manpages :
e2fsck

Code: Select all

       -b superblock
              Instead of using the normal superblock, use an alternative superblock specified by superblock.  This option is normally used
              when the primary  superblock  has  been corrupted.  The location of the backup superblock is dependent on the filesystem's
              blocksize.  For filesystems  with 1k blocksizes, a backup superblock can be found at block 8193; for filesystems with 2k
              blocksizes, at block 16384; and for 4k  blocksizes, at block 32768.

              Additional  backup  superblocks  can be determined by using the mke2fs program using the -n option to print out where the
              superblocks were created.  The -b option to mke2fs, which specifies blocksize of the filesystem must be specified in order
              for the superblock  locations that are printed out to be accurate.

              If an alternative superblock is specified and the filesystem is not opened read-only, e2fsck will make sure that the primary
              superblock is updated appropriately upon completion of the filesystem check.

       -B blocksize
              Normally, e2fsck will search for the superblock at various different block sizes in an attempt to find the appropriate
              block  size. This search  can  be  fooled  in  some cases.  This option forces e2fsck to only try locating the superblock
              at a particular blocksize.  If the superblock is not found, e2fsck will terminate with a fatal error.
debugfs

Code: Select all

       -b blocksize
              Forces the use of the given block size for the file system, rather than detecting the correct block size as normal.

       -s superblock
              Causes the file system superblock to be read from the given block number, rather than the default (1).  If you give a -s option, you  must
              also give a -b option.
dumpe2fs

Code: Select all

       -ob superblock
              use  the block superblock when examining the filesystem.  This option is not usually needed except by a filesystem wizard who is examining
              the remains of a very badly corupted filesystem.

       -oB blocksize
              use blocks of blocksize bytes when examining the filesystem.  This option is not usually needed except by a filesystem wizard who is exam-
              ining the remains of a very badly corupted filesystem.
Auf Deutsch : bei e2fsck und dumpe2fs ist die Blockgrössenangabe frei, bei debugs zwingend, wenn man den Superblock angibt. 8)
klopskuchen wrote:Allerdings hast du einen Syntaxfehler gemacht. Mit "e2fsck -b $z /dev/hdb2" nimmt das Programm immer Block 0. Es fehlt das Gleichheitszeichen:
e2fsck -b=$z /dev/hdb2
laut meiner manpage ( und auch der Fehlermeldung" von e2fsck ohne gleichheitszeichen >>>

Code: Select all

:~ # e2fsck -b 33 /dev/hdb2
e2fsck 1.35 (28-Feb-2004)
e2fsck: Bad magic number in super-block while trying to open /dev/hdb2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

&#58;~ # e2fsck -b=33 /dev/hdb2
e2fsck 1.35 &#40;28-Feb-2004&#41;
e2fsck&#58; Bad magic number in super-block while trying to open /dev/hdb2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem &#40;and not swap or ufs or something else&#41;, then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock&#58;
    e2fsck -b 8193 <device>
klopskuchen wrote:Wenn die erste Suche bei Block 10000000 erfolgte, hast du ein Offset von mindestens >3GB (bei 512Bytes per Block, das achtfache bei 4096Byes per Block).
Na ja - Das "alte" Script arbeitete mit verschachtelten for-schleifen -
1-9 = 1 for schleife, 10-99 2 for schleifen, 100-999 3 ......
und Udo M. ( gast ) stellte in Frage was da rauskommt :
x=x1$x2$x3$x4$x5$x6$x7$x8 ( 8 verschachtelte For-Schleifen )
ergibt echo $x nun x10000000 oder 10000000 ;)
aber mit der Runderneuerung via while-schleife denke ich das ganze eleganter gelöst zu haben :lol:

Code: Select all

#!/bin/sh
x=0
while &#91; $x -le 28596456 &#93;; do
 &#40;&#40;++x&#41;&#41;
 y=0
 while &#91; $y -le 65536 &#93;; do
  &#40;&#40;++y&#41;&#41;
  nice -n 20 dumpe2fs -oB $y -ob $x /dev/hdb2
  nice -n 20 debugfs -b $y -s $x -c -R quit /dev/hdb2
  nice -n 20 e2fsck -B $y -b $x /dev/hdb2
  echo Ende Schleifendurchlauf Subblock $x $y
  done
 echo 
 echo Ende Schleifendurchlauf Block $x
 echo 
done

klopskuchen
prolinux-forum-admin
Posts: 1444
Joined: 26. Jun 2004 21:18
Contact:

#32 Post by klopskuchen »

> 1. es war die frage bei debugfs nicht dumpefs
War nur zur Information (mit denen wir uns mittlerweile gegenseitig erschlagen? ;) ).

> Auszüge aus den Manpages
Leider kommt es vor, daß sich Programme anders als dokumentiert verhalten. Siehe auch Nächstes:

> laut meiner manpage ( und auch der Fehlermeldung" von e2fsck ohne gleichheitszeichen >>>
Theoretisch auch laut "meiner" manpage. Praktisch allerdings funktioniert es bei mir ausschließlich mit Gleichheitszeichen.

> aber mit der Runderneuerung via while-schleife denke ich das ganze eleganter gelöst zu haben
Und, Ergebnis?

ps. Hast du mal die empfohlenen Blocknummern probiert?

MfG, Klopskuchen
When all else fails, read the instructions .

winner
Posts: 16
Joined: 04. Sep 2005 13:32

#33 Post by winner »

klopskuchen wrote:War nur zur Information (mit denen wir uns mittlerweile gegenseitig erschlagen? ;) ).
ja so halbwegs - nur gibt es ja leider keinen "Standard" bei unterschiedlichen Versionen / Distributionen was die Parameter zb angeht - ( Siehe unser Problem mit loop 8)
da muss man zwangsläufig auch Infos austauschen
klopskuchen wrote:> aber mit der Runderneuerung via while-schleife denke ich das ganze eleganter gelöst zu haben
Und, Ergebnis?
also aktuell ist das Script bei Superblock 610 , Blockgrösse 54312 - bisher ohne positiv-Befund
klopskuchen wrote:ps. Hast du mal die empfohlenen Blocknummern probiert?

ja - statt der 2.While-Schleife hatte ich zuerst eine forschleife, die diese Blöcke durchrattert ( incl 8192 ) - ohne ergebnis - daher ist ja an dessen stelle die while-schleife die bis 65536 alles durchwühlt ( $y im Script )
MfG, Klopskuchen[/quote]

klopskuchen
prolinux-forum-admin
Posts: 1444
Joined: 26. Jun 2004 21:18
Contact:

#34 Post by klopskuchen »

> also aktuell ist das Script bei Superblock 610 , Blockgrösse 54312 - bisher ohne positiv-Befund
Tut mir leid, das verstehe ich nicht. Es gibt, auch bei 30GB-Partitionen, gewiß keine 610 Superblöcke (oder Backups). Und eine "Blockgröße 54312" hieße, alle Blöcke einer Partition wären ~53.048KiloByte groß? Haust du da was durcheinander?

MfG, Klopskuchen
When all else fails, read the instructions .

winner
Posts: 16
Joined: 04. Sep 2005 13:32

#35 Post by winner »

Na ja ok - das ganze kann etwas Missverständlich sein ...
Als durchsuchten superblock bezeichnete ich den block der als eventueller superblock durchsucht wurde ( also zb 610 ) wobei ich zusätzlich unterschiedliche Blockgrössen durchteste ....
also bisher : Block 3271 als Superblock ausgeschlossen 8)

Post Reply