KIWI Image Description Encrypted Disk

A virtual disk image can be partially or fully encrypted using the LUKS extension supported by KIWI. A fully encrypted image also includes the data in /boot to be encrypted. Such an image requests the passphrase for the master key to be entered at the bootloader stage. A partialy encrypted image keeps /boot unencrypted and on an extra boot partition. Such an image requests the passphrase for the master key later in the boot process when the root partition gets accessed by the systemd mount service. In any case the master passphrase is requested only once.

Update the KIWI image description as follows:

  1. Software packages

    Make sure to add the following package to the package list

    Note

    Package names used in the following list match the package names of the SUSE distribution and might be different on other distributions.

    <package name="cryptsetup"/>
    
  2. Image Type definition

    Update the vmx image type setup as follows

    Full disk encryption including /boot:
    <type image="vmx"
        image="vmx"
        filesystem="ext4"
        bootloader="grub2"
        luks="linux"
        bootpartition="false">
    </type>
    
    Encrypted root partition with an unencrypted extra /boot partition:
    <type image="vmx"
        image="vmx"
        filesystem="ext4"
        bootloader="grub2"
        luks="linux"
        bootpartition="true">
    </type>
    

    Note

    The value for the luks attribute sets the master passphrase for the LUKS keyring. Therefore the XML description becomes security critical and should only be readable by trustworthy people