next up previous contents
Next: Specifying Kernel Boot Parameters Up: Mainataing the Kernel Previous: Architectures and Kernel   Contents

Kernel Modules

  1. Kernel image
    [root@kvm4 ~]# ls /boot
    config-2.6.32-71.el6.x86_64         lost+found
    efi                                 symvers-2.6.32-71.el6.x86_64.gz
    grub                                System.map-2.6.32-71.el6.x86_64
    initramfs-2.6.32-71.el6.x86_64.img  vmlinuz-2.6.32-71.el6.x86_64
    
  2. Dynamically loaded modules
    [root@kvm4 ~]# find /lib/modules/`uname -r` -name *.ko | more
    /lib/modules/2.6.32-71.el6.x86_64/kernel/fs/ext4/ext4.ko
    /lib/modules/2.6.32-71.el6.x86_64/kernel/fs/jffs2/jffs2.ko
    /lib/modules/2.6.32-71.el6.x86_64/kernel/fs/fuse/cuse.ko
    .....
    
  3. The currently loaded modules
    [root@kvm4 ~]# lsmod 
    Module                  Size  Used by
    fuse                   66138  0 
    ebtable_nat             1975  0 
    ebtables               18101  1 ebtable_nat
    nfs_acl                 2677  1 nfsd
    auth_rpcgss            44862  1 nfsd
    .....
    
  4. Loads the vfat module
    [root@kvm4 ~]# lsmod | grep fat
    [root@kvm4 ~]# modprobe vfat
    [root@kvm4 ~]# lsmod | grep fat
    vfat                   10646  0 
    fat                    55086  1 vfat
    
  5. Remove the vfat module
    [root@kvm4 ~]# modprobe -r vfat
    [root@kvm4 ~]# lsmod | grep fat
    
  6. Set module parameters manually
    [root@kvm4 ~]# modprobe ecryptfs
    [root@kvm4 ~]# modprobe -r ecryptfs
    [root@kvm4 ~]# cat /var/log/messages | grep ecryptfs
    ## No any message
    
    [root@kvm4 ~]# modinfo ecryptfs
    filename:       /lib/modules/2.6.32-71.el6.x86_64/kernel/fs/ecryptfs/ecryptfs.ko
    license:        GPL
    description:    eCryptfs
    author:         Michael A. Halcrow <mhalcrow@us.ibm.com>
    srcversion:     5A7ADDC1F961E6284ABB2E9
    depends:        
    vermagic:       2.6.32-71.el6.x86_64 SMP mod_unload modversions 
    parm:           ecryptfs_verbosity:Initial verbosity level (0 or 1; defaults to 0, which is Quiet) (int)
    parm:           ecryptfs_message_buf_len:Number of message buffer elements (uint)
    parm:           ecryptfs_message_wait_timeout:Maximum number of seconds that an operation will sleep while waiting for a message response from userspace (long)
    parm:           ecryptfs_number_of_users:An estimate of the number of concurrent users of eCryptfs (uint)
    
    [root@kvm4 ~]# modprobe ecryptfs ecryptfs_verbosity=1
    [root@kvm4 ~]# cat /var/log/messages | grep -i ecryptfs
    Jan  1 13:16:36 kvm4 kernel: eCryptfs verbosity set to 1. Secret values will be written to the syslog!
    
    [root@kvm4 ~]# modprobe -r ecryptfs
    
  7. Set module parameters automatically
    [root@kvm4 ~]# vi /etc/modprobe.d/local.conf
    options ecryptfs ecryptfs_verbosity=1
    [root@kvm4 ~]# modprobe ecryptfs
    [root@kvm4 ~]# cat /var/log/messages | grep -i ecryptfs
    Jan  1 13:16:36 kvm4 kernel: eCryptfs verbosity set to 1. Secret values will be written to the syslog!
    Jan  1 13:23:55 kvm4 kernel: eCryptfs verbosity set to 1. Secret values will be written to the syslog!
    [root@kvm4 ~]# modprobe -r ecryptfs
    



2015-04-13