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.
I got a 2GB memory card to store music on for listening to in my car stereo. When I bought it, there were a load of junk files on there, some kind of maps of Europe or whatnot. Naturally enough I chucked them off and started filling the card with MP3s. When I got to 35% full, copying stopped, saying there was no space left on the device. In my file manager and bash there's over a Gig left, but yet I can't copy anything over. I thought there must be some hidden .trash folder but couldn't find one, so I formatted the card (to vfat) with mkfs and was then able to copy over as much as I liked.
However, the stereo was unable to read any files from the card. I deleted all but one file - same result.
So, I used my digital camera to format the card this time. The camera reckons there's 2 GB of space on there, as does the PC, but once again I can't copy more than about 700MB of data onto it before I run out of space.
That's what I did with mkfs, but as a result the card couldn't be read in the player. It's a bit Catch-22 unless I can find a solution that works for both the PC and player.
Can you format the card in the player? If not, you might have better luck using the mtools' mformat program.
To use mtools, you will need to add an entry to /etc/mtools.conf to map a device letter to a linux device.
First determine the device that the card uses. Then add a line like:
drive e: file="/dev/sdc1"
If the card is really bad off, you may need to delete the partition first and recreate it before formatting.
...so I formatted the card (to vfat) with mkfs and was then able to copy over as much as I liked.
However, the stereo was unable to read any files from the card. I deleted all but one file - same result.
Did you delete the original partition and create a new one before using mkfs?
Quote:
Naturally enough I chucked them off and started filling the card with MP3s. When I got to 35% full, copying stopped, saying there was no space left on the device.
What file/folder structure are you using when copying your mp3 files to the card? If you haven't used subfolders I think that'll solve your problem. As jschiwal suggests, try to format the card in the player, or the digital camera, then start copying some files again using subfolders. Start with just a few then try the card in the player to make sure it's working before copying any more files.
IIRC, memory cards and flash drives (mp3 players included) use FAT16 and not FAT32, and therefore are susceptible to FAT's not-well-documented limit for the root of the partition. The limit is 512 files/folders assuming the 8.3 naming convention. However, when using long names, every 13 characters takes up a file storage unit so it's easy to reach the limit with ~200 - 300 files. I've experienced this with a Memory Stick card, a Sansa m240 mp3 player and at least 2 different flash drives. Using subfolders at the root solves the problem because subfolders aren't affected by the limit.
Did you delete the original partition and create a new one before using mkfs?
No, actually. So in all likelihood the partition was still there, but with no files in it when I tried to read it in the player?
Quote:
What file/folder structure are you using when copying your mp3 files to the card? If you haven't used subfolders I think that'll solve your problem. As jschiwal suggests, try to format the card in the player, or the digital camera, then start copying some files again using subfolders. Start with just a few then try the card in the player to make sure it's working before copying any more files.
I started with a flat structure, then tried to make subdirs when the disk was apparently full (this is after reformatting with my camera), but I guess it was a little late for that then.
Quote:
IIRC, memory cards and flash drives (mp3 players included) use FAT16 and not FAT32, and therefore are susceptible to FAT's not-well-documented limit for the root of the partition. The limit is 512 files/folders assuming the 8.3 naming convention. However, when using long names, every 13 characters takes up a file storage unit so it's easy to reach the limit with ~200 - 300 files. I've experienced this with a Memory Stick card, a Sansa m240 mp3 player and at least 2 different flash drives. Using subfolders at the root solves the problem because subfolders aren't affected by the limit.
That makes a lot of sense. I wondered about the number of files, but thought I was safe up to about 1000. If it's <FAT32 I can see why I might reach that limit sooner.
Once I get sick of my current compilation, I'll try both wiping the partition before using mkfs to create a new one and making subdirs.
Actually, I've just remembered, I originally started just copying whole albums across, then realised I'd be better of mixing them up myself than letting the random play feature do it for me. I'm pretty sure I had close to a gigabyte copied when I abandoned that idea.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.