_R2D2 Posted February 14, 2005 Share Posted February 14, 2005 To make a long story short. I have one ext2 drive with a corrupt superblock (trusted partition magic too much :angry:). I have another ext2 drive with linux on, as well as a ntfs drive with Windows. But I have some really important data on the corrupt drive. fdisk -l Disk /dev/hda: 120.0 GB, 120000000000 bytes 255 heads, 63 sectors/track, 14589 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 1 4 32098+ de Dell Utility /dev/hda2 * 5 12497 100350022+ 7 HPFS/NTFS /dev/hda3 12498 14589 16803990 f W95 Ext'd (LBA) /dev/hda5 12498 13060 4522266 83 Linux /dev/hda6 13061 14334 10233373+ 83 Linux /dev/hda7 14335 14398 514048+ 82 Linux swap /dev/hda8 14399 14589 1534176 b W95 FAT32 mount /dev/hda6 /media/hda6 -t ext2 mount: wrong fs type, bad option, bad superblock on /dev/hda6, or too many mounted file systems e2fsck -b 8193 /dev/hda6 e2fsck 1.35 (28-Feb-2004) e2fsck: Bad magic number in super-block while trying to open /dev/hda6 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> Please help! And...don't leave any sarcastic comments :whistle:. Link to comment https://www.neowin.net/forum/topic/285232-superblock-problem/ Share on other sites More sharing options...
MrA Posted February 15, 2005 Share Posted February 15, 2005 You could try a mke2fs -S on that partition which will rebuild the superblock. This may be a bit dangerous. Or, you could do a mke2fs -n on the drive which will display what the program would do if it created a new filesystem, but it doesn't write anything to disk. This would tell you the most likely place that the superblock backups are stored (yes, there are multiple copies of the superblock on an ext2/3 partition). You can use this info to then do a e2fsck -b <location of superblock backup> Link to comment https://www.neowin.net/forum/topic/285232-superblock-problem/#findComment-585472391 Share on other sites More sharing options...
_R2D2 Posted February 15, 2005 Author Share Posted February 15, 2005 mke2fs 1.35 (28-Feb-2004) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 1281696 inodes, 2558343 blocks 127917 blocks (5.00%) reserved for the super user First data block=0 79 block groups 32768 blocks per group, 32768 fragments per group 16224 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 So...what do I do to restore a backup superblock now? Link to comment https://www.neowin.net/forum/topic/285232-superblock-problem/#findComment-585474053 Share on other sites More sharing options...
MrA Posted February 15, 2005 Share Posted February 15, 2005 Now do an e2fsck -b <block number> with each number in the superblocks backup list. One of them might work. i.e. e2fsck -b 32768 e2fsck -b 98304 and so on. Link to comment https://www.neowin.net/forum/topic/285232-superblock-problem/#findComment-585475123 Share on other sites More sharing options...
_R2D2 Posted February 15, 2005 Author Share Posted February 15, 2005 e2fsck -b 32768 /dev/hda6 e2fsck 1.35 (28-Feb-2004) e2fsck: Bad magic number in super-block while trying to open /dev/hda6 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> Link to comment https://www.neowin.net/forum/topic/285232-superblock-problem/#findComment-585475930 Share on other sites More sharing options...
phate Posted February 15, 2005 Share Posted February 15, 2005 I had/have a problem that my cd drive doesnt work because it cant read superblock. dunnop Link to comment https://www.neowin.net/forum/topic/285232-superblock-problem/#findComment-585475943 Share on other sites More sharing options...
_R2D2 Posted February 17, 2005 Author Share Posted February 17, 2005 When I run e2fsck -n /dev/hda6 gives me lots of errors, for example. Inode 545 was part of the orphaned inode list. IGNORED. Deleted inode 546 has zero dtime. Fix? no Deleted inode 547 has zero dtime. Fix? no Deleted inode 548 has zero dtime. Fix? no Inode 549 has imagic flag set. Clear? no Inode 550 is in use, but has dtime set. Fix? no Inode 550 has imagic flag set. Clear? no Inode 550 has compression flag set on filesystem without compression support. Clear? no Inode 550 has INDEX_FL flag set but is not a directory. Clear HTree index? no Illegal block #0 (4261413117) in inode 597. IGNORED. Illegal block #1 (16580671) in inode 597. IGNORED. Illegal block #2 (4193792) in inode 597. IGNORED. Illegal block #3 (4261413117) in inode 597. IGNORED. Illegal block #4 (16580671) in inode 597. IGNORED. Illegal block #5 (4193792) in inode 597. IGNORED. Illegal block #6 (4261413117) in inode 597. IGNORED. Illegal block #7 (16580671) in inode 597. IGNORED. Illegal block #8 (4193792) in inode 597. IGNORED. Illegal block #9 (4261413117) in inode 597. IGNORED. Illegal block #10 (16580671) in inode 597. IGNORED. If I run e2fsck on the selected device, will this fix my problem? This won't format or remove anything..right? Please help, as I have really important data on the disk. Link to comment https://www.neowin.net/forum/topic/285232-superblock-problem/#findComment-585488494 Share on other sites More sharing options...
_R2D2 Posted February 17, 2005 Author Share Posted February 17, 2005 dumpe2fs to a text file give me the following: Filesystem volume name: <none> Last mounted on: <not available> Filesystem UUID: d6700100-510d-450f-9936-2268e4685f49 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: filetype sparse_super Default mount options: (none) Filesystem state: clean with errors Errors behavior: Continue Filesystem OS type: Linux Inode count: 1281696 Block count: 2558343 Reserved block count: 127917 Free blocks: 2518114 Free inodes: 1281696 First block: 0 Block size: 4096 Fragment size: 4096 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 16224 Inode blocks per group: 507 Filesystem created: Thu Feb 17 20:12:46 2005 Last mount time: n/a Last write time: Thu Feb 17 20:12:46 2005 Mount count: 0 Maximum mount count: 30 Last checked: Thu Feb 17 20:12:46 2005 Check interval: 15552000 (6 months) Next check after: Tue Aug 16 21:12:46 2005 Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 128 Default directory hash: tea Directory Hash Seed: afff1a91-eb12-42fe-b094-98480e5e5b27 and then lots of numbers, if it would help, I will uplaod it somewhere. but the text-file is 10 mb. Link to comment https://www.neowin.net/forum/topic/285232-superblock-problem/#findComment-585488852 Share on other sites More sharing options...
_R2D2 Posted February 17, 2005 Author Share Posted February 17, 2005 Now I can actually mount it, but it shows no files. Does this mean that it is gone? Link to comment https://www.neowin.net/forum/topic/285232-superblock-problem/#findComment-585489468 Share on other sites More sharing options...
Recommended Posts