Is "update-initramfs -u" needed after adding or removing a module with "modprobe"?
I guess this is about some Linux distribution that is part of the Debian/Ubuntu family, as update-initramfs
is part of Debian initramfs-tools
.
If the module (and the command to load it) is included in initramfs, then update-initramfs -u
is needed: if you don't do it, initramfs will still contain the old state (= old version of the module and the command to load it).
If you are uncertain whether or not the module is included in initramfs, use the lsinitramfs
command to view the contents of your initramfs. For example:
$ lsinitramfs /boot/initrd.img-4.9.0-5-amd64 |less
However, running update-initramfs -u
should generally never hurt, so if you are uncertain, you can just run it to err on the safe side.
Related videos on Youtube
Kayofeld
Updated on September 18, 2022Comments
-
Kayofeld almost 2 years
Most instructions that I find online about adding or replacing kernel modules in Ubuntu only mention
modprobe
andrmmod
. However, according my experience withe1000e
, the modification is reverted after reboot unless I doupdate-initramfs -u
afterwards. Theman
page ofupdate-initramfs
does not mention modules.So, is it always necessary to run
update-initramfs -u
after replacing kernel modules if I want to have the modified kernel after reboot?