Opened 15 years ago

Closed 15 years ago

#112 closed defect (wontfix)

mkfat.py creates seemingly large image with insufficient space

Reported by: Jakub Jermář Owned by:
Priority: major Milestone: 0.4.2
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

When we increase fat16_clusters in our mkfat.py utility to 4096*5, it creates an image, which looks large enough, but both Linux and HelenOS run out of space rather soon:

root@phantom:/# mount -t msdos -o loop initrd.fs /mnt
root@phantom:/# df -h /mnt
/dev/loop0             11M  1.7M  8.4M  17% /mnt
root@phantom:/# cd /mnt
root@phantom:/mnt# vim a
...
root@phantom:/mnt# cat a
qwertyuiopasdfgh
root@phantom:/mnt# cp a b
root@phantom:/mnt# cp a c
root@phantom:/mnt# cp a d
root@phantom:/mnt# cp a e
root@phantom:/mnt# cp a f
root@phantom:/mnt# cp a g
root@phantom:/mnt# cp a h
root@phantom:/mnt# cp a i
root@phantom:/mnt# cp a j
root@phantom:/mnt# cp a k
cp: cannot create regular file `k': No space left on device
root@phantom:/mnt# df -h /mnt
Filesystem            Size  Used Avail Use% Mounted on
/dev/loop0             11M  1.7M  8.4M  17% /mnt

Change History (1)

comment:1 by Martin Decky, 15 years ago

Resolution: wontfix
Status: newclosed

This is not a bug, this is a property of FAT. Remember that the root directory is statically allocated and has only a limited number of directory entries. This limit is calculated by mkfat.py according to the real number of files which are going to be stored into the image, aligned up to cluster size (which usually renders something like 16 entries).

Thus you can't store more than say 16 files/directories in the root directory, but you can store much more files/directories in any subdirectory. If you really need to store more files in the root, you have to change the value returned by root_entries() function in mkfat.py.

Note: See TracTickets for help on using tickets.