I’ve been working on this topic for many hours, now. I already have experience with Kernel compiling on “regular” linux systems, but I have a small embedded box here, which has Ubuntu Core installed.
Ubuntu Core 16 comes with Kernel 4.4, but I need some more advanced Kernel as 4.4 is lacking a feature, that I need.
First thought: Why not download the Ubuntu Core 18 kernel snap and just try to install that? I mean, after all it’s just a kernel and on “regular” Linux I never had trouble with updating a kernel…
After rebooting with the Ubuntu Core 18 Kernel, all I get is:
error invalid xz chunk
you need to load the kernel first
OK. Maybe some change from Ubuntu Core 16 to Ubuntu Core 18, so I had a look at:
I installed Ubuntu 16 LTS into a virtual machine, downloaded the latest kernel from kernel.org. Added the missing files from the sample-kernels repository (I also had to disable building with firmwares) and ran “snapcraft”. After some time I finally got a finished kernel snap.
But now, when trying to install (with --dangerous), all I get is:
cannot replace signed kernel snap with an unasserted one
I’m out of ideas now. Can someone help me with getting the kernel updated on my Ubuntu Core 16 system?
Alternatively, you can try building your own Ubuntu Core image with your custom kernel snap preinstalled. I’m afraid I don’t know of any docs for how to do that beyond this which is robotics-focused (and a tad old), but it should still be helpful. This article may also prove helpful.
This is a bug in 16.04’s version of GRUB, fixed upstream a while back. We should be able to cherry-pick that fix so that it makes its way into a newer revision of the core snap; I’ll see if I can organise that.
I think this would need to be in the gadget snap rather than the core snap,
wouldn’t it? In which case, fixing this is also blocked on having gadget
snap updates in snapd.
Ah, I suppose it would. Well, that’s not ideal, and I can’t do much about that side of things - but it’s probably still a good idea to fix this in xenial’s grub2 so that at least new devices won’t have this problem.