pengutronix / genimage

tool to generate multiple filesystem and flash images from a tree
GNU General Public License v2.0
308 stars 110 forks source link

hdimage: use random mbr disk signature if not provided #66

Closed mniestroj closed 5 years ago

mniestroj commented 5 years ago

Disk signature is part of PARTUUID for MBR partitions. PARTUUID can be used to provide root partition, instead of hardcoding /dev/sd or /dev/mmcblk nodes. The advantage of using PARTUUID is that it doesn't change across reboots (depending on device drivers probe order).

Up to now 0 value has been used for disk signature if user didn't provide one. Change behavior to generate unique disk signature in such case, so we make it less likely to have multiple SD cards with the same PARTUUIDs connected to a single system, resulting in PARTUUID conflict.

Signed-off-by: Marcin Niestroj m.niestroj@grinn-global.com

michaelolbrich commented 5 years ago

I'd like to keep the current default. Make the random value explicit:

disk-signature = random
mniestroj commented 5 years ago

@michaelolbrich does it look good to you now? :)