ceaf79d191
To ensure dracut does not load nouveau we need to explicitly disable it via omit_drivers. This change adds a method to drop in arbitary dracut conf files to an element which are picked up by dracut-regenerate and included in the chroot where we run dracut. The disable-nouveau element just adds a conf file with `omit_drivers += " nouveau"` The default dracut conf files in /usr/lib include a similar file to omit the nvidia kernel modules. Change-Id: I6375e4843fd08d1410141fbbd8658042dcd5ad05 Closes-bug: 1842664
24 lines
561 B
Bash
Executable File
24 lines
561 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-1} -gt 1 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if [ ! -d $TMP_MOUNT_PATH/etc/dracut.conf.d ]; then
|
|
sudo mkdir -p $TMP_MOUNT_PATH/etc/dracut.conf.d
|
|
fi
|
|
|
|
eval declare -A image_elements=($(get_image_element_array))
|
|
|
|
for i in "${!image_elements[@]}"; do
|
|
element=$i
|
|
element_dir=${image_elements[$i]}
|
|
|
|
if [ -d "${element_dir}/dracut.conf.d/" ]; then
|
|
echo "Copying dracut config from ${element_dir}"
|
|
sudo cp ${element_dir}/dracut.conf.d/*.conf $TMP_MOUNT_PATH/etc/dracut.conf.d/
|
|
fi
|
|
done
|