diff --git a/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py b/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py index 196d6b52..922f781c 100644 --- a/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py +++ b/packages/base/all/vendor-config-onl/src/python/onl/install/BaseInstall.py @@ -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