eed30adc48
The element builds dracut from source on Ubuntu because the Ubuntu dracut package is broken and very old, so it can't be installed properly and causes a number of other issues that are fixed by using a newer version of Dracut. This initial version should work in virtualized environments. Further validation of its suitability for real baremetal deployments will need to be done in the future, but this should be sufficient to enable that work. Regarding Dracut specifically, in order to limit the changes needed in the existing scripts this element continues to use a cut down version of the /init script that we were building for the existing ramdisk. However, instead of running it as pid 0 it is run as a Dracut pre-mount hook. This allows Dracut to set up all of the hardware and system bits, while falling early enough in the Dracut sequence to complete the deployment before Dracut would try to boot off the hard disk. bp tripleo-juno-dracut-ramdisks Change-Id: I144c8993fe040169f440bd4f7a428fdbe3d745cf
24 lines
615 B
Bash
Executable file
24 lines
615 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -eux
|
|
set -o pipefail
|
|
|
|
DRACUT_NETWORK="dracut-network"
|
|
if [ 'ubuntu' = "$DISTRO_NAME" ]; then
|
|
DRACUT_NETWORK=
|
|
# Install Dracut from source because the packaged version is
|
|
# broken and old. For Dracut builds we throw away the chroot
|
|
# anyway so it won't matter if we've installed some build deps.
|
|
install-packages build-essential arping
|
|
pushd /tmp
|
|
tar xJvf dracut.tar.xz
|
|
pushd dracut-$DRACUT_VERSION
|
|
./configure
|
|
make
|
|
make install
|
|
popd
|
|
popd
|
|
fi
|
|
|
|
PACKAGES=$(pkg-map --element dracut-ramdisk ncat tftp)
|
|
install-packages $DRACUT_NETWORK wget $PACKAGES
|