LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Any "Tools" for a Thumb Drive Like There is For SSD Drives? (https://www.linuxquestions.org/questions/linux-software-2/any-tools-for-a-thumb-drive-like-there-is-for-ssd-drives-4175608052/)

happydog500 06-16-2017 09:14 PM

Any "Tools" for a Thumb Drive Like There is For SSD Drives?
 
Most SSD manufactures have software "Tools". This way, to wipe or fix a drive, you can use the software to "charge" (whatever you call it) the drive. That puts it more to what it was new.

I have a newer Kingston USB Thumb Drive that doesn't work. I did get it to work on my friends Apple. We formated it, went through a scan to fix errors, almost all the way through, it stopped, pop up said it found an error and can't continue.

Is there a program that can do, not just a format, but what "Tools" does for SSD's, for a USB? Kingston doesn't have it, but is there a generic one?

Thank you,
Chris.

KenJackson 06-16-2017 11:48 PM

USB drives almost always come formated with a FAT filesystem, like MS-DOS. You may want to stick with that because all operating systems recognize and work with it.

Assuming you're on a Linux machine now, you have to figure out which device name is assigned to it when you plug it into a USB slot. This command, done immediately after plugging it in, will tell you:
Code:

dmesg | tail
The answer will probably be /dev/sdb or /dev/sdc, etc.
If it was automatically mounted, umount it (substitute the actual drive for "X"):
Code:

umount /dev/sdX
or
umount /dev/sdX1

You can try to fix it without starting over with this
Code:

sudo fsck.vfat /dev/sdX
or
sudo fsck.vfat /dev/sdX1

If that doesn't work, You can reformat it with this. The -I switch puts one filesystem on the whole drive without a partition table. (If it doesn't work, or you want a partion table, use "sudo fdisk /dev/sdX" to modify the partion table.)
Code:

sudo mkfs.vfat -I /dev/sdX

happydog500 06-17-2017 12:20 AM

Didn't get what you got;

Code:

dmesg | tail
[    9.185379] <6>[fglrx] Reserved FB block: Shared offset:0, size:1000000
[    9.185385] <6>[fglrx] Reserved FB block: Unshared offset:fab4000, size:4000
[    9.185387] <6>[fglrx] Reserved FB block: Unshared offset:fab8000, size:548000
[    9.185389] <6>[fglrx] Reserved FB block: Unshared offset:1fff3000, size:d000
[    9.190973] init: plymouth-stop pre-start process (1448) terminated with status 1
[    9.524431] floppy0: no floppy controllers found
[    9.524455] work still pending
[    9.755728] r8169 0000:01:00.0 eth0: link up
[    9.755743] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  11.089178] nf_conntrack: automatic helper assignment is deprecated and it will be removed soon. Use the iptables CT target to attach helpers instead.


KenJackson 06-17-2017 05:13 AM

