简体   繁体   中英

How to load kernel module after providing invalid parameter at boot?

Long story short, I am on Centos7 and want to avoid loading a kernel module before it has been replaced by another. I am netbooting from an image I cant change atm. so I cant make any modifications except kernel params really.

I have tried "modprobe.blacklist=kernelmodule" but it doesn't seem to do what I want. If I blacklist a module that is usually loaded at boot, it's still loaded even though "modprobe --show-config | grep black" shows it as blacklisted.

I found another way though. If I provide an invalid parameter at boot the module is not loaded. Eg if I give "kernelmodule.blabla=yes" as a kernel boot parameter. But this way the module can't even be loaded with modprobe after boot since it has an invalid parameter. Is there any way to make the kernel forget about the parameter ? Or maybe there is a better way ?

正如Peter L.所说,似乎可以使用insmod来避免内核强制使用任何参数。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM