Skip to content

Wrong (or at least confusing) “Ext2 file too big” message from mkfs.ext4 #254

@DemiMarie

Description

@DemiMarie

The following command fails to include a 18159239168-byte file into a 100GiB image:

mkfs.ext4 -t ext4 -L eosimages -Oextent,huge_file,orphan_file,\
has_journal,extent,flex_bg,metadata_csum,\
metadata_csum_seed,64bit,dir_nlink,extra_isize,\
sparse_super,large_file,filetype,resize_inode,\
dir_index,ext_attr -d . OUTPUT_FILE

Full output:

mke2fs 1.47.3 (8-Jul-2025)
Discarding device blocks: done             
Creating filesystem with 26214400 4k blocks and 6553600 inodes
Filesystem UUID: 9dd24827-d97b-47ea-8129-f2f76ee5b4b8
Superblock backups stored on blocks:
   32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
       4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done   
Writing inode tables: done   
Creating journal (131072 blocks): done
Copying files into the device: __populate_fs: Ext2 file too big while writing file "Spectrum-0.0-x86_64-generic.0.Live.img"
mkfs.ext4: Ext2 file too big while populating file system

Since 19GiB << 100GiB I suspect the command should succeed.

I don’t know if there is an mke2fs.conf, though. This is on NixOS so it might be somewhere else or not exist at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions