Skip to content

pmb.install.format: set ext4 usage-type to big

Oliver Smith requested to merge fix-inodes-part-2 into master
Using "-N" to set a specific inode count caused errors:
* With 100K, we got "out of space" errors when creating images for
  bigger UIs with many small files like:
  pine64-pinebookpro:plasma-desktop
* With 1M (current value), we got "out of space" for small images like:
  postmarketos-trailblazer:console

Use "-T big" instead to set the usage-type that is closest to how we
expect the filesystem to be used, once it is flashed to the user's
device and resized. This will indirectly set the bytes-per-inode. I've
verified that building both the big
pine64-pinebookpro:plasma-desktop and small
postmarketos-trailblazer:console (and even with UI=none) works with
this change.

I've verified that building both the small image works with this.

From the mkfs.ext4 man page:

       -T usage-type[,...]
              Specify how the file system is going to be used, so that mke2fs
              can choose optimal file system parameters for that use.  The
              usage types that are supported are defined in the configuration
              file /etc/mke2fs.conf.  The user may specify one or more usage
              types using a comma separated list.

              If this option is is not specified, mke2fs will pick a single
              default usage type based on the size of the file system to be
              created.  If the file system size is less than 3 megabytes,
              mke2fs will use the file system type floppy.  If the file system
              size is greater than or equal to 3 but less than 512 megabytes,
              mke2fs(8) will use the file system type small.  If the file
              system size is greater than or equal to 4 terabytes but less
              than 16 terabytes, mke2fs(8) will use the file system type big.
              If the file system size is greater than or equal to 16
              terabytes, mke2fs(8) will use the file system type huge.
              Otherwise, mke2fs(8) will use the default file system type
              default.
  • Fixes: d0d7c2d4 ("pmb.install.format: set ext4 usage-type to big")
  • Fix #2572 (closed)

Merge request reports

Loading