LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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



Reply
 
Search this Thread
Old 06-17-2009, 08:19 AM   #1
Indy452
Member
 
Registered: Jul 2008
Location: Kansan
Distribution: solydK
Posts: 78

Rep: Reputation: 16
Corrupt files on USB flash drive won't delete!!


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?

Thanks if you can help!!
 
Old 06-17-2009, 08:39 AM   #2
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
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.
 
Old 06-17-2009, 10:07 AM   #3
Steel_J
Member
 
Registered: Oct 2004
Location: Montreal, Canada
Distribution: Kubuntu 10.04, Mint 8 and Puppy 4.3.1
Posts: 355
Blog Entries: 1

Rep: Reputation: 31
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.

Last edited by Steel_J; 06-17-2009 at 10:09 AM.
 
Old 06-17-2009, 10:46 AM   #4
acunico
LQ Newbie
 
Registered: Jun 2009
Posts: 5

Rep: Reputation: 0
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 View Post
................
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"
.................
 
Old 06-17-2009, 03:15 PM   #5
Indy452
Member
 
Registered: Jul 2008
Location: Kansan
Distribution: solydK
Posts: 78

Original Poster
Rep: Reputation: 16
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?

Thanks!
 
Old 06-17-2009, 03:38 PM   #6
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
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

very good grub/ext3/usb install here
( http://natureheals.info/linux/tiny/instau.html )
this works Flawlessly dude;
very important notes....

1) dis-connect hd when using above method.

2) don't need to partition usb

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

seriously,
see this post, and if you have a suggestion I'd appreciate it
( http://www.linuxquestions.org/questi...d.php?t=733680 )

and some single-partition portable distro's
( http://multidistro.com/downloads/por...portables.html )
crazy right?
like a fox
need help, I'm around
 
Old 06-17-2009, 04:00 PM   #7
Indy452
Member
 
Registered: Jul 2008
Location: Kansan
Distribution: solydK
Posts: 78

Original Poster
Rep: Reputation: 16
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.


Thanks again.
 
Old 06-17-2009, 04:02 PM   #8
alinas
Member
 
Registered: Apr 2002
Location: UK, Sywell, EGBK
Distribution: RHEL, SuSE, CentOS, Debian, Ubuntu
Posts: 60

Rep: Reputation: 20
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...
 
Old 06-17-2009, 06:58 PM   #9
Steel_J
Member
 
Registered: Oct 2004
Location: Montreal, Canada
Distribution: Kubuntu 10.04, Mint 8 and Puppy 4.3.1
Posts: 355
Blog Entries: 1

Rep: Reputation: 31
It is safe to use any filesystem you may want to try. You can always reformat later to wathever you like.

Your jump drive will work perfectly in ext3, but only on UNIX systems. Microsoft does not support filesystems other than fat16-fat32 and ntfs.

Linux on the other hand supports fat and ntfs.

For a jump drive fat32 is the way to go. It gives you total compatibility across platforms and different systems.

If you intend to use your drive only on UNIX machines, then ext3 will do just fine. It is a personal choice.
 
Old 06-17-2009, 07:07 PM   #10
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
Actually, there is a windows app that will allow you to read/write linux filesystems
( http://www.fs-driver.org/ )
( http://www.fs-driver.org/faq.html )

however, I have no idea whether it works and there seem to be restrictions.
 
Old 06-19-2009, 06:17 AM   #11
Steel_J
Member
 
Registered: Oct 2004
Location: Montreal, Canada
Distribution: Kubuntu 10.04, Mint 8 and Puppy 4.3.1
Posts: 355
Blog Entries: 1

Rep: Reputation: 31
...And most of the times losing the data on these little thing can be disastrous, hahaha! So I would stick to the basics.
 
Old 04-29-2010, 03:15 AM   #12
Deepdp
LQ Newbie
 
Registered: Apr 2010
Posts: 2

Rep: Reputation: 0
<Spam removed>

Last edited by XavierP; 04-29-2010 at 09:35 AM.
 
Old 04-29-2010, 03:35 AM   #13
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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.
 
Old 04-29-2010, 09:03 AM   #14
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Deepdp the spambot has been reported.

As for the corrupted USB drive, be weary that if it does this it may be failing, don't store important info on it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete a ISOFS partition from an USB flash drive scrat75 Linux - Software 3 09-23-2008 03:33 PM
how to access files in USb flash drive riba43 Suse/Novell 4 07-09-2007 04:34 AM
cannot delete drive from root desktop - cannot mount usb flash drive - openSuSE 10.2 bluecog6 Linux - General 6 01-29-2007 04:18 PM
Cannot mount USB Flash Drive, 4 device files Hakala Linux - Software 1 04-01-2006 01:20 PM
Having trouble with DSL File Management: USB flash drive files zubalove DamnSmallLinux 2 08-19-2005 10:01 PM


All times are GMT -5. The time now is 08:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration