mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-26 17:57:01 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user