Cédric Bosdonnat
2017-Jun-01 16:03 UTC
[Libguestfs] [PATCH] v2v: tell v2v the real root device to mkinitrd
From: Pino Toscano <ptoscano at redhat.com> Complementary fix of commit 2d25872df3619a3077006ad0f91c029602db6780. On SLES 11 SP4 with kdump enabled mkinitrd calls mkdumprd which calls mkinitrd, but mkdumprd doesn't have any clue of the root device. Call mkinitrd with rootdev environment variable to tell them all what device to use as root. Tested-By: C?dric Bosdonnat <cbosdonnat at suse.com> --- v2v/convert_linux.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml index f8dfa00d7..42a19947b 100644 --- a/v2v/convert_linux.ml +++ b/v2v/convert_linux.ml @@ -514,7 +514,9 @@ let rec convert (g : G.guestfs) inspect source output rcaps else if family = `SUSE_family && g#is_file ~followsymlinks:true "/sbin/mkinitrd" then ( ignore ( - g#command [| "/sbin/mkinitrd"; + g#command [| "/usr/bin/env"; + "rootdev=" ^ inspect.i_root; + "/sbin/mkinitrd"; "-m"; String.concat " " modules; "-i"; initrd; "-k"; kernel.ki_vmlinuz; -- 2.12.2
Richard W.M. Jones
2017-Jun-02 13:59 UTC
[Libguestfs] [PATCH] v2v: tell v2v the real root device to mkinitrd
On Thu, Jun 01, 2017 at 06:03:37PM +0200, C?dric Bosdonnat wrote:> From: Pino Toscano <ptoscano at redhat.com> > > Complementary fix of commit 2d25872df3619a3077006ad0f91c029602db6780. > On SLES 11 SP4 with kdump enabled mkinitrd calls mkdumprd which calls > mkinitrd, but mkdumprd doesn't have any clue of the root device. > > Call mkinitrd with rootdev environment variable to tell them all > what device to use as root. > > Tested-By: C?dric Bosdonnat <cbosdonnat at suse.com> > --- > v2v/convert_linux.ml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml > index f8dfa00d7..42a19947b 100644 > --- a/v2v/convert_linux.ml > +++ b/v2v/convert_linux.ml > @@ -514,7 +514,9 @@ let rec convert (g : G.guestfs) inspect source output rcaps > else if family = `SUSE_family > && g#is_file ~followsymlinks:true "/sbin/mkinitrd" then ( > ignore ( > - g#command [| "/sbin/mkinitrd"; > + g#command [| "/usr/bin/env"; > + "rootdev=" ^ inspect.i_root; > + "/sbin/mkinitrd"; > "-m"; String.concat " " modules; > "-i"; initrd; > "-k"; kernel.ki_vmlinuz;Thanks for posting and testing this. I have pushed it now. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Maybe Matching Threads
- [PATCH] v2v: Don't hang when rebuilding SUSE kdump initrd (RHBZ#1465849).
- [PATCH] v2v: linux: pass the root device when using SUSE's mkinitrd
- [PATCH 0/2] v2v: uninstall VMware tools on all Linux guests
- [PATCH 2/2] v2v: linux: try to trick vmware-uninstall-tools.pl
- How to specify kernel version when restart kdump