Skip to content

Set root in kernel cmdline when there is no initramfs

I had to figure out the rootfs device for supporting the depthcharge bootloader, so I had moved some code around in my other MR to do that. Later, support for running flash-kernel without an initramfs got merged. Depthcharge can also work without an initramfs, but then we need to inject a root argument into the kernel command line. Presumably, it's the same for most other methods as well. I understand that bootspec is configured to do add a root argument by itself, but I think doing so independent of the boot method is better.

I have tested this in combination with my depthcharge code and a custom kernel; removing the initrd.img-* file and running flash-kernel successfully injects a correct root argument (root=PARTUUID=*) but I also had to add rootwait to /etc/default/flash-kernel to successfully boot. I don't have any other device I can test with, but I don't think it'd fail on any other.

I've uploaded a newer version since then, but don't have a flash-kernel-running device to test.

Edited by Alper Nebi Yasak

Merge request reports

Loading