[libvirt] [sandbox] Add ext4 module to QEMU initrd

Some distros don't have ext4 built in their kernel, but as a module. Make sure the ext4 module is loaded or we will fail loading root host-images on those distros. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libvirt-sandbox/libvirt-sandbox-builder-machine.c b/libvirt-sandbox/libvirt-sandbox-builder-machine.c index 43372b5..3d3267a 100644 --- a/libvirt-sandbox/libvirt-sandbox-builder-machine.c +++ b/libvirt-sandbox/libvirt-sandbox-builder-machine.c @@ -184,6 +184,13 @@ static gchar *gvir_sandbox_builder_machine_mkinitrd(GVirSandboxConfig *config, /* For dhclient to work */ gvir_sandbox_config_initrd_add_module(initrd, "af_packet.ko"); + /* In case ext4 is built as a module, include it and its deps + * for the root mount */ + gvir_sandbox_config_initrd_add_module(initrd, "mbcache.ko"); + gvir_sandbox_config_initrd_add_module(initrd, "jbd2.ko"); + gvir_sandbox_config_initrd_add_module(initrd, "crc16.ko"); + gvir_sandbox_config_initrd_add_module(initrd, "ext4.ko"); + if (!gvir_sandbox_builder_initrd_construct(builder, initrd, targetfile, error)) goto cleanup; -- 2.1.4

On Thu, Sep 03, 2015 at 05:57:57PM +0200, Cédric Bosdonnat wrote:
Some distros don't have ext4 built in their kernel, but as a module. Make sure the ext4 module is loaded or we will fail loading root host-images on those distros. --- libvirt-sandbox/libvirt-sandbox-builder-machine.c | 7 +++++++ 1 file changed, 7 insertions(+)
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Cédric Bosdonnat
-
Daniel P. Berrange