|
|
ffd6ed |
From d48436488af6a82504ceaa68f0ecbca153fb928f Mon Sep 17 00:00:00 2001
|
|
|
ffd6ed |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
ffd6ed |
Date: Thu, 30 Apr 2015 16:23:26 +0100
|
|
|
ffd6ed |
Subject: [PATCH] v2v: efi: linux: Add support for grub2-efi.
|
|
|
ffd6ed |
|
|
|
ffd6ed |
(cherry picked from commit 9a45508f23451761fb3df825b17f2e32beb258d7)
|
|
|
ffd6ed |
---
|
|
|
ffd6ed |
v2v/convert_linux.ml | 16 +++++++++++-----
|
|
|
ffd6ed |
1 file changed, 11 insertions(+), 5 deletions(-)
|
|
|
ffd6ed |
|
|
|
ffd6ed |
diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
|
|
|
ffd6ed |
index 3e97656..a1f5550 100644
|
|
|
ffd6ed |
--- a/v2v/convert_linux.ml
|
|
|
ffd6ed |
+++ b/v2v/convert_linux.ml
|
|
|
ffd6ed |
@@ -90,14 +90,20 @@ let rec convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source =
|
|
|
ffd6ed |
|
|
|
ffd6ed |
(* What grub is installed? *)
|
|
|
ffd6ed |
let grub_config, grub =
|
|
|
ffd6ed |
+ let locations = [
|
|
|
ffd6ed |
+ "/boot/grub2/grub.cfg", `Grub2;
|
|
|
ffd6ed |
+ "/boot/grub/menu.lst", `Grub1;
|
|
|
ffd6ed |
+ "/boot/grub/grub.conf", `Grub1;
|
|
|
ffd6ed |
+ ] in
|
|
|
ffd6ed |
+ let locations =
|
|
|
ffd6ed |
+ if inspect.i_uefi then
|
|
|
ffd6ed |
+ ("/boot/efi/EFI/redhat/grub.cfg", `Grub2) :: locations
|
|
|
ffd6ed |
+ else
|
|
|
ffd6ed |
+ locations in
|
|
|
ffd6ed |
try
|
|
|
ffd6ed |
List.find (
|
|
|
ffd6ed |
fun (grub_config, _) -> g#is_file ~followsymlinks:true grub_config
|
|
|
ffd6ed |
- ) [
|
|
|
ffd6ed |
- "/boot/grub2/grub.cfg", `Grub2;
|
|
|
ffd6ed |
- "/boot/grub/menu.lst", `Grub1;
|
|
|
ffd6ed |
- "/boot/grub/grub.conf", `Grub1;
|
|
|
ffd6ed |
- ]
|
|
|
ffd6ed |
+ ) locations
|
|
|
ffd6ed |
with
|
|
|
ffd6ed |
Not_found ->
|
|
|
ffd6ed |
error (f_"no grub1/grub-legacy or grub2 configuration file was found") in
|
|
|
ffd6ed |
--
|
|
|
ffd6ed |
1.8.3.1
|
|
|
ffd6ed |
|