bad superblock – not a cool new band
Posted on November 11, 2010
Being an amateur sys admin when you should really hire a professional one is a constant source of new learnings.
Today, I learnt that hard drives can, like a manic teenager decide one day that they are now self-identifying as a bad superblock and will not be performing any of the tasks previously expected of them (like booting) and they’re keeping all your data as well.
What is a bad superblock? Wikipedia has it’s suggestions, my artists impression is above.
Can bad superblocks be made good again?….Is there hope for humanity?….
Kept you in suspense for a whole click….Yes!
Google is amazing as open source software communities – what a happy marriage.
The three posts that helped saved my ass today:
- https://help.ubuntu.com/community/DataRecovery
- http://www.howtogeek.com/howto/15761/recover-data-like-a-forensics-expert-using-an-ubuntu-live-cd/
- http://linuxexpresso.wordpress.com/2010/03/31/repair-a-broken-ext4-superblock-in-ubuntu/
Here’s how it went, after some futile messing around.
To figure out which of the many things in /dev/ was actually the one I wanted
sudo testdisk
Short-term borrowed a TB hard drive and to generate a recovered image:
sudo ddrescue -r 3 sda1 /media/extdrive/image /media/extdrive/logfile
Went to sleep waiting for the recovered image of my corrupted hard drive was formed that I should be able to recover data from….woke up….realized that like an idiot i hadn’t mounted my external hard drive and so the image was being made on my local hard disk and the disk ran out of space….groan. Â Mounted the external hard drive and copied the image to the external drive. Â Copying ~450GB takes 5.5 hours, but it did it. Â Copied the log file too….repeated the above command….miracle it just picked up where it left off – hurrah.
So now I have an image of the recovered drive that I should be able to recover files from.
Instead of trying this, first I’m going to try recovering the hard disk now I have a backup image.
—-
Other things that were useful today (mostly for my reference)
- UFW Firewall – Community Ubuntu Documentation
- You can’t downgrade distros on Ubuntu (apparently – happy to be corrected)
- https://help.ubuntu.com/10.04/serverguide/C/network-configuration.html
- https://help.ubuntu.com/community/LucidUpgrades#Network Upgrade for Ubuntu Servers (Recommended)