Better support for UEFI

- throw a proper error if we cannot find the ESP partition
- don't forget to parse the GPT first before starting the ESP search
This commit is contained in:
Carl D. Roth
2018-05-02 16:41:04 -07:00
parent e09559d6dc
commit 9b282495fa

View File

@@ -726,6 +726,9 @@ class GrubInstaller(SubprocessMixin, Base):
ctx['boot_loading_name'] = sysconfig.installer.os_name
if self.isUEFI:
if not self.espFsUuid:
self.log.error("cannnot find ESP UUID")
return 1
ctx['onie_boot_uuid'] = self.espFsUuid
else:
ctx['onie_boot_uuid'] = ""
@@ -846,6 +849,16 @@ class GrubInstaller(SubprocessMixin, Base):
self.blkidParts = BlkidParser(log=self.log.getChild("blkid"))
code = self.findGpt()
if code: return code
if self.isUEFI:
code = self.findEsp()
if code: return code
self.im.grubEnv.__dict__['espPart'] = self.espDevice
else:
self.im.grubEnv.__dict__['espPart'] = None
code = self.installGrubCfg()
if code: return code