OK I forgot to add: you can now mount the filesystem using mount. Since in my case its saves as an image, I had to use loopback.
# mount -t etx3 -o loop /mnt/new/rescued /mnt/disk On Sun, Jan 8, 2012 at 2:02 AM, Debasish Ray Chawdhuri < [email protected]> wrote: > Sure! > > Most tools would not work on a physically damaged partition, so the first > thing was to get an image of the filesystem on a good device. I used > ddrescue for that > (The # character is not a part of the command) > > # ddrescue /dev/sdc1 /mnt/new/rescued out.log > > it will try to get most of the data. you can also stop it and start it > from the point you left it just by using the same log file. > > Once you have the image, its just about running the fsck to repair your > file system. However my superblock got damaged which made it mandatory to > use a different superblock. The real challege is to find that because its > location depends on the block size. But if you have created the file system > without any special options, the default will have the locations as these > > Primary superblock at 0, Group descriptors at 1-7 > Backup superblock at 32768, Group descriptors at 32769-32775 > Backup superblock at 98304, Group descriptors at 98305-98311 > Backup superblock at 163840, Group descriptors at 163841-163847 > Backup superblock at 229376, Group descriptors at 229377-229383 > Backup superblock at 294912, Group descriptors at 294913-294919 > Backup superblock at 819200, Group descriptors at 819201-819207 > Backup superblock at 884736, Group descriptors at 884737-884743 > Backup superblock at 1605632, Group descriptors at 1605633-1605639 > Backup superblock at 2654208, Group descriptors at 2654209-2654215 > Backup superblock at 4096000, Group descriptors at 4096001-4096007 > Backup superblock at 7962624, Group descriptors at 7962625-7962631 > Backup superblock at 11239424, Group descriptors at 11239425-11239431 > Backup superblock at 20480000, Group descriptors at 20480001-20480007 > Backup superblock at 23887872, Group descriptors at 23887873-23887879 > > You can get this list by typing the following command on a working file > system with same block size. > > #dumpe2fs /dev/sda1 | grep superblock > > once you know this, its just about telling fsck to use this alternate > superblock > > #fsck.ext3 -y -b 4096000 /mnt/new/rescued > > That's it. > > On Sun, Jan 8, 2012 at 12:55 AM, Mohit Singh <[email protected]>wrote: > >> congrats :) >> >> As you share the screen dumps at the time of stating this problem, can >> you also display at least the summary of the solution process. This will >> help others to solve their similar issues too. >> >> MS >> >> >> >> -- >> Mailing list guidelines and other related articles: >> http://lug-iitd.org/Footer >> > > > > -- > Debasish Ray Chawdhuri > http://www.geekyarticles.com/ > [A collection of advanced articles on java] > > -- Debasish Ray Chawdhuri http://www.geekyarticles.com/ [A collection of advanced articles on java] -- Mailing list guidelines and other related articles: http://lug-iitd.org/Footer
