mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
Working for x86
This commit is contained in:
@@ -571,7 +571,8 @@ class GrubInstaller(SubprocessMixin, Base):
|
||||
|
||||
with MountContext(dev.device, log=self.log) as ctx:
|
||||
d = os.path.join(ctx.dir, "grub")
|
||||
self.makedirs(d)
|
||||
if not os.path.exists(d):
|
||||
self.makedirs(d)
|
||||
dst = os.path.join(ctx.dir, 'grub/grub.cfg')
|
||||
with open(dst, "w") as fd:
|
||||
fd.write(cf)
|
||||
@@ -663,8 +664,7 @@ class GrubInstaller(SubprocessMixin, Base):
|
||||
def upgradeBootLoader(self):
|
||||
"""Upgrade the boot loader settings."""
|
||||
|
||||
code = self.findGpt()
|
||||
if code: return code
|
||||
self.blkidParts = BlkidParser(log=self.log.getChild("blkid"))
|
||||
|
||||
code = self.installGrubCfg()
|
||||
if code: return code
|
||||
@@ -909,13 +909,6 @@ class UbootInstaller(SubprocessMixin, Base):
|
||||
def upgradeBootLoader(self):
|
||||
"""Upgrade the boot loader settings as part of a loader upgrade."""
|
||||
|
||||
self.partedDevice = parted.getDevice(self.device)
|
||||
self.partedDisk = parted.newDisk(self.partedDevice)
|
||||
if self.partedDisk.type != 'msdos':
|
||||
self.log.error("disk %s has wrong label %s",
|
||||
self.device, self.partedDisk.type)
|
||||
return 1
|
||||
|
||||
self.blkidParts = BlkidParser(log=self.log.getChild("blkid"))
|
||||
|
||||
# XXX boot-config (and saved boot-config) should be unchanged during loader upgrade
|
||||
|
||||
Reference in New Issue
Block a user