diff options
-rwxr-xr-x | builder/build-initramfs.sh | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/builder/build-initramfs.sh b/builder/build-initramfs.sh index f44f438c..d1a8017f 100755 --- a/builder/build-initramfs.sh +++ b/builder/build-initramfs.sh @@ -142,35 +142,19 @@ parse_command_line() { ## endregion ## region helper initialize_dracut() { - # First check what version to get - # Autodetect the kmod version present on the system to decide which dracut version to get - # * v47 requires kmod >= 23 (Available in Ubuntu 18.04) - # * v46 works with kmod == 20 (CentOS 7.5 only provides kmod v20) - if [ "$(pkg-config --modversion libkmod)" -ge 23 ]; then - dracut_version="047" - else - dracut_version="046" - fi - dracut_resource_url="https://www.kernel.org/pub/linux/utils/boot/dracut/dracut-$dracut_version.tar.gz" - if [[ ! -f "${_root_dir}/dracut/install/dracut-install" ]]; then - mkdir --parents "${_root_dir}/dracut" - echo "Download and extract dracut version $dracut_version" - curl --location "$dracut_resource_url" | tar --extract --gzip \ - --directory "${_root_dir}/dracut" --strip-components 1 - pushd "${_root_dir}/dracut" - # NOTE: On virtualbox shared folder symlinks are not allowed. - # NOTE: make the dracut-install binary (dracut-install resolves - # dependencies etc.) - echo 'Compiling dracut.' - ./configure - make install/dracut-install - # NOTE: We have to copy the binary to current instead of symlinking - # them since this feature isn't supported in shared virtual box machine - # folders. - # If symlinks would be available we could simply use: - # >>> make dracut-install - popd - fi + pushd "${_root_dir}/dracut" + # NOTE: On virtualbox shared folder symlinks are not allowed. + # NOTE: make the dracut-install binary (dracut-install resolves + # dependencies etc.) + echo 'Compiling dracut.' + ./configure + make install/dracut-install + # NOTE: We have to copy the binary to current instead of symlinking + # them since this feature isn't supported in shared virtual box machine + # folders. + # If symlinks would be available we could simply use: + # >>> make dracut-install + popd cp "${_root_dir}/dracut/install/dracut-install" \ "${_root_dir}/dracut/dracut-install" return $? |