Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
I have an external USB hard disk, partitioned in NTFS and Ext4, but when I try to copy off some areas of the ext4 part, the hard disk just stops reading properly and I get I/O errors. I ran badblocks, and it found a ton of bad sectors on the ext4 partition... and a few on the NTFS as well. What is the best way to fix this? Is there any way to recover the data on the corrupted portion? Thanks!
Thanks, I'll look into it! It looks like a data recovery thing, but once I recovered the data and want to reuse the hard disk, how do I fix or block the bad sectors?
You simply don't. If you have a massive amount of bad blocks that means the disk is dying, you will get more and more bad blocks on it. Backup/recover all you can, then replace the disk. Using it any further is of no use at all, you will loose data.
SpinRite will mark the sectors as bad and remove them from use. But as stated above if there are a lot of them I would only use the disk as a secondary or temporary use disk as it is likely to be dying.
I agree with TobiSGD, the drive will die very soon.
Spinrite is not a good solution, IMO. Yeah, it will mark bad sectors, and then you may believe that the drive is ok, but it will fail suddenly and Spinrite won't be able to help.
What I would do is I would either get all the important data off ASAP, or I would image the drive to a larger drive if you have a lot of important data on it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.