Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 10 years ago

Closed 10 years ago

#112 closed defect (wontfix) 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:


When we increase fat16_clusters in our 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
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 Changed 10 years ago by Martin Decky

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 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

Note: See TracTickets for help on using tickets.