FAT16 root filesystem limited to 255 entries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hal-info (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: hal-info
Hi,
there seems to be a problem to handle more than 255 files in a FAT16 SD card root directory.
Using this script:
<code>
#!/bin/bash
for i in $(seq 1 1 403)
do
dd if=/media/
done
</code>
I fill my 2gig SD card with copies of 0.bin (5120000Bytes). At 255 dd stops and displays that there is not enough space left.
Message:
dd: öffne „/media/
As you can see, the card is empty before.
df -h before filling card:
Dateisystem Größe Benut Verf Ben% Eingehängt auf
/dev/mmcblk0p1 1,9G 5,2M 1,9G 1% /media/8129-4A70
If I use df after the no space message you can see that there is 32% blank space left on the device. (Enough memory for about 100 further copies)
df -h after filling card:
Dateisystem Größe Benut Verf Ben% Eingehängt auf
/dev/mmcblk0p1 1,9G 1,3G 619M 68% /media/8129-4A70
I tried to do the same in a subdirectory. Result is: 403 successfull copies and all free space is used!
Trying to copy those new files to the root directory brought the error message again.
As far as I know the FAT16 spec. defines 512 entries in root directory. So there might be an error.
SD Card Controller: SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/
SD Card: SD 2Gig Sandisk
Mainboard: F3Sa (Asus)
Ubuntu:
Lucid (Linux <user> 2.6.32-24-generic #38-Ubuntu SMP Mon Jul 5 09:22:14 UTC 2010 i686 GNU/Linux)
Description: Ubuntu 10.04.1 LTS
Release: 10.0
Kind regards
Michael Sonst
According to Wikipedia, "The number of root directory entries available is determined when the volume is formatted", so perhaps the manufacturer formatted the card with only 256 entries.
If this is the case, it's not a bug in Ubuntu. If reformatting doesn't help, then please re-open this bug.