OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
  • Task Type Bug Report
  • Category Toolchain
  • Assigned To No-one
  • Operating System All
  • Severity High
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Marvin Gaube - 24.01.2020

FS#2768 - make_ext4fs: Name-Based UUID leads to collision

make_ext4fs uses name-based uuid generation (see

Therefore, as the uuid generation does only depend on the Filesystem Label and an hardcoded namespace, the UUID is exactly identical for multiple different filesystems with the same label (see;a=blob;f=ext4_utils.c;h=1a886d7e86262d35e30d894f821ca91d32384e96;hb=HEAD#l224).

This can lead to problems like the inability to mount an filesystem by UUID.
In my constellation, I have an MMC Storage and an external SD-Card, both flashed with filesystems generated by make_ext4fs. They both have the same UUID, therefore it’s impossible to distinguish/mount them by UUID.

My suggestion would be to replace “info.label” as parameter for “generate_uuid” trough another, better suited value, e.g. an hash of the make_ext4fs directory content. Maybe it should be considered to switch to an Random Number-based UUID (

Affected Devices/Targets: All toolchains that use make_ext4fs
Revision: make-ext4fs-2020-01-05-5c201be7

Jo-Philipp Wich commented on 24.01.2020 10:43

In the interest of reproducible builds we don't actually want random filesystem UUIDs in produced artifacts. I think if you really want to be sure to have random IDs on your filesystem images, you need to first write them to the storage, then use tools like tune2fs to change them accordingly.

Marvin Gaube commented on 24.01.2020 10:55

To archive repoducible builds, it would be probably better to replace the info.label in

generate_uuid("extandroid/make_ext4fs", info.label, sb->s_uuid);

trough an hashed Version of the filesystem contents?

I don't actually think it's a good practice to have the same, "default" uuid for different filesystem contents.

In other words: Wouldn't it be better if the UUID depends on the Filesystem content, and not only on the filesystem label?

Jo-Philipp Wich commented on 24.01.2020 12:31

Yes, hashing the contents is good idea. Would you be able to send a patch for it?


Available keyboard shortcuts


Task Details

Task Editing