wic: Force lba off for FAT16 partitions

If fat16 is specified to the mkpart parted command, parted will
default to setting the lba flag which causes certain EFI firmware
to fail to detect the filesystem. lba shouldn't be necessary for
FAT16 filesystems anyway, explicitly disable it.

(From OE-Core master rev: 30442d432e203e655b7d40b93f7307f475de1614)

(From OE-Core rev: e437cd5ccaa44798107a6aa5177b1b867c94dfc3)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Darren Hart 2013-10-15 14:46:23 -07:00 committed by Richard Purdie
parent a253acca45
commit 30df3a1e7b
1 changed files with 10 additions and 0 deletions

View File

@ -352,6 +352,16 @@ class PartitionedMount(Mount):
self.__run_parted(["-s", d['disk'].device, "set",
"%d" % p['num'], flag_name, "on"])
# Parted defaults to enabling the lba flag for fat16 partitions,
# which causes compatibility issues with some firmware (and really
# isn't necessary).
if parted_fs_type == "fat16":
if d['ptable_format'] == 'msdos':
msger.debug("Disable 'lba' flag for partition '%s' on disk '%s'" % \
(p['num'], d['disk'].device))
self.__run_parted(["-s", d['disk'].device, "set",
"%d" % p['num'], "lba", "off"])
# If the partition table format is "gpt", find out PARTUUIDs for all
# the partitions. And if users specified custom parition type UUIDs,
# set them.