godarch / darch

A tool for building and booting stateless and immutable images, bare metal.
https://godarch.com/
MIT License
832 stars 32 forks source link

Arch Linux kernel installation Confusion #52

Closed elovin closed 4 years ago

elovin commented 4 years ago

I installed darch through the aur and pulled the arch linux base image, the documentation states that I have to install the kernel and rebuild the initramfs, but I dont get in what context. I suppose I have to install the kernel within the containerd image which is confusing to me since I only know docker images.

So am I supposed to install the kernel inside the arch linux image or somehow hook my host system kernel into the image ?

pauldotknopf commented 4 years ago

If your base image inherits godarch/arch (here), then the initramfs scripts are already setup (see here).

What documentation are you referring to?

elovin commented 4 years ago

If your base image inherits godarch/arch (here), then the initramfs scripts are already setup (see here).

What documentation are you referring to?

Thanks for the quick reply.

I'm referring to this part of the documentation.

I'm trying to run the base image directly (I want to try it out before I extend it) so I pulled godarch/arch and then tried to upload it sudo darch stage upload godarch/arch which results in cp: cannot stat '/boot/vmlinuz-linux': No such file or directory.

pauldotknopf commented 4 years ago

I'm referring to this part of the documentation.

Ah. You initramfs hooks are in the image. Just install the kernel and run mkinitcpio -p linux in the image and you should be good.

I'm trying to run the base image directly

Yeah, you need to create a derived image that has the kernel installed. Besides, you'd want to do some other stuff as well. Checkout my old Arch recipes here.

elovin commented 4 years ago

@pauldotknopf Thanks I will try that