Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to run a custom kernel? #1767

dimaqq started this conversation in General
Aug 30, 2023 · 2 comments · 1 reply
Discussion options

Hi all, I'm new to Lima, and I like it very much so far.

There's one use case I'd like to cover, that is to run newest Linux kernels (6.5.0) or possibly kernels built from tree (e.g. bpf-next).

What template would be most suitable, and how to get the vm to boot the cooked kernel instead of the external kernel?

Also... is Lima a good tool for this job?

You must be logged in to vote

Replies: 2 comments 1 reply

Comment options

It might be overkill, you can probably get started using just QEMU (with the -kernel parameter)?

https://qemu-project.gitlab.io/qemu/system/linuxboot.html

But there was a feature added for the "riscv64" platform support, to use a separate kernel...

There you can specify a location to be used, instead of whatever is present in the cloud image

You must be logged in to vote
0 replies
Comment options

For now, I've started using UTM, booted a livecd, made a "hard disk install" to /dev/vda and that seems to work.

I was wondering if I could do this within context of lima, and maybe keep all the other useful integrations (shared dirs, logs, k8s, colima, etc...)

You must be logged in to vote
1 reply
Comment options

The scope depends a bit if you want to replace the kernel of an existing distribution, or if you want to make your distribution (construct your own rootfs as well). The major requirement is that you need support for cloud-init, but it can be hacked...

Most distributions allow you to install different kernels using the normal package manager, and then you only need to reboot after installing it. You can either do that in the provision scripts, or make your own image where you replace the kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /