There is another issue though. After I successfully generated the pc-kernel snap.
I created the image using that pc-kernel snap with “ubuntu-image”.
I boot the image with VirtualBox and it shows /kernel.efi not found. I found this post: Custom core20 image: boot error: file '/kernel.efi' not found. However, the kernel.efi is for kernel version 5.4.0.74. I tried to copy the kernel.efi into my pc-kernel snap (prime the kernel.efi) and build the image again, it does boot up, however, there’s no network access. The first-time configuration page cannot detect any of the network interfaces.
I’m suspecting the kernel.efi somehow doesn’t fit my kernel. May I know if there’s any way to generate the kernel.efi specifically for my kernel source? Thanks!