lima icon indicating copy to clipboard operation
lima copied to clipboard

Expose Linux kernel command line

Open LaszloGombos opened this issue 2 years ago • 7 comments

Description

Expose the linux kernel command line in limactl start.

qemu

-append cmdline
Use cmdline as kernel command line

VZLinuxBootLoader

LaszloGombos avatar Nov 19 '23 01:11 LaszloGombos

For QEMU, we already have this: https://github.com/lima-vm/lima/blob/a21b5f3bbcb63a37987a328e63d8a1a9f1c2e098/pkg/limayaml/limayaml.go#L80-L83

AkihiroSuda avatar Nov 20 '23 01:11 AkihiroSuda

First time contributor but I'd like to work on a PR for this issue, could it be assigned to me?

ericdbishop avatar Dec 03 '23 18:12 ericdbishop

First time contributor but I'd like to work on a PR for this issue, could it be assigned to me?

Sure, thank you!

jandubois avatar Dec 03 '23 20:12 jandubois

For QEMU, we already have this:

https://github.com/lima-vm/lima/blob/a21b5f3bbcb63a37987a328e63d8a1a9f1c2e098/pkg/limayaml/limayaml.go#L80-L83

Shouldn't you be able to specify kernel cmdline options without including the File struct parameters? It seems like this is only used in a very specific instance to run u-boot:

https://github.com/lima-vm/lima/blob/b453dedb757e5fc1e249f352d0812d008e66fa3f/examples/experimental/riscv64.yaml#L14-L19

Could I move cmdline to the top-level of the config? Or is there another way you'd suggest making it possible to add cmdline to the config without the file location?

ericdbishop avatar Dec 04 '23 18:12 ericdbishop

Shouldn't you be able to specify kernel cmdline options without including the File struct parameters?

How to specify vmlinuz then?

AkihiroSuda avatar Dec 04 '23 19:12 AkihiroSuda

So in an instance where you specify kernel cmdline options, you want it to be a requirement to specify a file for the kernel? Just want to make sure that is the intended behavior. It seemed to me like those things shouldn't necessarily be dependent on each other.

ericdbishop avatar Dec 06 '23 21:12 ericdbishop

So in an instance where you specify kernel cmdline options, you want it to be a requirement to specify a file for the kernel? Just want to make sure that is the intended behavior.

Yes

It seemed to me like those things shouldn't necessarily be dependent on each other.

  • How to specify cmdline without vmlinuz? Theoretically you could parse VFAT/ext4/XFS and grub.cfg to extract vmlinuz from qcow2, but its implementation cost is extremely high.

  • How to boot vmlinuz without cmdline?

AkihiroSuda avatar Dec 07 '23 09:12 AkihiroSuda