[node-patches] Change in ovirt-node[ovirt-3.6]: Bootloader: find grub configs on EFI

fabiand at redhat.com fabiand at redhat.com
Fri Feb 12 11:57:41 UTC 2016


Fabian Deutsch has uploaded a new change for review.

Change subject: Bootloader: find grub configs on EFI
......................................................................

Bootloader: find grub configs on EFI

Mount the EFI filesystem if it's EFI so we can look there.

Recurse through the boot config directory and intelligently pick
the config depending on whether it's grub2 or not.

Change-Id: Id837e7932c1c36f08c1dd9a9c28309f435630545
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1046887
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/utils/system.py
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/64/53464/1

diff --git a/src/ovirt/node/utils/system.py b/src/ovirt/node/utils/system.py
index a064416..ff63672 100755
--- a/src/ovirt/node/utils/system.py
+++ b/src/ovirt/node/utils/system.py
@@ -1107,16 +1107,18 @@
     def find_grub_cfg():
         cfg_path = None
 
-        if os.path.ismount("/dev/.initramfs/live"):
+        if is_efi():
+            mount_efi(target="/liveos")
+            cfg_path = "/liveos/EFI/redhat/grub.cfg"
+        elif os.path.ismount("/dev/.initramfs/live"):
             if Bootloader.is_grub2():
                 cfg_path = "/dev/.initramfs/live/grub2/grub.cfg"
             else:
                 cfg_path = "/dev/.initramfs/live/grub/grub.conf"
-        elif os.path.ismount("/run/initramfs/.live"):
+        elif os.path.ismount("/run/.initramfs/live"):
             cfg_path = "/liveos/grub/grub.conf"
         elif Filesystem.by_label("Boot"):
             cfg_path = "/boot/grub/grub.conf"
-
         else:
             raise RuntimeError("Failed to find the path for grub.[cfg|conf]")
 


-- 
To view, visit https://gerrit.ovirt.org/53464
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id837e7932c1c36f08c1dd9a9c28309f435630545
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>



More information about the node-patches mailing list