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

Missing ramdisk when installing new custom kernel #506

Closed
oglok opened this issue May 3, 2024 · 1 comment
Closed

Missing ramdisk when installing new custom kernel #506

oglok opened this issue May 3, 2024 · 1 comment
Labels
area/osintegration Relates to an external OS/distro base image

Comments

@oglok
Copy link

oglok commented May 3, 2024

I have the following Containerfile:

FROM quay.io/flightctl/flightctl-agent-centos:bootstrap

ADD etc etc

RUN rm -rf /opt && \
    mkdir -p /opt/crio
RUN dnf install -y microshift && \
    systemctl enable microshift.service

RUN dnf install -y kernel-5.14.0-427.14.1.blue1.el9_4

ADD systemd-shutdown /usr/lib/systemd/
RUN rm -rf /opt && ln -s /var /opt
RUN [ ! -L /var/run ] && rm -rf /var/run && ln -s /run /var/

/etc contains a repo where the kernel RPM ( kernel-5.14.0-427.14.1.blue1.el9_4 ) is stored. The container image seems to be built successfully. This image is created to be the upgrade of a base one with a very simple Container file:

FROM quay.io/centos-bootc/centos-bootc:stream9
ADD etc etc

RUN dnf install -y flightctl-agent && \
    systemctl enable flightctl-agent.service

## Add your flightctl configuration and certificates
ADD config.yaml /etc/flightctl/
ADD ca.crt /etc/flightctl/certs/
ADD client-enrollment.* /etc/flightctl/certs/

Using bootc upgrade, pulls the new image (the first Containerfile) and after reboot, I see the two ostree options in grub. However, the staged one that is booting now fails. If you enter in the kernel arguments, the initrd line is missing, and the boot partition does not contain the initramfs disk as it should.

[root@localhost ~]# ll /boot
total 8
drwxr-xr-x. 3 root root 4096 Apr 30 15:43 default-28af0175516946659bb525f36bc0fff88ef105a2b4471e1f7ecf7638ea5b57bf
drwxr-xr-x. 3 root root 4096 Apr 30 13:17 default-d341b610f2c5af9c192bccd8453fe5dbe1c2f797a5cfdb683f3222fcef4e6144
[root@localhost ~]# ll /boot/ostree/default-28af0175516946659bb525f36bc0fff88ef105a2b4471e1f7ecf7638ea5b57bf/
total 11664
drwxr-xr-x. 11 root root     4096 Apr 30 15:43 dtb
-rwxr-xr-x.  1 root root 11939803 Apr 30 15:43 vmlinuz-5.14.0-427.14.1.blue1.el9_4.aarch64
[root@localhost ~]# ll /boot/ostree/default-d341b610f2c5af9c192bccd8453fe5dbe1c2f797a5cfdb683f3222fcef4e6144/
total 47416
drwxr-xr-x. 11 root root     4096 Apr 30 13:17 dtb
-rw-r--r--.  1 root root 36562723 Apr 30 13:17 initramfs-5.14.0-437.el9.aarch64.img
-rwxr-xr-x.  1 root root 11981373 Apr 30 13:17 vmlinuz-5.14.0-437.el9.aarch64

The new custom Kernel RPM does have contain the ramdisk, and it can be installed in a standard RHEL with no issue.

Is there anything else we should add to the Containerfile? Is this a feature gap in bootc?

Thanks for your support!

@cgwalters cgwalters added the area/osintegration Relates to an external OS/distro base image label May 4, 2024
@cgwalters
Copy link
Collaborator

Yeah, we have work to do to enable dnf install kernel.rpm, but see coreos/rpm-ostree#4950 and its links for the latest on this.

This is not something today that's within bootc's scope; it's an OS/distribution integration issue.

@cgwalters cgwalters closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
cgwalters pushed a commit to cgwalters/bootc that referenced this issue Nov 5, 2024
…json-1.0.104

build(deps): bump serde_json from 1.0.103 to 1.0.104
cgwalters pushed a commit to cgwalters/bootc that referenced this issue Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/osintegration Relates to an external OS/distro base image
Projects
None yet
Development

No branches or pull requests

2 participants