Displaying 20 results from an estimated 22 matches for "detect_bootload".
Did you mean:
detect_bootloader
2016 Sep 13
1
[PATCH v3 2/2] v2v: ilnux: detect name of grub2-mkconfig
...@@ -290,7 +303,7 @@ object (self)
method remove_console = self#grub2_update_console ~remove:true
method update () =
- ignore (g#command [| "grub2-mkconfig"; "-o"; grub_config |])
+ ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |])
end
let detect_bootloader (g : G.guestfs) inspect =
--
2.9.3
2016 Sep 12
2
[PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
...@@ -290,7 +306,7 @@ object (self)
method remove_console = self#grub2_update_console ~remove:true
method update () =
- ignore (g#command [| "grub2-mkconfig"; "-o"; grub_config |])
+ ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |])
end
let detect_bootloader (g : G.guestfs) inspect =
--
2.9.3
2016 Aug 15
2
[PATCH v2] v2v: factor out bootloader handling
...st_kernels : unit -> string list
+ method virtual set_default_kernel : string -> unit
+ method set_augeas_configuration () = false
+ method virtual configure_console : unit -> unit
+ method virtual remove_console : unit -> unit
+ method update () = ()
+end
+
+(* Helper type used in detect_bootloader. *)
+type 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. *...
2015 Nov 20
0
[PATCH] v2v: factor out bootloader handling
...tual list_kernels : unit -> string list
+ method virtual set_default : string -> unit
+ method set_augeas_configuration () = false
+ method virtual configure_console : unit -> unit
+ method virtual remove_console : unit -> unit
+ method update () = ()
+end
+
+(* Helper type used in detect_bootloader. *)
+type 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. *...
2016 Aug 15
0
Re: [PATCH v2] v2v: factor out bootloader handling
...ny local data grub2 needs>
(and not exposed through the mli file). As this is to some extent my
personal preference, I'll let it slide.
I checked all of the code and it appears to be correct and there is
nothing omitted from the current implementation.
Rich.
> +(* Helper type used in detect_bootloader. *)
> +type 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
> +...
2016 Aug 25
2
[PATCH v2] v2v: factor out bootloader handling
...get_mountpoints inspect.i_root in
- try
- List.find (
- fun path -> List.mem_assoc path mounts
- ) [ "/boot/grub"; "/boot" ]
- with Not_found -> "" in
+ (* Detect the installed bootloader. *)
+ let bootloader = Linux_bootloaders.detect_bootloader g inspect in
+ Linux.augeas_reload g;
(* What kernel/kernel-like packages are installed on the current guest? *)
let installed_kernels : kernel_info list =
@@ -276,88 +240,7 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps =
* list is the default booting k...
2016 Nov 01
3
[PATCH v3] v2v: bootloaders: search grub config for all distributions
...String.is_suffix path "/menu.lst" then
+ Some Grub1
+ else
+ None
+
+(* Where to start searching for bootloaders. *)
+let bootloader_mountpoint = function
+ | { i_firmware = I_BIOS } -> "/boot"
+ | { i_firmware = I_UEFI _ } -> "/boot/efi/EFI"
+
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", Grub1;
- "/boot/grub/grub.conf", Grub1;
- ] in
- let locations =
-...
2016 Aug 26
0
[PATCH v2 4/7] v2v: add /boot/grub/grub.cfg as Grub2 config
...the Grub2 configuration in Debian-based systems.
---
v2v/linux_bootloaders.ml | 1 +
1 file changed, 1 insertion(+)
diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
index d12edf8..74c40c2 100644
--- a/v2v/linux_bootloaders.ml
+++ b/v2v/linux_bootloaders.ml
@@ -299,6 +299,7 @@ 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", Grub1;
"/boot/grub/grub.conf", Grub1;
] in
--
2.7.4
2016 Sep 12
0
Re: [PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
...method remove_console = self#grub2_update_console ~remove:true
>
> method update () =
> - ignore (g#command [| "grub2-mkconfig"; "-o"; grub_config |])
> + ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |])
> end
>
> let detect_bootloader (g : G.guestfs) inspect =
LGTM otherwise.
--
Pino Toscano
2016 Oct 31
0
Re: [PATCH] v2v: bootloaders: search grub config for all distributions
...------------
> 1 file changed, 34 insertions(+), 22 deletions(-)
>
> diff --git a/v2v/linux_bootloaders.ml b/v2v/linux_bootloaders.ml
> index e03d22b..210c273 100644
> --- a/v2v/linux_bootloaders.ml
> +++ b/v2v/linux_bootloaders.ml
> @@ -335,32 +335,44 @@ 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", Grub1;
> - "/boot/grub/grub.conf", Grub1;
&g...
2016 Nov 10
0
[PATCH v5 1/3] v2v: bootloaders: search grub config for all distributions
...t_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", Grub1;
- "/boot/grub/grub.conf", Grub1;
- ] in
- let locations =
-...
2020 May 15
1
[PATCH] v2v: fix UEFI bootloader for linux guests
...uot;; grub_config |])
+ method update () = (
+ ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |]))
+
+ method fix_efi_boot () =
+ if uefi_active then
+ fix_uefi g distro distro_ver_major grub_config arch
+ else
+ ""
end
(* Helper type used in detect_bootloader. *)
@@ -390,6 +531,6 @@ let detect_bootloader (g : G.guestfs) inspect =
let bl =
match typ with
| Grub1 -> new bootloader_grub1 g inspect grub_config
- | Grub2 -> new bootloader_grub2 g grub_config in
+ | Grub2 -> new bootloader_grub2 g inspect grub_config in
debug...
2016 Nov 01
0
Re: [PATCH v3] v2v: bootloaders: search grub config for all distributions
...or bootloaders. *)
> +let bootloader_mountpoint = function
> + | { i_firmware = I_BIOS } -> "/boot"
> + | { i_firmware = I_UEFI _ } -> "/boot/efi/EFI"
It seems to be used only once, so I'd just put it inline below (it's
small to read).
> +
> 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", Grub1;
> - "/boot/grub/grub.conf", Grub1;
&g...
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...ub2 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", Grub2;
> - "/boot/grub/menu.lst", Grub1;
> - "/boot/grub/grub.conf", Grub1;
&g...
2017 May 02
2
[PATCH] v2v: bootloaders: search grub config for all distributions
...)
+ if g#aug_ls ("/files" ^ grub_config) = [||] then
+ g#aug_transform "grub" grub_config in
+
(* Grub prefix? Usually "/boot". *)
let grub_prefix =
let mounts = g#inspect_get_mountpoints inspect.i_root in
@@ -335,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", Grub1;
- "/boot/grub/grub.conf", Grub1;
- ] in
- let locations =
-...
2016 Aug 26
11
[PATCH v2 0/7] v2v: first bits of Debian/Ubuntu guests supports
Hi,
this series implements the first bits in v2v to convert Debian/Ubuntu
(and derived) guests. The series does not complete the support (see
known issues below), but all the patches here should be fit for review
and inclusion. The series does not enable the conversion, yet.
Known issues:
* there is no grubby nor Bootloader::Tools Perl module available in
Debian, so there is no way to know
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...t;+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", Grub2;
> >>- "/boot/grub/menu.lst", Grub1;
> >>-...
2020 Jul 24
3
[PATCH v2] v2v: fix UEFI bootloader for linux guests
..._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.mli
@@ -44,6 +44,10 @@ class virtual bootloader : object
(** Update the bootloader: For grub2 only this runs the
[grub2-mk...
2016 Nov 02
4
[PATCH v4 1/2] v2v: bootloaders: search grub config for all distributions
...t_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", Grub1;
- "/boot/grub/grub.conf", Grub1;
- ] in
- let locations =
-...
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.