3

I am booting a CentOS image via NFS, which requires a custom initramfs from dracut, with some extra modules. I want the kernel to get updated normally, using yum update. This will automatically generate a new initramfs each time the kernel is updated, which doesn't include any of my extra modules.

  • How/when does yum update generate the new initramfs?
  • Can the system be configured so that yum update includes my custom modules every time?

The goal is to avoid needing yum update + dracut -m "etc" name.img kernel.ver every time we update, since there will be many different system images that we need to maintain.

Dan
  • 133
  • 3

1 Answers1

0

I'm confused by dracut lately...

How/when does yum update generate the new initramfs?

AFAIK, there's posttrans section in kernel.rpm. such as

%{_sbindir}/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --dracut --depmod --update %{KVRA}%{?-v:.%{-v*}}

In another word, just after all other work done in a kernel package, a new initrd is generated.

Can the system be configured so that yum update includes my custom modules every time?

yes, please refer to dracut doc https://linux.die.net/man/5/dracut.conf

Kevin Chan
  • 56
  • 4