Add element to rebuild dracut enabling modules

To support TripleO whole disk images (with enabled
security), we need lvm and crypt modules.
So creating that element in tripleo, that will install the
needed packages, and will rebuild the image to add the
modules we need.

Change-Id: I1b0dd384a1981acffd64652708ec21323f5e795a
Partial-Bug: #1655681
This commit is contained in:
Yolanda Robla Mota 2017-01-12 15:20:51 +01:00
parent b9fb5326fd
commit 4c51932d2e
4 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,7 @@
================
overcloud-dracut
================
Rebuilds initramfs adding all the modules needed to support
TripleO needs in terms of booting whole disk images with
enabled security. We need lvm and encryption on the images,
so adding related packages and modules to enable those.

View File

@ -0,0 +1,2 @@
package-installs
select-boot-kernel-initrd

View File

@ -0,0 +1,13 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
RET=$(select-boot-kernel-initrd)
KERNEL_VERSION=`echo ${RET%:*} | sed 's/vmlinuz-//g'`
RAMDISK=/boot/${RET#*:}
dracut --force --add "crypt lvm" $RAMDISK $KERNEL_VERSION

View File

@ -0,0 +1,2 @@
cryptsetup:
lvm2: