Ubuntu Forums Archive Viewer

How to add my kernel module to the last

Archived thread 1173430 from Ubuntu Dev Link Forum. Markdown source: Ubuntu_Dev_Link_Forum/thread_1173430_How_to_add_my_kernel_module_to_the_last.md

Original URL About this archive
#1

Hi all,

How do I add my kernel module to the last of kernel module list? I have tried with initramfs tools by adding my kernel driver to module file, in initramfs.conf [module=most] and calling update-initramfs -u -v. update-initramfs including my module in the zip (built) file, but during boot up my driver is loaded very early. Basically I want to load it as last module, but dont want to load from /etc/modules.

However I could build update-initramfs successfully - following way, But it does not look quite right.

1) update-initramfs -u -v > abc [with module=most] 2) get all the module from abc in the same order (I tried lsmod to list, it did not work) 3) appended the list to initramfs-tools\module 4) append my module name to initramfs-tools\modules [last] 5) in initramfs.conf, module=list 6) update-initramfs -u -v

This is the only one workaround I coud use.

Thanks in advance