If you disconnect the thumb drive (umount first if it's mounted), wait several seconds, plug it in and then immediately run dmesg, you should see something like this.
In this case, the device is: /dev/sdf
Code:

[316296.315259] usb-storage 1-6:1.0: USB Mass Storage device detected
[316296.315631] scsi host7: usb-storage 1-6:1.0
[316297.339223] scsi 7:0:0:0: Direct-Access    SanDisk  Cruzer          1.26 PQ: 0 ANSI: 5
[316297.340122] sd 7:0:0:0: Attached scsi generic sg6 type 0
[316297.341297] sd 7:0:0:0: [sdf] 125031680 512-byte logical blocks: (64.0 GB/59.6 GiB)
[316297.342874] sd 7:0:0:0: [sdf] Write Protect is off
[316297.342877] sd 7:0:0:0: [sdf] Mode Sense: 43 00 00 00
[316297.343919] sd 7:0:0:0: [sdf] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[316297.355794]  sdf: sdf1
[316297.359666] sd 7:0:0:0: [sdf] Attached SCSI removable disk

Alternately, there are commands that show all block devices. You could run one of them before and after plugging it in and see what was added. These commands (both in the util-linux package) include:
Code:

sudo lsblk
sudo blkid


Habitual 06-17-2017 07:45 AM

I had a USB drive that loaded up and mounted a hidden partition off of /dev/sr1
Hidden utility with vendor tools.

As long as it was fat*/ntfs* it showed up. I don't remember testing ext4 on it.

Just sayin'

happydog500 06-17-2017 04:12 PM

Can't mount or unmount, isn't recignized at all. I did try what was suggested, got a pop up saying;

Code:

Error mounting /dev/sdc1 at /media/roger/KINGSTON: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sdc1" "/media/roger/KINGSTON"' exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'
The pop up was not in the terminal, but it popped up after I entered the text. This is the first time in a long time I got anything from Linux in regards to this drive.


Thank you,

Chris.

happydog500 06-17-2017 04:17 PM

For the first time I saw it in my computer, the list on the left when I went to files in Linux. I clicked on it and got the pop up agian. I Got this when I tried it again.

Code:

dmesg | tail
[  557.328688] sd 6:0:0:0: [sdc] No Caching mode page found
[  557.328695] sd 6:0:0:0: [sdc] Assuming drive cache: write through
[  557.347850]  sdc: sdc1
[  557.352719] sd 6:0:0:0: [sdc] Attached SCSI removable disk
[  815.628667] usb 2-3: USB disconnect, device number 2
[  826.624156] usb usb5-port3: Cannot enable. Maybe the USB cable is bad?
[  827.617018] usb usb5-port3: Cannot enable. Maybe the USB cable is bad?
[  828.609918] usb usb5-port3: Cannot enable. Maybe the USB cable is bad?
[  829.602824] usb usb5-port3: Cannot enable. Maybe the USB cable is bad?
[  829.602857] usb usb5-port3: unable to enumerate USB device


happydog500 06-17-2017 04:27 PM

Here I did it again. Not sure what I got back, so I did the next command.

Code:

umount /dev/sdc1
umount: /dev/sdc1 is not mounted (according to mtab)
@Linux ~ $ sudo fsck.vfat /dev/sdc1
[sudo] password:
fsck.fat 3.0.26 (2014-03-07)
Logical sector size is zero.
@Linux ~ $ sudo mkfs.vfat -I /dev/sdc
mkfs.fat 3.0.26 (2014-03-07)
@Linux ~ $

It shows up in my computer on the left after I do the commands, but when I click on it, the "Unable to mount KINGSTON pop up comes up."

michaelk 06-17-2017 04:35 PM

It looks like you have multiple problems.

How USB drives are formatted depends on the manufacture but typically <32GB is FAT32 and >32GB is exFAT or NTFS.

Quote:

unknown filesystem type 'exfat'
Your system does not recognize exfat and you need to install exfat-fuse and exfat-utils.

Quote:

unable to enumerate USB device
Is it a USB 3 device? Are you plugging it into a USB 2 or 3 port? Could be a USB 3 problem or your drive is flaky.

PS: Since you reformatted as FAT32 it could be a USB problem. However not sure it actually formatted successfully.

rknichols 06-17-2017 04:36 PM

Please don't use "Quote" tags except for material from other postings. It makes it hard to quote your material in a reply.

Quote:

Originally Posted by happydog500 (Post 5723868)
Error mounting /dev/sdc1 at /media/roger/KINGSTON: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sdc1" "/media/roger/KINGSTON"' exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'

Your system does not have support for the exfat filesystem you specified. For that support you need to install packages like "exfat-fuse" and "exfat-utils". Searching for "exfat" in your distro's repositories should find them, if available.

!!! 06-17-2017 05:00 PM

Code:

Error mounting /dev/sdc1 at /media/roger/KINGSTON: Command-line
`mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sdc1" "/media/roger/KINGSTON"'
exited with non-zero exit status 32: mount: unknown filesystem type 'exfat'

@OP, just fyi, if you want to go back and edit #6, replacing the tag words QUOTE with the tag words CODE, you will get the above (tho I added a couple newlines, for extra clarity)

happydog500 06-17-2017 05:07 PM

Quote:

Originally Posted by rknichols (Post 5723878)
Please don't use "Quote" tags except for material from other postings. It makes it hard to quote your material in a reply.

Your system does not have support for the exfat filesystem you specified. For that support you need to install packages like "exfat-fuse" and "exfat-utils". Searching for "exfat" in your distro's repositories should find them, if available.

FAT32 would be OK. I don't need it to stay exfat. This is a USB 3 in a USB 2 system. Said it was backwards compatible. I just want it to work. What do I need to do to make it fat32?

Chris.

happydog500 06-17-2017 05:14 PM

Quote:

Originally Posted by michaelk (Post 5723877)
It looks like you have multiple problems.

How USB drives are formatted depends on the manufacture but typically <32GB is FAT32 and >32GB is exFAT or NTFS.


Your system does not recognize exfat and you need to install exfat-fuse and exfat-utils.


Is it a USB 3 device? Are you plugging it into a USB 2 or 3 port? Could be a USB 3 problem or your drive is flaky.

PS: Since you reformatted as FAT32 it could be a USB problem. However not sure it actually formatted successfully.

Installed exfat-fuse and exfat-utils and doesn't recognize it at all.

happydog500 06-17-2017 05:17 PM

Did dmesg | tail and got this;

Code:

dmesg | tail
[ 2717.906929] sd 8:0:0:0: [sdd] Mode Sense: 43 00 00 00
[ 2717.908730] sd 8:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 2717.921772]  sdd: sdd1
[ 2717.925476] sd 8:0:0:0: [sdd] Attached SCSI removable disk
[ 2725.919023] nemo[2112]: segfault at 21 ip 00007f21e627c38a sp 00007ffde3a4b498 error 4 in libc-2.19.so[7f21e61e2000+1be000]
[ 2755.614526] usb 2-3: USB disconnect, device number 5
[ 4296.071252] FAT-fs (sdc1): bogus number of reserved sectors
[ 4296.071266] FAT-fs (sdc1): Can't find a valid FAT filesystem
[ 4304.467238] usb 2-5: USB disconnect, device number 4
[ 4392.878050] usb 2-5: new high-speed USB device number 6 using ehci-pci

Thank you very much for the replies,

Chris.

Shadow_7 06-21-2017 05:00 PM

Larger USB drives come zero formatted like most SSD / HHD drives do these days. There's not many special tools that I know of, but lots of "storage" tools that work on sticks as they do on drives. Things like sync, fstrim, mount, umount, dd, gpart, fdisk, blkid, and other things. When it's recognized with a driver (usb-storage) it'll announce itself in dmesg. And it'll show up in /proc/partitions. Otherwise it's just a storage device. As with most things USB, make sure it's not in use (might be automounted) when you remove it.


All times are GMT -5. The time now is 12:11 AM.