Displaying 14 results from an estimated 14 matches for "grub2_mkconfig_cmd".
2016 Sep 13
1
[PATCH v3 2/2] v2v: ilnux: detect name of grub2-mkconfig
...ons(+), 2 deletions(-)
diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
index a5e4c8d..4f53f87 100644
--- a/v2v/linux_bootloaders.ml
+++ b/v2v/linux_bootloaders.ml
@@ -186,6 +186,19 @@ end
(* Grub2 representation. *)
class bootloader_grub2 (g : G.guestfs) grub_config =
+
+ let grub2_mkconfig_cmd =
+ let elems = [
+ "/sbin/grub2-mkconfig";
+ "/usr/sbin/grub2-mkconfig";
+ "/sbin/grub-mkconfig";
+ "/usr/sbin/grub-mkconfig"
+ ] in
+ try List.find (g#is_file ~followsymlinks:true) elems
+ with Not_found ->
+ er...
2016 Aug 10
3
[PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
...103728b..1f5f12c 100644
--- a/v2v/convert_linux.ml
+++ b/v2v/convert_linux.ml
@@ -109,6 +109,23 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
Not_found ->
error (f_"no grub1/grub-legacy or grub2 configuration file was found") in
+ let grub2_mkconfig_cmd =
+ if grub = `Grub2 then
+ try
+ (* Red Hat and Suse families *)
+ ignore (g#command [| "grub2-mkconfig"; "--version" |]);
+ "grub2-mkconfig"
+ with G.Error _ ->
+ try
+ (* Debian family *)
+ ignore (g#comm...
2016 Sep 12
2
[PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
...letions(-)
diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
index a5e4c8d..0729f17 100644
--- a/v2v/linux_bootloaders.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 =
+ let elems = [
+ "/sbin/grub2-mkconfig";
+ "/usr/sbin/grub2-mkconfig";
+ "/sbin/grub-mkconfig"
+ "/usr/sbin/grub-mkconfig"
+ ] in
+ try
+ List.find (
+ let e ->
+ try g#is_file ~followsymlinks:true...
2016 Sep 12
0
Re: [PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
...oaders.ml b/v2v/linux_bootloaders.ml
> index a5e4c8d..0729f17 100644
> --- a/v2v/linux_bootloaders.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/...
2016 Nov 01
3
[PATCH v3] v2v: bootloaders: search grub config for all distributions
...let mounts = g#inspect_get_mountpoints inspect.i_root in
@@ -191,7 +199,7 @@ type default_kernel_method =
| MethodNone (** No known way. *)
(* Grub2 representation. *)
-class bootloader_grub2 (g : G.guestfs) grub_config =
+class bootloader_grub2 (g : G.guestfs) inspect grub_config =
let grub2_mkconfig_cmd =
let elems = [
@@ -333,34 +341,42 @@ object (self)
ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |])
end
+(* We can determine if the bootloader config file is grub 1 or
+ * grub 2 just by looking at the filename.
+ *)
+let bootloader_type_of_filename path =
+ i...
2016 Nov 01
0
Re: [PATCH v3] v2v: bootloaders: search grub config for all distributions
...nspect.i_root in
> @@ -191,7 +199,7 @@ type default_kernel_method =
> | MethodNone (** No known way. *)
>
> (* Grub2 representation. *)
> -class bootloader_grub2 (g : G.guestfs) grub_config =
> +class bootloader_grub2 (g : G.guestfs) inspect grub_config =
>
> let grub2_mkconfig_cmd =
> let elems = [
> @@ -333,34 +341,42 @@ object (self)
> ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |])
> end
>
> +(* We can determine if the bootloader config file is grub 1 or
> + * grub 2 just by looking at the filename.
> + *)
>...
2020 May 15
1
[PATCH] v2v: fix UEFI bootloader for linux guests
...thod used to get and set the default kernel in Grub2. *)
@@ -193,7 +319,7 @@ type default_kernel_method =
| MethodNone (** No known way. *)
(* Grub2 representation. *)
-class bootloader_grub2 (g : G.guestfs) grub_config =
+class bootloader_grub2 (g : G.guestfs) inspect grub_config =
let grub2_mkconfig_cmd =
let elems = [
@@ -221,6 +347,15 @@ class bootloader_grub2 (g : G.guestfs) grub_config =
MethodNone
) in
+ let uefi_active =
+ match inspect.i_firmware with
+ | I_UEFI _ -> true
+ | _ -> false in
+
+ let arch = inspect.i_arch in
+ let distro = inspect.i_distro...
2016 Aug 11
0
Re: [PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
...v2v/convert_linux.ml
> +++ b/v2v/convert_linux.ml
> @@ -109,6 +109,23 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
> Not_found ->
> error (f_"no grub1/grub-legacy or grub2 configuration file was found") in
>
> + let grub2_mkconfig_cmd =
> + if grub = `Grub2 then
> + try
> + (* Red Hat and Suse families *)
> + ignore (g#command [| "grub2-mkconfig"; "--version" |]);
> + "grub2-mkconfig"
> + with G.Error _ ->
> + try
> + (* De...
2016 Nov 10
0
[PATCH v5 1/3] v2v: bootloaders: search grub config for all distributions
...let mounts = g#inspect_get_mountpoints inspect.i_root in
@@ -191,7 +199,7 @@ type default_kernel_method =
| MethodNone (** No known way. *)
(* Grub2 representation. *)
-class bootloader_grub2 (g : G.guestfs) grub_config =
+class bootloader_grub2 (g : G.guestfs) inspect grub_config =
let grub2_mkconfig_cmd =
let elems = [
@@ -334,33 +342,46 @@ object (self)
end
let detect_bootloader (g : G.guestfs) inspect =
- let config_file, typ =
- let locations = [
- "/boot/grub2/grub.cfg", Grub2;
- "/boot/grub/grub.cfg", Grub2;
- "/boot/grub/menu.lst", Gr...
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...t; @@ -191,7 +202,7 @@ type default_kernel_method =
> | MethodNone (** No known way. *)
>
> (* Grub2 representation. *)
> -class bootloader_grub2 (g : G.guestfs) grub_config =
> +class bootloader_grub2 (g : G.guestfs) inspect grub_config =
NACK, see below.
>
> let grub2_mkconfig_cmd =
> let elems = [
> @@ -335,33 +346,46 @@ object (self)
> end
>
> let detect_bootloader (g : G.guestfs) inspect =
> - let config_file, typ =
> - let locations = [
> - "/boot/grub2/grub.cfg", Grub2;
> - "/boot/grub/grub.cfg", Grub...
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...** No known way. *)
> >>
> >> (* Grub2 representation. *)
> >>-class bootloader_grub2 (g : G.guestfs) grub_config =
> >>+class bootloader_grub2 (g : G.guestfs) inspect grub_config =
> >
> >NACK, see below.
> >
> >>
> >> let grub2_mkconfig_cmd =
> >> let elems = [
> >>@@ -335,33 +346,46 @@ object (self)
> >> end
> >>
> >> let detect_bootloader (g : G.guestfs) inspect =
> >>- let config_file, typ =
> >>- let locations = [
> >>- "/boot/grub2/grub.c...
2020 Jul 24
3
[PATCH v2] v2v: fix UEFI bootloader for linux guests
...X) prefix from a path. *)
@@ -184,6 +185,9 @@ object
loop paths;
g#aug_save ()
+
+ method get_config_file () =
+ grub_config
end
(** The method used to get and set the default kernel in Grub2. *)
@@ -342,6 +346,9 @@ object (self)
method update () =
ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |])
+
+ method get_config_file () =
+ grub_config
end
(* Helper type used in detect_bootloader. *)
diff --git a/v2v/linux_bootloaders.mli b/v2v/linux_bootloaders.mli
index 30cdfe3c7..d9f0be8e1 100644
--- a/v2v/linux_bootloaders.mli
+++ b/v2v/linux_bootloaders.ml...
2016 Nov 02
4
[PATCH v4 1/2] v2v: bootloaders: search grub config for all distributions
...let mounts = g#inspect_get_mountpoints inspect.i_root in
@@ -191,7 +199,7 @@ type default_kernel_method =
| MethodNone (** No known way. *)
(* Grub2 representation. *)
-class bootloader_grub2 (g : G.guestfs) grub_config =
+class bootloader_grub2 (g : G.guestfs) inspect grub_config =
let grub2_mkconfig_cmd =
let elems = [
@@ -334,33 +342,46 @@ object (self)
end
let detect_bootloader (g : G.guestfs) inspect =
- let config_file, typ =
- let locations = [
- "/boot/grub2/grub.cfg", Grub2;
- "/boot/grub/grub.cfg", Grub2;
- "/boot/grub/menu.lst", Gr...
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.