• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • Life always offers you a second chance ... Its called tomorrow !!!

    Sunday, October 02, 2016

    How to load modules from kernel during boot in Linux

    Recently I ran into a situation where my kernel was not loading vmxnet3 module during startup of the system hence I had to change the network card module from default vmxnet3 to E1000 on my VMware setup for each server.

    If you are also facing similar problem or you want to load any other kernel module during startup(boot) of the Linux machine follow below steps.

    NOTE: I am using SuSE Linux Enterprise System 11 SP4 hence the files and the commands used might not work on other variant of Linux.

    Verify if vmxnet3 module is provided by kernel
    # find / -name vmxnet3*.ko
    /lib/modules/3.0.101-71.1.10543.0.PTF-default/kernel/drivers/net/vmxnet3/vmxnet3.ko

    A more generic command to list kernel modules is
    # modprobe --list | grep -i vmxnet
    /lib/modules/3.0.101-71.1.10543.0.PTF-default/kernel/drivers/net/vmxnet3/vmxnet3.ko

    So this validates that vmxnet3 is available within my kernel, so lets check if it is installed/loaded on my system
    # lsmod | grep -i vmxnet3
    If you don't get any output so it means vmxnet3 module is not loaded on your machine

    Add the module name with "MODULES_LOADED_ON_BOOT" variable in the below file
    # vi /etc/sysconfig/kernel
    MODULES_LOADED_ON_BOOT=" ipmi_devintf ipmi_si
    vmxnet3"

    Save and exit the file.

    You can validate your configuration changes followed by a reboot with below command
    # lsmod | grep -i vmxnet
    vmxnet3                54163  0

    As you see vmxnet3 module is loaded now.

    If you want to avoid doing a reboot then you can manually load/activate a module using below command
    # modprobe vmxnet3
    This will activate your vmxnet3 module
    # lsmod | grep -i vmxnet vmxnet3                54163  0


    Follow the below links for more tutorials

    How to find the path of any command in Linux
    How to configure a Clustered Samba share using ctdb in Red Hat Cluster
    How to delete an iscsi-target from openfiler and Linux
    How to perform a local ssh port forwarding in Linux
    How to use yum locally without internet connection using cache?
    What is umask and how to change the default value permanently?
    Understanding Partition Scheme MBR vs GPT
    How does a successful or failed login process works in Linux
    How to find all the process accessing a file in Linux
    How to exclude multiple directories from du command in Linux
    How to configure autofs in Linux and what are its advantages?
    How to resize software raid partition in Linux
    How to configure Software RAID 1 mirroring in Linux
    How to prevent a command from getting stored in history in Linux

    0 comments:

    Post a Comment