using LVM does not create bootable systems

Bug #1715686 reported by Andreas Florath
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
New
Undecided
Unassigned

Bug Description

Using the current master (72d0d22cdf3d0581f1b2b9993debde0146075004) it is not possible to create LVM images that are able to boot.

Using this setup / command provided by Ian:
http://paste.openstack.org/show/620590/

the resulted image stops during the boot process. See attached screenshot.

Host system: Ubuntu Xenial

Tested also building Ubuntu Xenial target system (replaced 'centos-minimal' with 'ubuntu-minimal') and added '-p lvm2' - all with the same result.

Revision history for this message
Andreas Florath (ansreas) wrote :
Revision history for this message
Yolanda Robla (yolanda.robla) wrote :

So, in order for me to work, i needed to add lvm2 on the dracut image, using dracut-regenerate element:
http://git.openstack.org/cgit/openstack/diskimage-builder/tree/diskimage_builder/elements/dracut-regenerate

If not, as the volume support is not found on the ramdisk, is not able to detect root.

Revision history for this message
Andreas Florath (ansreas) wrote :

It looks that there are a couple of issues here:

1) just using dracut-regenerate with ubuntu-xenial stops with an error message that python is not able to 'import yaml'.

2) There is no mechanism in the current LVM implementation which forces the inclusion of dracut-regenerate element - nor there is even a word about this in the documentation.

3) Same for lvm2 distribution package.

I was able to generate an image that boots - replacing the last line in Ian's script with:

    disk-image-create -p lvm2,dracut,python-yaml,python3-yaml -x -o d112 ubuntu-minimal vm dracut-regenerate devuser 2>&1 | tee out.log

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/502454

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/502452
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=b84997036da20c45318fae65309468e55f619eab
Submitter: Jenkins
Branch: master

commit b84997036da20c45318fae65309468e55f619eab
Author: Yolanda Robla <email address hidden>
Date: Mon Sep 11 14:23:26 2017 +0200

    Mention the need of dracut-regenerate element

    When using volumes, booting from them will need that the ramdisk
    image used has support for that. In case the lvm module is not
    included, mention the need of adding dracut-regenerate in the
    elements that are needed.

    Change-Id: I6e1f618dcfc5ef3be01c83904ffe6dd33db72bb7
    Partially-Fixes-Bug: #1715686

Revision history for this message
Andreas Florath (ansreas) wrote :

Adding a comment is a first small step here - hopefully now at least some users are able to build an image with LVM.

But to really fix this, there should be some automatism - like: when using LVM the 'lvm2' package is automatically installed in the target system.

What is currently also not addressed is that some systems 'typically' prefer using mkinitramfs. IMHO there is no appropriate element for this. Maybe it is a way to have an element 'initramfs-regenerate' which is able to handle both flavors.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/502454
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=da5c926fe92170446f4f0033f6494fbe2871ec82
Submitter: Jenkins
Branch: master

commit da5c926fe92170446f4f0033f6494fbe2871ec82
Author: Yolanda Robla <email address hidden>
Date: Mon Sep 11 14:32:19 2017 +0200

    Add missing package dependency for yaml

    This element was assuming that yaml was included as package,
    but there are systems not including it. So properly add yaml
    as a dependency.

    Change-Id: I72da2776674a3963657052b9a9715abcb4fab1e2
    Partially-Fixes-Bug: #1715686

Revision history for this message
Andreas Florath (ansreas) wrote :

I filed a patch for Debian / Ubuntu which addresses the last section in my latest comment:
https://review.openstack.org/#/c/504588/

dracut is currently not usable on Ubuntu / Debian systems (see comment in patch).

This always calls update-initramfs for deb-based systems.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.