From 035533d67a922e7690e340fb95fb1981f4c966a6 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 19 Aug 2016 16:21:12 +0200 Subject: [PATCH] v2v: linux: handle UEFI path for Grub1 (RHBZ#1152369) Add also /boot/efi/EFI/redhat/grub.conf as configuration of Grub 1; since the "grub" lens of Augeas does not handle this path, add a transformation so Augeas can parse it. --- v2v/convert_linux.ml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index 994175057..2a533151f 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -96,7 +96,11 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = ] in let locations = match inspect.i_firmware with - | I_UEFI _ -> ("/boot/efi/EFI/redhat/grub.cfg", `Grub2) :: locations + | I_UEFI _ -> + [ + "/boot/efi/EFI/redhat/grub.cfg", `Grub2; + "/boot/efi/EFI/redhat/grub.conf", `Grub1; + ] @ locations | I_BIOS -> locations in try List.find ( @@ -111,6 +115,11 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = match grub with | `Grub2 -> "" | `Grub1 -> + if grub_config = "/boot/efi/EFI/redhat/grub.conf" then ( + g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf"; + Linux.augeas_reload g; + ); + let mounts = g#inspect_get_mountpoints inspect.i_root in try List.find (