FreeBSD7 - USB Drive with important data: Bad Superblock
*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu Ibex32/64 | FreeNAS on fBSD7 | Linpus Linux on Fedora8
Posts: 14
Rep:
FreeBSD7 - USB Drive with important data: Bad Superblock
I am having trouble with an USB HDD whose Superblock has corrupted. The drive contains extremely inreplacable data so formatting/writing FileSystem again is out of question. Drive is formatted with UFS (GPT+Soft Updates).
The drive is mountable and readable but very slow. The drive is not mounted now tho to avoid loss of data.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
If reading the driver is very slow, then there's a good chance the physical media is damaged in some way. Backup all the information on it ASAP. You should mount it read-only (-r) to minimize the possibility of further corruption.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
A quick Google search brought up this, but I'm not certain it will work the same with your FS. You should try to make a copy of the disk image with dd first before attempting to recover the superblock.
This will supposedly copy an alternative superblock to the standard location:
Might be time to revisit your approach. When starting a thread it's usually a good idea to post a) what it is you're doing/trying to do; b) the error messages you're seeing (not your interpretation of them); and c) exactly what your question is.
Quote:
Originally Posted by rautamiekka
"Howto repair the Superblock ?"
This is silly. Is the data valuable? Or is the drive valuable? From your first post it sounds like the data is what you really care about. So take an image of it, as was already suggested.
If you're feeling like a gambler, you can run fsck against the drive (which will attempt to locate an alternate superblock).
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
fsck will locate an alternative superblock, but apparently the FreeBSD version of fsck no longer copies that superblock to the main one, so you have to run the dd command that I posted in order to perform that last step... at least, that was the information I collected via Google.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.