Where can I configure which binaries update-initramfs copies into the /sbin directory inside the initrd image?
I have been looking under /etc/initramfs-tools and /usr/lib/initramfs-tools but couldn't find the list of binaries anywhere
# grep -ri sbin /etc/initramfs-tools
# grep -ri sbin /usr/lib/initramfs-tools
#
You have to use the entries in
/usr/share/initramfs-tools/hooks
. These files are executed when you typeupdate-initramfs
. Create your own hook script or remove scripts.Another folder is
/etc/initramfs-tools/hook
From
man initramfs-tools
Note, the hook-scripts are part of the packages, e.g.
kmod
. The package creates the filekmod
in/usr/share/initramfs-tools/hooks
.Sample script
As you can see, the hook-script copies all files in
/lib/modprobe.d/
intoinitramfs/lib/modprobe.d/
and
modprobe
intoinitramfs/sbin
Your own
initrd.img
with one filefoo
Check the content of your
initrd.img
And with
ls
you should see one file