Ubuntu
For Ubuntu,
dpkg-reconfigurethe relevantlinux-imagepackage.- This runs
depmodifdkmshas a module to install. - This always runs
update-initramfsandupdate-grub.
- This runs
- Use the following commands as needed.
depmod -a $(uname -r) # if this kernel's modules changed
update-initramfs -u -k all # updates existing kernels' initramfs
update-grub # only if have made changes to /etc/default/grub as wellReferences
/var/lib/dpkg/info/linux-image-$(uname -r).postinst/etc/kernel/postinst.d/*
RHEL 10
depmod -a $(uname -r) # if this kernel's modules changed
dracut -fv /boot/initramfs-$(uname -r).img $(uname -r)