Displaying 20 results from an estimated 21 matches for "bootloader_grub1".
Did you mean:
bootloader_grub2
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...(hdX,X) prefix from a path. *)
> >> let remove_hd_prefix path =
> >> let rex = Str.regexp "^(hd.*)\\(.*\\)" in
> >>@@ -49,6 +53,13 @@ let remove_hd_prefix path =
> >>
> >> (* Grub1 (AKA grub-legacy) representation. *)
> >> class bootloader_grub1 (g : G.guestfs) inspect grub_config =
> >>+ let () =
> >
> >Wrong indentation here.
> >
> >>+ (* Apply the "grub" lens if it is not handling the file
> >>+ * already -- Augeas < 1.7.0 will error out otherwise.
> >>+ *)...
2016 Nov 02
4
[PATCH v4 1/2] v2v: bootloaders: search grub config for all distributions
...1"
+ | Grub2 -> "Grub2"
+
(* Helper function for SUSE: remove (hdX,X) prefix from a path. *)
let remove_hd_prefix path =
let rex = Str.regexp "^(hd.*)\\(.*\\)" in
@@ -49,6 +53,10 @@ let remove_hd_prefix path =
(* Grub1 (AKA grub-legacy) representation. *)
class bootloader_grub1 (g : G.guestfs) inspect grub_config =
+ let () =
+ if grub_config = "/boot/efi/EFI/redhat/grub.conf" then
+ g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf" in
+
(* Grub prefix? Usually "/boot". *)
let grub_prefix =
let mounts = g#...
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...t;
> +
> (* Helper function for SUSE: remove (hdX,X) prefix from a path. *)
> let remove_hd_prefix path =
> let rex = Str.regexp "^(hd.*)\\(.*\\)" in
> @@ -49,6 +53,13 @@ let remove_hd_prefix path =
>
> (* Grub1 (AKA grub-legacy) representation. *)
> class bootloader_grub1 (g : G.guestfs) inspect grub_config =
> + let () =
Wrong indentation here.
> + (* Apply the "grub" lens if it is not handling the file
> + * already -- Augeas < 1.7.0 will error out otherwise.
> + *)
> + if g#aug_ls ("/files" ^ grub_config) =...
2016 Nov 01
3
[PATCH v3] v2v: bootloaders: search grub config for all distributions
...ged, 47 insertions(+), 31 deletions(-)
diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
index e03d22b..0c236e1 100644
--- a/v2v/linux_bootloaders.ml
+++ b/v2v/linux_bootloaders.ml
@@ -49,6 +49,14 @@ let remove_hd_prefix path =
(* Grub1 (AKA grub-legacy) representation. *)
class bootloader_grub1 (g : G.guestfs) inspect grub_config =
+ (* We expect Augeas to parse the grub_config file. However
+ * the upstream lens only lists a subset of the possible
+ * locations for this file. Therefore tell Augeas that
+ * grub_config is a grub file (this apparently doesn't affect
+ * Auge...
2016 Nov 10
0
[PATCH v5 1/3] v2v: bootloaders: search grub config for all distributions
...1"
+ | Grub2 -> "Grub2"
+
(* Helper function for SUSE: remove (hdX,X) prefix from a path. *)
let remove_hd_prefix path =
let rex = Str.regexp "^(hd.*)\\(.*\\)" in
@@ -49,6 +53,10 @@ let remove_hd_prefix path =
(* Grub1 (AKA grub-legacy) representation. *)
class bootloader_grub1 (g : G.guestfs) inspect grub_config =
+ let () =
+ if grub_config = "/boot/efi/EFI/redhat/grub.conf" then
+ g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf" in
+
(* Grub prefix? Usually "/boot". *)
let grub_prefix =
let mounts = g#...
2017 May 02
2
[PATCH] v2v: bootloaders: search grub config for all distributions
...50 insertions(+), 30 deletions(-)
diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
index cad72a829..33a6dc4e9 100644
--- a/v2v/linux_bootloaders.ml
+++ b/v2v/linux_bootloaders.ml
@@ -49,6 +49,13 @@ let remove_hd_prefix path =
(* Grub1 (AKA grub-legacy) representation. *)
class bootloader_grub1 (g : G.guestfs) inspect grub_config =
+ let () =
+ (* Apply the "grub" lens if it is not handling the file
+ * already -- Augeas < 1.7.0 will error out otherwise.
+ *)
+ if g#aug_ls ("/files" ^ grub_config) = [||] then
+ g#aug_transform "grub" grub_config...
2020 May 15
1
[PATCH] v2v: fix UEFI bootloader for linux guests
...rch_suffix uefi_fallback_path
+ else
+ "")
+ else
+ cant_fix_uefi ()
+ | _, _ ->
+ info (f_"No UEFI fix rule for %s %d") distro distro_ver;
+ cant_fix_uefi ()
+ )
+
(* Grub1 (AKA grub-legacy) representation. *)
class bootloader_grub1 (g : G.guestfs) inspect grub_config =
let () =
@@ -60,6 +170,16 @@ class bootloader_grub1 (g : G.guestfs) inspect grub_config =
fun path -> List.mem_assoc path mounts
) [ "/boot/grub"; "/boot" ]
with Not_found -> "" in
+
+ let uefi_active...
2016 Nov 10
5
[PATCH v5 0/3] v2v and augeas
Augeas 1.7.0 was released a couple of days ago. By encouraging
everyone to upgrade to this we can drop several calls to aug_transform
and also our custom copies of two lenses, and a lot of related code.
Rich.
2016 Nov 01
0
Re: [PATCH v3] v2v: bootloaders: search grub config for all distributions
...> diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
> index e03d22b..0c236e1 100644
> --- a/v2v/linux_bootloaders.ml
> +++ b/v2v/linux_bootloaders.ml
> @@ -49,6 +49,14 @@ let remove_hd_prefix path =
>
> (* Grub1 (AKA grub-legacy) representation. *)
> class bootloader_grub1 (g : G.guestfs) inspect grub_config =
> + (* We expect Augeas to parse the grub_config file. However
> + * the upstream lens only lists a subset of the possible
> + * locations for this file. Therefore tell Augeas that
> + * grub_config is a grub file (this apparently doesn'...
2016 Sep 12
0
Re: [PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
...s.ml
> +++ b/v2v/linux_bootloaders.ml
> @@ -189,6 +189,22 @@ class bootloader_grub2 (g : G.guestfs) grub_config =
> object (self)
> inherit bootloader
>
> + method private grub2_mkconfig_cmd =
I'd make it a simple attribute of the object, just like grub_prefix in
class bootloader_grub1.
> + let elems = [
> + "/sbin/grub2-mkconfig";
> + "/usr/sbin/grub2-mkconfig";
> + "/sbin/grub-mkconfig"
> + "/usr/sbin/grub-mkconfig"
> + ] in
> + try
> + List.find (
> + let e ->...
2016 Nov 01
0
[PATCH] v2v: bootloaders: search grub config for all distributions
...efi/EFI/redhat/grub.conf" then
> - g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf";
> -
> + (match inspect.i_firmware with
> + | I_BIOS -> ()
> + | I_UEFI _ -> g#aug_transform "grub" config_file
> + );
> new bootloader_grub1 g inspect config_file
> | Grub2 -> new bootloader_grub2 g config_file
I don't think this part of the patch is correct. We need to use the
Augeas transform only for a particular path which is missing from the
Augeas lens.
What do you think of the attached version instead? It's s...
2016 Nov 01
0
Re: [PATCH] v2v: bootloaders: search grub config for all distributions
...#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf";
> >>-
> >>+ (match inspect.i_firmware with
> >>+ | I_BIOS -> ()
> >>+ | I_UEFI _ -> g#aug_transform "grub" config_file
> >>+ );
> >> new bootloader_grub1 g inspect config_file
> >> | Grub2 -> new bootloader_grub2 g config_file
> >
> >I don't think this part of the patch is correct. We need to use the
> >Augeas transform only for a particular path which is missing from the
> >Augeas lens.
>
> It is n...
2016 Nov 02
0
Re: [PATCH v4 1/2] v2v: bootloaders: search grub config for all distributions
...sary.
>
> Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
> Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
> ---
Mostly LGTM (it was the approach I suggested, after all) -- just one
note below.
> (* Grub1 (AKA grub-legacy) representation. *)
> class bootloader_grub1 (g : G.guestfs) inspect grub_config =
> + let () =
> + if grub_config = "/boot/efi/EFI/redhat/grub.conf" then
> + g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf" in
I guess this could be changed to be:
if String.is_prefix grub_config "...
2016 Oct 31
0
Re: [PATCH] v2v: bootloaders: search grub config for all distributions
...efi/EFI/redhat/grub.conf" then
> - g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf";
> -
> + (match inspect.i_firmware with
> + | I_BIOS -> ()
> + | I_UEFI _ -> g#aug_transform "grub" config_file
> + );
> new bootloader_grub1 g inspect config_file
This part looks fine.
Thanks,
--
Pino Toscano
2016 Sep 12
2
[PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
On Debian family of OSes Grub2 tools are prefixed with 'grub-', not with
'grub2-'. We have to detect the correct name of the tool to use it.
Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
---
v2v/linux_bootloaders.ml | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
index
2016 Aug 15
2
[PATCH v2] v2v: factor out bootloader handling
...ype bootloader_type =
+ | Grub1
+ | Grub2
+
+(* Helper function for SUSE: remove (hdX,X) prefix from a path. *)
+let remove_hd_prefix path =
+ let rex = Str.regexp "^(hd.*)\\(.*\\)" in
+ Str.replace_first rex "\\1" path
+
+(* Grub1 (AKA grub-legacy) representation. *)
+class bootloader_grub1 (g : G.guestfs) inspect grub_config =
+ (* Grub prefix? Usually "/boot". *)
+ let grub_prefix =
+ let mounts = g#inspect_get_mountpoints inspect.i_root in
+ try
+ List.find (
+ fun path -> List.mem_assoc path mounts
+ ) [ "/boot/grub"; "/boot&qu...
2015 Nov 20
0
[PATCH] v2v: factor out bootloader handling
...ype bootloader_type =
+ | Grub1
+ | Grub2
+
+(* Helper function for SUSE: remove (hdX,X) prefix from a path. *)
+let remove_hd_prefix path =
+ let rex = Str.regexp "^(hd.*)\\(.*\\)" in
+ Str.replace_first rex "\\1" path
+
+(* Grub1 (AKA grub-legacy) representation. *)
+class bootloader_grub1 g inspect grub_config =
+ let prefix =
+ let mounts = g#inspect_get_mountpoints inspect.i_root in
+ try
+ List.find (
+ fun path -> List.mem_assoc path mounts
+ ) [ "/boot/grub"; "/boot" ]
+ with Not_found -> "" in
+object
+ inherit bo...
2016 Aug 15
0
Re: [PATCH v2] v2v: factor out bootloader handling
...ub2
> +
> +(* Helper function for SUSE: remove (hdX,X) prefix from a path. *)
> +let remove_hd_prefix path =
> + let rex = Str.regexp "^(hd.*)\\(.*\\)" in
> + Str.replace_first rex "\\1" path
> +
> +(* Grub1 (AKA grub-legacy) representation. *)
> +class bootloader_grub1 (g : G.guestfs) inspect grub_config =
> + (* Grub prefix? Usually "/boot". *)
> + let grub_prefix =
> + let mounts = g#inspect_get_mountpoints inspect.i_root in
> + try
> + List.find (
> + fun path -> List.mem_assoc path mounts
> + ) [ &qu...
2016 Aug 25
2
[PATCH v2] v2v: factor out bootloader handling
...ype bootloader_type =
+ | Grub1
+ | Grub2
+
+(* Helper function for SUSE: remove (hdX,X) prefix from a path. *)
+let remove_hd_prefix path =
+ let rex = Str.regexp "^(hd.*)\\(.*\\)" in
+ Str.replace_first rex "\\1" path
+
+(* Grub1 (AKA grub-legacy) representation. *)
+class bootloader_grub1 (g : G.guestfs) inspect grub_config =
+ (* Grub prefix? Usually "/boot". *)
+ let grub_prefix =
+ let mounts = g#inspect_get_mountpoints inspect.i_root in
+ try
+ List.find (
+ fun path -> List.mem_assoc path mounts
+ ) [ "/boot/grub"; "/boot&qu...
2017 Sep 21
18
[PATCH v2 00/18] Replace many more uses of the Str module with PCRE.
v1 was here:
https://www.redhat.com/archives/libguestfs/2017-September/msg00135.html
This is a more complete evolution of the earlier patch. It replaces
most important uses of Str with PCRE throughout the code. It also
extends the bindings with some useful features like case-insensitive
regexps.
The main places I *didn't* touch are the generator (GObject uses Str
extensively); and