[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Deletion of files from usb-key



On Thu, Nov 08, 2007 at 11:34:40AM -0500, Haines Brown wrote:
 
> $ df /media/usb-key 
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/sdd1               499440    303916    195524  61% /media/usb-key
> 
 
> I agree that it seems to be file system corruption, but dosfsck didn't
> help. On unmounted device:
> 
> # dosfsck /dev/sdd
> dosfsck 2.11, 12 Mar 2005, FAT32, LFN
> Logical sector size is zero.

Again note that you used /dev/sdd not /dev/sdd1

> 
> > Use mkdosfs. Unless you assigned a drive letter to your flash drive, 
> > mformat is unlikely to work.
> 
> I tried mkdosfs on an unmounted device:
> 
> # mkdosfs -I /dev/sdd
> mkdosfs 2.11 (12 Mar 2005): 
> 

Ditto

> when I mounted it, the files remain. Hoever, for some reason my xterm
> displays them in green, while files are normally displayed in
> black. I can add and then delete a test file on the device, which also
> shows up green. 

You won't be able to remove files from /dev/hdd1 by doing things to
/dev/hdd.  You _will_ be able to corrupt the file system but it is FAT
so it could show up as an inability to remove files.

Try:

# dd if=/dev/zero of=/dev/hdd

this should zero the whole drive

then use cfdisk and create /dev/hdd1 with the whole space.

Then use mkdosfs on /dev/hdd1 not /dev/hdd.

Then mount /dev/hdd1 and see what's there.

Doug.



Reply to: