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

Fail to install Custom Kernel because of TMPFS usage instead of being in root filesystem #122

Closed
tulilirockz opened this issue Mar 16, 2024 · 0 comments · Fixed by #123
Closed
Assignees
Labels
state: in-progress Work has started type: bug Something isn't working.

Comments

@tulilirockz
Copy link
Contributor

tulilirockz commented Mar 16, 2024

Hello! I've been trying to replace the default kernel on a Fedora CoreOS-like image (rpm-ostree based) and I havent been able to do so. Dracut errors out with a invalid cross-device link (os error 18) issue when installing the kernel-fsync package from Sentry. Apparently the kernel package tries to generate the initramfs image and hardlinks it from /tmp over to /path/to/initramfs and fails because the filesystem the initramfs image is is different from the rootfs. A fix for this would be to generate all RUN statements without --mount=type=tmpfs,target=/tmp and with a rm -rf /tmp/* /var/tmp/* at the end of the statements.

image

Minimal reproduction:

FROM quay.io/fedora/fedora-coreos:stable

ARG FEDORA_MAJOR_VERSION=39

# Try replacing the /var directory with /tmp, it wont work anymore.
RUN --mount=type=tmpfs,target=/var \
    curl "https://copr.fedorainfracloud.org/coprs/sentry/kernel-fsync/repo/fedora-${FEDORA_MAJOR_VERSION}/sentry-kernel-fsync-fedora-${FEDORA_MAJOR_VERSION}.repo" >> /etc/yum.repos.d/_copr_sentry-kernel-fsync.repo && \
    rpm-ostree cliwrap install-to-root / && \
    rpm-ostree override replace \
    --experimental \
    --from repo=copr:copr.fedorainfracloud.org:sentry:kernel-fsync \
        kernel \
        kernel-core \
        kernel-modules \
        kernel-modules-core \
        kernel-modules-extra \
        kernel-uki-virt && \
    rm -rf /tmp/* /var/tmp/* && \
    ostree container commit
    

This issue is basically what #119 says, but with a bit more detailed info about what is happening.

@gmpinder gmpinder self-assigned this Mar 16, 2024
@gmpinder gmpinder added type: bug Something isn't working. state: in-progress Work has started labels Mar 16, 2024
@gmpinder gmpinder linked a pull request Mar 17, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: in-progress Work has started type: bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants