[SOLVED] USB mini hard drive - mounting and access problems
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.
USB mini hard drive - mounting and access problems
A few years ago I bought a small 8GB Maxell USB external hard drive. It's about the size of a packet of Tic Tacs. I've got it formatted into two partitions - one is FAT16 and the other FAT32. I've got a small amount of Windows files in the FAT16 partition and some backup files from my Linux system in the other. However, I want to reformat the whole drive into one partition and start again.
I am having trouble accessing the files some of the time, hence my decision to reformat.
However, I thought I would reformat into one partition using GParted, but whenever I try and unmount both partitions, it starts trying to search the partitions of that device, and that's all it does. It's like it has "hung" in some way.
I assume there is a way to wipe/reformat the drive using the shell; but when I Google this, the instructions all seem to be about formatting a new drive. Surely I should be able to accomplish this in GParted? Even if the drive is slightly corrupted (which could be one reason?)
If the controller circuit inside the device is failing then it may not be possible to repartition it. Use the system logs to see if Linux shows any errors when you plug the device into the computer.
Code:
dmesg
If you see errors associated with the device then you probably should copy the files off of the device and then discard the device. You may want to use shred on the two partitions before you discard the device. Shred will overwrite the files with random numbers.
Last edited by stress_junkie; 11-12-2010 at 06:02 AM.
In brief: if you're on a laptop (especially an older one), try the hard disk on a desktop machine or newer laptop, to rule out problems related to inadequate power supplied from the laptop's USB ports. I've got a USB HDD too, that works fine on my desktop, but is very hit-or-miss on the laptops we have here, usually not working. OP in that other thread experienced same thing.
Anyhow, if the contents are important, probably very good idea to do what you can to get the data off onto another device ASAP, especially if this has never happened before. Act now - investigate more later.
You can try to delete the two partitions and create one whole one from command line using cfdisk as root user. Make sure your external hard drive is not mounted.
# cfdisk /dev/sdX (X = a, b, etc.)
or try fdisk if cfdisk does not work
# fdisk /dev/sdX
Thank you all for your helpful replies. Using a combination of cfdisk and GParted, I have now successfully formatted the drive to just under 8Gb of FAT32 space, and copied some files onto it. It seems fine now.
I was using it as a backup drive anyway so there was no important data on there to lose. I don't know whether it was a combination of trying to use FAT16 on the smaller partition and FAT32 on the larger one that the system did not like. However it is all FAT32 now and working okay.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.