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

Add example for kernel replacement #60

Closed
plata opened this issue Apr 30, 2023 · 11 comments
Closed

Add example for kernel replacement #60

plata opened this issue Apr 30, 2023 · 11 comments
Labels
type: discussion Questions, proposals and info that requires discussion. type: docs Related to documentation and information.

Comments

@plata
Copy link
Contributor

plata commented Apr 30, 2023

I'm trying to use the linux-surface kernel.

In a VM, the following works:

sudo wget -O /etc/yum.repos.d/linux-surface.repo \
    https://pkg.surfacelinux.com/fedora/linux-surface.repo
wget https://github.com/linux-surface/linux-surface/releases/download/silverblue-20201215-1/kernel-20201215-1.x86_64.rpm
rpm-ostree override replace ./*.rpm

see linux-surface/linux-surface#1128

However, in the Containerfile:

RUN wget -O /etc/yum.repos.d/linux-surface.repo https://pkg.surfacelinux.com/fedora/linux-surface.repo && \
    wget https://github.com/linux-surface/linux-surface/releases/download/silverblue-20201215-1/kernel-20201215-1.x86_64.rpm  && \
    rpm-ostree override replace ./*.rpm && \
    rpm-ostree install surface-secureboot

This shows an error when generating initramfs during the build. Interestingly, the build still succeeds but after rebasing to the image, it boots with kernel panic.
kernel panic

The error:

dracut: No '/dev/log' or 'logger' included for syslog logging
dracut: Executing: /usr/libexec/rpm-ostree/wrapped/dracut --no-hostonly --kver 6.2.13-1.surface.fc38.x86_64 --reproducible -v --add ostree -f /tmp/.tmpOqYwdG/initramfs.img
dracut: /lib/modules/6.2.13-1.surface.fc38.x86_64//modules.dep is missing. Did you run depmod?
error: rpm-ostree kernel-install wrapper: Running dracut: Failed to generate initramfs (via dracut) for for kernel: 6.2.13-1.surface.fc38.x86_64: ExitStatus(unix_wait_status(256))

I tried to follow https://github.com/coreos/layering-examples/blob/main/replace-kernel/Containerfile but it gives the same issue.

RUN rpm-ostree override replace https://github.com/linux-surface/linux-surface/releases/download/fedora-38-6.2.13-1/kernel-surface-6.2.13-1.fc38.x86_64.rpm \
                                https://github.com/linux-surface/linux-surface/releases/download/fedora-38-6.2.13-1/kernel-surface-devel-6.2.13-1.fc38.x86_64.rpm

I don't think that this is specific to that kernel, so having some guideline on how to replace the kernel would be greatly appreciated.

@xynydev xynydev added type: docs Related to documentation and information. type: discussion Questions, proposals and info that requires discussion. labels May 2, 2023
@plata
Copy link
Contributor Author

plata commented May 27, 2023

When following the surface-linux guide, I get

error: Could not depsolve transaction; 1 problem detected:
 Problem: package kernel-devel-matched-6.2.15-300.fc38.x86_64 from @System requires kernel-core = 6.2.15-300.fc38, but none of the providers can be installed
  - conflicting requests

This doesn't happen with base quay.io/fedora-ostree-desktops/kinoite. What's the difference in ublue?

@xynydev
Copy link
Member

xynydev commented May 31, 2023

uBlue adds kernel modules, could that be it? I recommend also asking on Discord with the others.

@KE0VVT
Copy link

KE0VVT commented Jun 1, 2023

I used JosSamLoh's script to replace the kernel, but it did not work.

@plata
Copy link
Contributor Author

plata commented Jun 1, 2023

That looks pretty similar to what I tried without success as well.

@xynydev
Copy link
Member

xynydev commented Jul 24, 2023

Closing this issue now. Future efforts towards documentation for kernel replacement in images based on uBlue should be done under ublue-os/website, specifically added under an "Advanced" section in the Tinkerer's guide. In the meanwhile, discuss here https://github.com/orgs/ublue-os/discussions/169

@xynydev xynydev closed this as not planned Won't fix, can't repro, duplicate, stale Jul 24, 2023
b- pushed a commit to briorg/server that referenced this issue Oct 13, 2023
In addition to removing the ZFS RPM build from this repo to consume ZFS RPMs from `ucore-kmods` image, this PR starts building a stock `fedora-coreos` image with only ZFS added.
@plata
Copy link
Contributor Author

plata commented Oct 25, 2023

@plata
Copy link
Contributor Author

plata commented Oct 25, 2023

I've copied the commands but it still doesn't work. Could it be that startingpoint behaves differently?

@xynydev
Copy link
Member

xynydev commented Oct 27, 2023

I've copied the commands but it still doesn't work. Could it be that startingpoint behaves differently?

Are you basing on an image with kmods?

@plata
Copy link
Contributor Author

plata commented Oct 27, 2023

Not quite sure: I based on ghcr.io/ublue-os/kinoite-main:38 should that have kmods?

@xynydev
Copy link
Member

xynydev commented Oct 27, 2023

Yeah, I think that should be fine. There's no reason this shouldn't work AFAIK, so it just depends on diagnosing what kinda errors you're getting.

@plata
Copy link
Contributor Author

plata commented Oct 29, 2023

After looking at the surface workflow and the changes to kmods, my understanding is that I must use *-nokmods for < 39 and *-main for >= 39.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: discussion Questions, proposals and info that requires discussion. type: docs Related to documentation and information.
Projects
None yet
Development

No branches or pull requests

3 participants