Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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 a Kingston 8GB flash drive that I backed up some of my pictures on while I was on vacation and although I was able to retrieve 95% of them there are about a dozen or so that must be corrupt or something and I am unable to remove/delete them. I use xubuntu as an os and I'm wondering what can be done to clean these remaining files out? When I go to delete them the computer freezes and I have to crash the computer and start over only to do the same thing.
Can a flash drive be formatted with a utility like parted magic or similar? If so what are some simple instructions because I've never done something like that on a flash drive. All my other flash drives work flawlessly and perhaps this Kingston flash is junk?
OK, if the stuff on 8gb usb is trash, try reformatting it using Gparted
simply open gparted on usb with, as root
"sudo su"
"gparted /dev/sdxx"
where xx is usb name; sdb1, sda1, sdf1, etc
make sure of usb name, use fdisk -l as root
assuming the format is fat32?
so, just re-format fat32.
right-click on line displaying usb in gparted and choose format, to fat32.
then, if you want run a check by again right-clicking line, choose "check"
also, before doing all that; make sure you have "show hidden files" enabled
in file manager.
if you see a folder like .trash-100 or similar delete it.
Treat any usb flash drive as any other usb external drive...gParted..qtParted or any partionner software will do....If you have problems within your distro, I suggest you dowload and burn gParted live-cd and then boot from it to do your tasks...It is a Linux system with gParted and a few utility in full GUI that will run from the CD-Rom and load in RAM..It is very handy and I always prefer doing disk operations when all my drives are not being mounted or used by the OS.
linus72, just a question: suppose formatting solve the problem, would it possible to recover remaining not backupped files?
Thanks
ac
Quote:
Originally Posted by linus72
................
assuming the format is fat32?
so, just re-format fat32.
right-click on line displaying usb in gparted and choose format, to fat32.
then, if you want run a check by again right-clicking line, choose "check"
.................
Thanks. So what if I used parted magic and reformatted it to ext3 filesystem? Will that work?
I managed to remove the files by opening and simply deleting them using w/xp. (go figure) But when I ran parted magic I noticed that the flash drive is formatted in Fat32. Since I use it with my Linux machines should I reformat it to ext3?
OK, I don't really know much about data recovery, though there are Pro's here, so maybe
start a new post with "how to recover data from corrupted usb"
or something like that...I do know that programs like testdisk, photorec are good
systemrescuecd, pmagic and similar all have them probably.
I don't know if you can recover files after formatting..
Oh,
Quote:
Since I use it with my Linux machines should I reformat it to ext3?
I have 2 usb's, a 2gb and a 4gb kingston data travelers.
no problems with either.
2GB is formatted fat32, whole device
4gb is formatted ext3, whole device
3) using grub, even pc's that can't boot from usb
can boot using plop bootmanager or a grub.iso(most pc's)
also, never put a swap parttion on usb, it's bad
other things bad for usb-
full installs, eg slack, debian, etc
constant re-writes
using options like home=sdxx opt=sdxx etc
again, lots of writes
best to use frugal distro's
dsl
tinycore
puppy
slax
I have 7 distro's on ext3 4gb usb now
tinycore-2.0
webserverpuppy-1
grml-medium-2009
netbootcd-3.0
clonezilla-liveusb
zoros-3.4
and Mini-Pentoo-2006
they all run good too, some with persistence.
you wanna experiment with playing with pmagic, clonezilla
and data recovery tools?
you need portable-qemu and install some shit and hack it down, then try to
fix it
I'm not trying to recover any data. I was wanting to totally delete it (which I've done now)
I just want to know if its safe to reformat a flash from Fat32 to Ext3 file system? I can leave it Fat32 for all I care but I just thought since I use Linux based distros 95% of the time I would use ext3 or 4 probably 3.
Indy452, yes, you can format you drive with ext3 - just use mk3fs /dev/sdb (or whatever your device with USB stick is). However, I would still use vfat filesystem type (in which case use mkfs -f vfat /dev/sdb).
Point is: linux can read (and write) any contemporary Microsoft filesystem, but Microsoft can not read ext3. By formatting your USB stick with vfat, you cast a wider net...
If you need to recover files from a thumbdrive, I would recommend cloning the device as a first step. Run any recovery software (such as photorec) on a copy of your image file so you can start over. Do this before reformatting.
It is also possible that the device is going bad. You might want to keep a close eye on it. If the errors you received were I/O errors, the device may be bad. If it was due to a corrupt filesystem, then you may be OK to continue using the device. It could be simply a case where the thumbdrive was removed before cached writes were written to the device.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.