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.
Is it possible that a USB pen drive can become unusable?
Yes, they have a life.
You can try fdisk, its command line, but not difficult to use. Try deleting the partition table. If that is corrupt, that could be the problem. See 'man fdisk' or google it. There are lots of examples of the command syntax.
If you can delete it, re-create a new partition table, and then try to format it. Formatting does not fix partition tables.
This command does not look correct. You format a partition, not the whole device. The command should look like 'sudo mkfs.vfat /dev/sdf1 -I' if its the first partition on the USB stick.
Does it mount? What error messages are you getting?
These things can fail. It's usually mechanical, I'm told. If the plug is able to flex as you push it in and pull it out, eventually the connections between that and the board can break.
I should have added that all this happened after I tried to slow erase the pen drive in gnome-disk-utilty (I'd already done the same on a few pen drives already without issue). I think the erase hung and I forced quit the program.
Attached is the current image of it in gnome-disk-utility -- although there seems to be a /dev/sdf1 also according to gparted and the terminal.
Yes, it mounts and the files are there but they are no openable - I suppose due to partial formating before?
When I right click in Caja file manager and select 'Safely remove' -- I get this error message when pulling the pen drive out of the USB port.
"Unable to stop Kingston DataTraveler 2.0
Error opening /dev/sdf: No such file or directory"
I get no error is I select 'eject' in Caja.
Last edited by linustalman; 05-09-2016 at 12:37 PM.
First thing I would try, delete all partitions on the pen drive using gparted. Then create a new partition on the pen drive and format using gparted. Your partition table is probably messed up. You attempted to format sdf instead of sdf1 which would have put a file system on the raw block device, sdf,instead of on the existing partition, sdf1. By deleting all existing partitions on the pen drive and starting over with a new partition and format, you can probably fix things.
If that doesn't work, you can try zero filling the entire drive with:
Code:
sudo dd if=/dev/zero of=/dev/sdx
where you should replace "sdx" with the appropriate device file for your pen drive. It appears to be "sdf" from your prior posts but make doubly sure you have the right device file. After doing this you will have to repartition and format the drive.
Did you try to create ntfs or ext filesystem?
Did you try to erase partition table and re-create it and create new partition?
Check pen drive for bad blocks with badblocks utility. If you have Windows installed there are HDDScan utility for Windows that has a nice GUI, can test (read/write/verify) the drive.
It may be that the maker of the device has some software that may recover it. It is possible that others software may work too. HP used to have a program that fixed a few. Might even try just putting syslinux on it. That has fixed one of mine before.
First thing I would try, delete all partitions on the pen drive using gparted. Then create a new partition on the pen drive and format using gparted. Your partition table is probably messed up. You attempted to format sdf instead of sdf1 which would have put a file system on the raw block device, sdf,instead of on the existing partition, sdf1. By deleting all existing partitions on the pen drive and starting over with a new partition and format, you can probably fix things.
If that doesn't work, you can try zero filling the entire drive with:
Code:
sudo dd if=/dev/zero of=/dev/sdx
where you should replace "sdx" with the appropriate device file for your pen drive. It appears to be "sdf" from your prior posts but make doubly sure you have the right device file. After doing this you will have to repartition and format the drive.
Hi kilgoretrout.
Whenever I try gparted, it hangs when I try to do anything with the USB drive. It changed from sdb to sdf -- I was selecting the correct drive alright. I tried the dd commands but it also just hangs.
Did you try to create ntfs or ext filesystem?
Did you try to erase partition table and re-create it and create new partition?
Check pen drive for bad blocks with badblocks utility. If you have Windows installed there are HDDScan utility for Windows that has a nice GUI, can test (read/write/verify) the drive.
Hi Teufel.
It was FAT32.
I tried HDDScan to erase the drive but it did nothing.
I tried with: sudo badblocks -v /dev/sdf -- but it hangs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.