Partition UUID for msdos partitioning is based on a 4 bytes long
system identifier. Wic uses random number to generate system
identifier. For the numbers starting with 0 partition uuid is
shorter, which makes wic images non-bootable as kernel expects
8 charactest in PARTUUID parameter.
Padded system identifier with '0' when generating partition UUID
to make it always 8 characters long. This should fix the boot
issue.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
if self.ptable_format == 'gpt':
part.uuid = str(uuid.uuid4())
else: # msdos partition table
- part.uuid = '%0x-%02d' % (self.identifier, part.realnum)
+ part.uuid = '%08x-%02d' % (self.identifier, part.realnum)
def prepare(self, imager):
"""Prepare an image. Call prepare method of all image partitions."""