When is it necessary to rebuild the initrd (Linux initial ramdisk)?
Asked Answered
E

1

6

Background: I'm developing a DKMS package for my kernel module. The DKMS manpage contains the following sentence:

REMAKE_INITRD = This directive specifies whether your initrd should be remade after the module is installed onto the kernel.

Question: When is it necessary to remake the initrd? How do I find out if it is necessary to remake the initrd after installing my module onto the kernel?

Edbert answered 21/8, 2016 at 19:20 Comment(0)
S
8

In general, it is only necessary to remake the initrd if you need to add or update a module necessary to mount the root filesystem. Once the root filesystem is mounted, the kernel can load other modules dynamically using the normal mechanism.

Things typically included in the initrd are disk device drivers (scsi, sata, fibre channel, etc), filesystem drivers (like ext4, xfs, btrfs, etc), and higher level block device drivers like LUKS (for encrypted devices), LVM, and so forth.

If your module doesn't fall into this category of drivers then it doesn't need to be on the initrd and you don't need to rebuild the initrd.

San answered 21/8, 2016 at 20:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.