search for: grub_prefix

Displaying 19 results from an estimated 19 matches for "grub_prefix".

2010 Oct 26
0
[PATCH node] add install.py
...syslinux = "isolinux" + else: + syslinux="" + + if OVIRT_VARS.has_key("OVIRT_ISCSI_ENABLED") and OVIRT_VARS["OVIRT_ISCSI_ENABLED"] == "y": + initrd_dest = "/boot" + grub_dir = "/boot/grub" + grub_prefix = "/grub" + else: + initrd_dest = "/liveos" + grub_dir = "/liveos/boot/grub" + grub_prefix = "/boot/grub" + if os.path.isdir(grub_dir): + shutil.rmtree(grub_dir) + if not os.path.exists(grub_dir): + os.makedirs(grub...
2016 Aug 15
2
[PATCH v2] v2v: factor out bootloader handling
...) +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" ] + with Not_found -> "" in +object + inherit bootloader + + method name = "grub...
2016 Aug 15
0
Re: [PATCH v2] v2v: factor out bootloader handling
...+ 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" ] > + with Not_found -> "" in > +object > + inherit...
2016 Aug 25
2
[PATCH v2] v2v: factor out bootloader handling
...List.find ( - fun (grub_config, _) -> g#is_file ~followsymlinks:true grub_config - ) locations - with - Not_found -> - error (f_"no grub1/grub-legacy or grub2 configuration file was found") in - - (* Grub prefix? Usually "/boot". *) - let grub_prefix = - 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 =...
2009 Dec 08
1
[PATCH node] iscsi remote root basework This lays most of the groundwork for iscsi installation and configuration. At this time configuring iscsi is disabled due to multiple issues with dependent pieces.
...syslinux= fi - rm -rf /liveos/boot/grub + rm -rf /liveos/LiveOS - mkdir -p /liveos/boot/grub mkdir -p /liveos/LiveOS + + if [ "$OVIRT_ISCSI_ENABLED" == "y" ]; then + initrd_dest="/boot" + grub_dir="/boot/grub" + grub_prefix="/grub" + else + initrd_dest="/liveos" + grub_dir="/liveos/boot/grub" + grub_prefix="/boot/grub" + fi + + rm -rf $grub_dir + mkdir -p $grub_dir + cp -p $live/LiveOS/squashfs.img /liveos/LiveOS \ - && cp -p $li...
2015 Nov 20
0
[PATCH] v2v: factor out bootloader handling
...remove_hd_prefix vmlinuzes in + + (* Prepend grub filesystem. *) + List.map ((^) prefix) vmlinuzes + + method set_default kernel = + if not (String.is_prefix kernel prefix) then + error (f_"kernel %s is not under grub tree %s") + kernel prefix; + let kernel_under_grub_prefix = + let prefix_len = String.length prefix in + let kernel_len = String.length kernel in + String.sub kernel prefix_len (kernel_len - prefix_len) in + + (* Find the grub entry for the given kernel. *) + let paths = g#aug_match (sprintf "/files%s/title/kernel[. = '%s'...
2016 Aug 10
3
[PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
...quot;; "--version" |]); + "grub-mkconfig" + with G.Error _ -> + error (f_"failed to find grub2-mkconfig binary (but Grub2 was detected on guest)") + else + "" + in + (* Grub prefix? Usually "/boot". *) let grub_prefix = match grub with @@ -1109,7 +1126,7 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source rcaps = g#aug_save (); try - ignore (g#command [| "grub2-mkconfig"; "-o"; grub_config |]) + ignore (g#command [| grub2_mkconfig_...
2016 Nov 02
4
[PATCH v4 1/2] v2v: bootloaders: search grub config for all distributions
...tation. *) 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#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 =...
2016 Nov 01
3
[PATCH v3] v2v: bootloaders: search grub config for all distributions
...+ * locations for this file. Therefore tell Augeas that + * grub_config is a grub file (this apparently doesn't affect + * Augeas if it already parsed the file). + *) + let () = g#aug_transform "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 =...
2016 Sep 12
0
Re: [PATCH 2/2] v2v: ilnux: detect name of grub2-mkconfig
.../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/grub-mkconfig" > + ] in > + try > + List.find (...
2016 Nov 10
0
[PATCH v5 1/3] v2v: bootloaders: search grub config for all distributions
...tation. *) 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#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 =...
2016 Nov 01
0
Re: [PATCH v3] v2v: bootloaders: search grub config for all distributions
...erefore tell Augeas that > + * grub_config is a grub file (this apparently doesn't affect > + * Augeas if it already parsed the file). > + *) > + let () = g#aug_transform "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 :...
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...dling 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 in > + > (* 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 :...
2017 May 02
2
[PATCH] v2v: bootloaders: search grub config for all distributions
...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 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;...
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 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.
2017 Apr 28
0
Re: [PATCH v6 1/1] v2v: bootloaders: search grub config for all distributions
...1.7.0 will error out otherwise. > >>+ *) > >>+ 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 > >>@@ -191,7 +202,7 @@ type default_kernel_method = > >> | MethodNone (** No known way. *) > >> > >> (* Grub2 representation. *) > >>-class bootloader_grub2 (g : G.guestf...
2015 Oct 06
0
[PATCH 5/5] mllib: Replace various ad hoc string_* functions with String.*
...dated := true; (* Create a new entry immediately after the comment. *) @@ -743,7 +743,7 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source = and grub_set_bootable kernel = match grub with | `Grub1 -> - if not (string_prefix kernel.ki_vmlinuz grub_prefix) then + if not (String.is_prefix kernel.ki_vmlinuz grub_prefix) then error (f_"kernel %s is not under grub tree %s") kernel.ki_vmlinuz grub_prefix; let kernel_under_grub_prefix = @@ -1306,14 +1306,14 @@ let rec convert ~keep_serial_console (g : G.guestfs) i...
2015 Oct 06
10
[PATCH 0/5] mllib: Hide bad String functions and miscellaneous refactoring.
Hide/prevent the use of bad string functions like String.lowercase. These are replaced by safe functions that won't break UTF-8 strings. Other miscellaneous refactoring. Rich.