search for: bootloader_grub2

Displaying 20 results from an estimated 23 matches for "bootloader_grub2".

2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...t; >> let grub_prefix = > >> let mounts = g#inspect_get_mountpoints inspect.i_root in > >>@@ -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) > >&...
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...+ > (* Grub prefix? Usually "/boot". *) > let grub_prefix = > let mounts = g#inspect_get_mountpoints inspect.i_root in > @@ -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 = > -...
2016 Nov 01
3
[PATCH v3] v2v: bootloaders: search grub config for all distributions
...ansform "grub" grub_config in + (* Grub prefix? Usually "/boot". *) let grub_prefix = 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 bootloade...
2016 Nov 10
0
[PATCH v5 1/3] v2v: bootloaders: search grub config for all distributions
.../boot/efi/EFI/redhat/grub.conf" in + (* Grub prefix? Usually "/boot". *) let grub_prefix = 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 = [ - "/boo...
2016 Nov 01
0
Re: [PATCH v3] v2v: bootloaders: search grub config for all distributions
...+ > (* Grub prefix? Usually "/boot". *) > let grub_prefix = > 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 >...
2016 Nov 02
4
[PATCH v4 1/2] v2v: bootloaders: search grub config for all distributions
.../boot/efi/EFI/redhat/grub.conf" in + (* Grub prefix? Usually "/boot". *) let grub_prefix = 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 = [ - "/boo...
2020 May 15
1
[PATCH] v2v: fix UEFI bootloader for linux guests
...ctive then + fix_uefi g distro distro_ver_major grub_config arch + else + "" end (** The method 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 wit...
2016 Sep 27
0
[PATCH 3/3] v2v: bootloaders: improve detection of Grub2 default method
...d used to get and set the default kernel in Grub2. *) +type default_kernel_method = + | MethodGrubby (** Use the 'grubby' tool. *) + | MethodPerlBootloader (** Use the 'Bootloader::Tools' Perl module. *) + | MethodNone (** No known way. *) + (* Grub2 representation. *) class bootloader_grub2 (g : G.guestfs) grub_config = @@ -199,6 +205,20 @@ class bootloader_grub2 (g : G.guestfs) grub_config = error (f_"failed to find grub2-mkconfig binary (but Grub2 was detected on guest)") in + let get_default_method = + let has_perl_bootloader () = + try + ign...
2016 Sep 13
1
[PATCH v3 2/2] v2v: ilnux: detect name of grub2-mkconfig
...rs.ml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 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 ~foll...
2017 May 02
2
[PATCH] v2v: bootloaders: search grub config for all distributions
...quot;no bootloader detected") in - - match typ with - | Grub1 -> - if config_file = "/boot/efi/EFI/redhat/grub.conf" then - g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf"; - - new bootloader_grub1 g inspect config_file - | Grub2 -> new bootloader_grub2 g config_file + (* Where to start searching for bootloaders. *) + let mp = + match inspect.i_firmware with + | I_BIOS -> "/boot" + | I_UEFI _ -> "/boot/efi/EFI" in + + (* Find all paths below the mountpoint, then filter them to find + * the grub config file....
2016 Sep 12
2
[PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
....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 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"...
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 Sep 27
8
[PATCH 0/3] v2v: further bits of Debian/Ubuntu guests supports
Hi, this series adds a couple bits more 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: * currently tested with simple local guest images, hence needs testing with real guests on
2016 Aug 25
2
[PATCH v2] v2v: factor out bootloader handling
...#aug_match expr in + let paths = Array.to_list paths in + loop paths + ) + else + loop paths + in + let paths = g#aug_match expr in + let paths = Array.to_list paths in + loop paths; + + g#aug_save () +end + +(* Grub2 representation. *) +class bootloader_grub2 (g : G.guestfs) grub_config = + let grub2_update_console ~remove = + let rex = Str.regexp "\\(.*\\)\\bconsole=[xh]vc0\\b\\(.*\\)" in + + let paths = [ + "/files/etc/sysconfig/grub/GRUB_CMDLINE_LINUX"; + "/files/etc/default/grub/GRUB_CMDLINE_LINUX"; +...
2016 Oct 03
4
[PATCH v2 0/3] v2v: further bits of Debian/Ubuntu guests supports
Hi, this series adds a couple bits more 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: * currently tested with simple local guest images, hence needs testing with real guests on
2016 Aug 25
0
Re: [PATCH v2] v2v: factor out bootloader handling
On Thu, Aug 25, 2016 at 06:05:16PM +0200, Pino Toscano wrote: > +(* Grub2 representation. *) > +class bootloader_grub2 (g : G.guestfs) grub_config = > + let grub2_update_console ~remove = I checked the before and after code and I don't think anything has been missed out. My only comment is it seems a bit awkward stuffing the grub2_update_console function definition into what is effectively the class const...
2016 Sep 12
0
Re: [PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
....ml | 20 ++++++++++++++++++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > 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 = I'd make it a simple attribute of the object, just like grub_prefix in class bootloader_grub1. > + let elems = [ > + "/sbin/grub2-mkconfig";...
2016 Nov 01
0
[PATCH] v2v: bootloaders: search grub config for all distributions
...quot;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 smaller and more efficient (only makes 2 libguestfs API calls in t...
2016 Nov 01
0
Re: [PATCH] v2v: bootloaders: search grub config for all distributions
...; > >>- > >>+ (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 necessary for /EFI/redhat/, but no need for others? I believe so, because...
2016 Aug 26
2
[PATCH] v2v: Use unitless methods for methods which don't change the internal state.
...gt; unit @@ -69,7 +69,7 @@ object "/files/etc/sysconfig/grub/boot"; ] - method list_kernels () = + method list_kernels = let paths = let expr = sprintf "/files%s/title/kernel" grub_config in let paths = g#aug_match expr in @@ -189,7 +189,7 @@ class bootloader_grub2 (g : G.guestfs) grub_config = object (self) inherit bootloader - method private grub2_update_console ~remove = + method private grub2_update_console ~remove () = let rex = Str.regexp "\\(.*\\)\\bconsole=[xh]vc0\\b\\(.*\\)" in let paths = [ @@ -235,7 +235,7 @@ object (s...