Declan Moriarty wrote:
> Windows XP seems to take the biscuit for messing things up. Latest is a
> usb disk/mp3 player - a poor kid's ipod. It has a gig, a lcd screen,
> will record, store mp3s and play. Windows apparently overwrote the early
> directories. I have heard bad things about formatting these, as you lose
>> It shows
> [dec at genius ~]$ df /media/usbdisk
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/sda 1000032 210928 789104 22% /media/usbdisk
>> [dec at genius ~]$ ls -la /media/usbdisk
> total 24
> drwxr-xr-x 2 root root 16384 Jan 1 1970 .
> drwxr-xr-x 5 root root 4096 May 5 13:20 ..
>> but I can't put a file, or make a directory on it.
as root? or as a normal user?
> Megs WAS used. The data is irrelevant - the owner just wants a gig to
> write more tripe into then listen to it. I did pull down a filegig back
> (the first 250 Megs) and found it mainly zeroes.
You could try dosfsck from dosfstools, but if it's mainly zeros it might be
gone (though not necessarily). You could also go in and have a look by
yourself too, by running 'hexedit /dev/sda' if you have it installed. There
are some decent webpages with the various offsets used in FAT12|16|32,
google them. Don't use the wikipedia page though, it's missing lots of info
and doesn't contain the correct FAT32 offsets.
> Now dd will probably fill it with what he wants along these lines
> dd if=somefile of=/dev/sda etc. but that also is a fairly neuclear
> option. I do have 250 Meg versions (earlier/similar models). But I don't
> want it to end up thinking it's only 250Megs
If the data isn't important, run fdisk and delete all partitions, add a new
one, change type to fat32, quit, 'mkfs.vfat -F 32 /dev/sda1', although some
mp3 players don't like it if the whole partition isn't used (i.e. they
won't find the music), in which case forget about fdisk and just run
'mkfs.vfat -F 32 /dev/sda'
The fun thing about sticking partitions on it is that you can make it
bootable, I have one which dualboots into freeDOS or Damn Small Linux. The
DOS boot is useful for BIOS updates that need Windows/DOS to be installed,
and the linux one is just handy for when I trash my machine..
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!