[kata-dev] Dracut initramfs for distro packaging

Stefan Hajnoczi stefanha at redhat.com
Wed Jun 19 10:38:41 UTC 2019

On Wed, Jun 12, 2019 at 07:06:16PM +0200, Marco Vedovati wrote:
> On 5/7/19 10:38 PM, Jose Carlos Venegas Munoz wrote:
> > So I think would need more feedback from all the community and also
> > from linux distributions in general so we can have a solution that 
> > works better for all.
> Hi Jose Carlos, Stefan,
> I am providing a follow-up, since I also faced packaging problems trying
> to provide Kata image and kernel packages in openSUSE:
> - w.r.t. kernel: providing a "third party" kernel package along with the
> official distro kernels is something not usually possible for various
> reasons, such as the need to maintain a strict control over how the
> kernels are built/patched/maintained.
> - w.r.t. image: lack of standardized/simple ways of generating a image
> and to provide it inside a package.
> I've evaluated the use of dracut generated initramfs starting from
> Stefan PoC, and in the few tests I did it seems a viable solution,
> keeping in mind that at the moment the main use case would be to provide
> something that is packaging friendly.
> With respect to the distro kernels compatibility, the goal would be to
> reuse a vanilla or a generic kvm kernel that is already provided by the
> distribution, and have dracut load in the initramfs the kernel modules
> required by Kata.

Yes, couldn't agree more.

> > Here some question related with dracut usage:
> > 
> > 1. Is it possible to build a disk image?
> You can build a disk image with DAX  using as base the rootfs included
> in the initramfs.
> > 2. Is it possible to have a custom rootfs with packages I want?
> > Today we require system + agent + iptables + chrony. But also
> > we support not having system but the agent as init. Also, users 
> > may want to add additional binaries in the future (to be part of the
> > official image or just for hacking). 
> Support for agent + iptables + chrony is something that could be
> provided  with a custom dracut modules, or using the dracut overlay (as
> Stefan PoC).
> I have spent some time polishing the tests I did, and I've submitted a
> "RFC" PR to osbuilder to add support for dracut-based initrd / images:
> https://github.com/kata-containers/osbuilder/pull/312
> Hopefully this is a good starting point.

Cool, thanks for doing this!  Adding dracut support to osbuilder is nice
because it may allow distro packagers to share code instead of everyone
inventing their own dracut scripts.

I'm not working on this as a Fedora packager but I hope Fedora folks
will try this approach and contribute.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.katacontainers.io/pipermail/kata-dev/attachments/20190619/86e72c76/attachment.sig>

More information about the kata-dev mailing list