Start from a bzroot/bzimage

is there any way for lxc/lxd (without VM) to start from a bzimage/bzroot type system?

the contents of the target are:

EFI
bzfirmware
bzfirmware.sha256
bzimage
bzimage.sha256
bzmodules
bzmodules.sha256
bzroot
bzroot-gui
bzroot-gui.sha256
bzroot.sha256
config
memtest
syslinux

Thanks!

bzimage is a kernel, so no, you can’t boot a different kernel in a container.

Now if you just care about the userspace side of things, you may be able to unpack bzroot and import that as a container rootfs.

1 Like

that sounds very promising, I saw a mention of unpacking bzroot on my google-spree, but not sure how I’d import that afterwards, is there some docs? thanks!

What storage driver are you using?

directory

Easiest is to use our lxd-migrate tool. We have a static build of it available at Release LXD 5.3 · lxc/lxd · GitHub

You can tell it to import a container and then give it the path to your unpacked rootfs.

1 Like

See Using lxd-migrate to convert a physical host to a container for usage example.

2 Likes

thanks that seems to have made it work! though is there a way to attach to console early or redirect all output to a file? by the time I attach it’s already errored out and I can’t get the full bootlog this way to see what paths I need to passthrough for it to work

There is lxc start --console.

1 Like

so if there’s no output up until the error message with that flag, that means there’s no other output prior?