diff options
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 51bdd3a9849..5765bbb527b 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py @@ -26,6 +26,7 @@ import logging import os +import random import shutil import tempfile import uuid @@ -303,7 +304,7 @@ class PartitionedImage(): # all partitions (in bytes) self.ptable_format = ptable_format # Partition table format # Disk system identifier - self.identifier = int.from_bytes(os.urandom(4), 'little') or 0xffffffff + self.identifier = random.SystemRandom().randint(1, 0xffffffff) self.partitions = partitions self.partimages = [] |