Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initrd-setup-root-after-ignition: Ensure /etc/flatcar/sysext exists #89

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dracut/99setup-root/initrd-setup-root-after-ignition
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ for NAME in $(grep -h -o '^[^#]*' /sysroot/etc/flatcar/enabled-sysext.conf /sysr
echo "Did not find ${ACTIVE_EXT}" >&2
systemctl start --quiet systemd-networkd systemd-resolved
download_and_verify "flatcar-${NAME}.raw"
# Note: This folder is created opaque since it does not exist in the underlay
# For cases where we ship it later, it's best to add a "attr" call in flatcar-postinst
# because there are many ways how the folder might have been created
mkdir -p "/sysroot/etc/flatcar/sysext/"
jepio marked this conversation as resolved.
Show resolved Hide resolved
mv "/sysroot/flatcar-${NAME}.raw" "/sysroot/${ACTIVE_EXT}"
fi
if [ -e "/sysroot/${ACTIVE_EXT}" ]; then
Expand Down
3 changes: 3 additions & 0 deletions update-bootengine
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ DRACUT_ARGS=(
--omit lvm
--omit multipath
--omit network
--omit zfs
--add iscsi
--add-drivers "loop brd drbd nbd rbd mmc_block xen-blkfront zram libarc4 lru_cache zsmalloc"
)
Expand Down Expand Up @@ -111,6 +112,8 @@ export DRACUT_NO_XATTR

mkdir -p "${USE_CHROOT}$(dirname "$CPIO_PATH")"
if [[ -n "$USE_CHROOT" ]]; then
# ROOT interferes with some utilities after chroot (gcc-config).
unset ROOT
echo "Running dracut in $USE_CHROOT"
LC_ALL=C chroot "$USE_CHROOT" ldconfig -X
LC_ALL=C chroot "$USE_CHROOT" dracut "${DRACUT_ARGS[@]}" "$CPIO_PATH"
Expand Down