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.
This command zeroes out the MBR/partition table, not the entire drive which completes successfully.
Not enough information posted to know why your other dd command failed. Formatting is not usually done using dd except maybe if you are writing an image file.
See what happens when you create a partition table and partition using using your utility of choice i.e. fdisk, gparted etc.
Then format using:
mkfs.vfat -F 32 /dev/sdc1
Make sure you use the correct device ID otherwise you could loose the OS and your data. Formatting creates the file allocation tables but does not actually erase data from the partition. Check the output of the dmesg command for errors.
If that works you could try filling the drive with random data like below. Use the actual mount point. The command should quit with a no more room on device error.
dd if=/dev/random > /mnt/sdc1/dummy.file
Flash drives have a limited number of writes and do fail.
I have two corsair voyager usb 2.0. One of them runs hot, but they are otherwise reliable.
Your command executed as it is supposed to. It zeroed the MBR. You could try TestDisk to see if it can recover the remaining data. If you don't care about the data and just want to reformat, you first have to put a new msdos label on it.
Code:
fdisk /dev/sdb
Then create a new partition of type code "c". After you quit fdisk, you are ready to format the usb.
Code:
mkfs.vfat -n "CORSAIR" -F32 /dev/sdb1
Gparted can do the same thing.
Before you reformat, you could try mounting /dev/sdb1 to see if the old data are still there.
Using gparted (Device > Create Partition table) and trying to create new partition table (msdos) gives this output:
Code:
/dev/sdc: unrecognised disk label
Input/output error during write on /dev/sdc
gpartedbin: Fatal IO error 0 (Success) on X server :0.
Error fsyncing/closing /dev/sdc: Input/output error
(gpartedbin:3833): glibmm-ERROR **:
unhandled exception (type std::exception) in signal handler:
what: std::bad_alloc
Trace/breakpoint trap
I think this flash drive is heading for the wastebin unless there are other suggestions.
ZEROING the flash drive:
Normally when I repurpose a stick I will zero it out, then verify that it got zeroed. If it didn't then the stick isn't in a usable state anymore.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.