Hi,
I built a custom image following the documentation from https://ubuntu.com/core/docs/custom-images . The custom model assertion I used to build the image looks like:
{
"type": "model",
"series": "16",
"authority-id": "my-id",
"brand-id": "my-id",
"model": "custom-ubuntu-core-20-amd64",
"architecture": "amd64",
"timestamp": "2021-02-17T20:33:40+00:00",
"base": "core20",
"grade": "signed",
"snaps": [
{
"name": "pc",
"type": "gadget",
"default-channel": "20/stable",
"id": "UqFziVZDHLSyO3TqSWgNBoAdHbLI4dAH"
},
{
"name": "pc-kernel",
"type": "kernel",
"default-channel": "latest/stable",
"id": "pYVQrBcKmBa0mZ4CCN7ExT6jH8rY1hza"
},
{
"name": "core20",
"type": "base",
"default-channel": "latest/stable",
"id": "DLqre5XGLbDqg9jPtiAhRRjDuPVa5X1q"
},
{
"name": "snapd",
"type": "snapd",
"default-channel": "latest/stable",
"id": "PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4"
},
{
"name": "htop",
"type": "app",
"default-channel": "latest/stable",
"id": "hJmReLmgXSUj4SF7WhyTVRV6IzUa4QUZ"
}
]
}
Once the image was generated I tested it using QEMU with the following command:
qemu-system-x86_64 -enable-kvm -smp 2 -m 1500 -netdev user,id=mynet0,hostfwd=tcp::8022-:22,hostfwd=tcp::8090-:80 -device virtio-net-pci,netdev=mynet0 -drive file=custom-model-image20/pc.img,format=raw -drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on
But it fails booting with the following message:
error: file '/kernel.efi' not found.
So, the kernel never gets loaded and the process doesn’t pass from the GRUB menu.
Does anyone know why that’s failing if the snaps are all from stable channels?
Thanks.