v2v: tell v2v the real root device to mkinitrd

Complementary fix of commit 2d25872df3.
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@suse.com>
This commit is contained in:
Pino Toscano
2017-06-01 18:03:37 +02:00
committed by Richard W.M. Jones
parent 8c89299d8a
commit 76eeb0afc9

View File

@@ -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;