Operating System/Linux / / 2022. 7. 21. 10:27

Check linux driver installation and remove it manually.

반응형

# Check installed driver

modinfo [options] filename [args]

 

[ options ] 

Option Desc Ex (e1000 driver)
-a, --author Print only "author" field modinfo -a e1000
-d, --description Print only "description" field modinfo -d e1000
-l, --license Print only "license" field modinfo -l e1000
-p, --parameters Print only "parm" field modinfo -p e1000
-n, --filename Print only "filename" field modinfo -n e1000
-0, --null Use \0 instead of \n modinfo -0 e1000
-F, --field=FIELD Print only provided "FIELD" modinfo -F filename e1000
-k, --set-versiion=VERSION Use VERSION instead of "uname -r"  (kernel version) modinfo -k 3.10.0  e1000
-b, --basedir=DIR Use DIR as filesystem root for "/lib/modules" modinfo -b /opt/drive e1000
-V, --version Show this version modinfo -v
-h, --help Show this help modinfo -h

 

ex)

     modinfo e1000

 

# Manually remove the driver

step 1) remove a module from linux kernel

    rmmod 'module name'

    or

    modprobe -r 'module name'

 

step 2) check module file path

    modinfo -n 'module name'

    or

    find /lib/modules/$(uname -r) -name "module name"

 

step 3) remove module file

    rm -rf 'Module file path'

 

step 4) update kernel module dependency information 

    file path : /lib/modules/$(uname -r)/modules.dep

    command : depmod

                       [options]  -a, --all       : Probe all modules

                                      -A, --quick  : Only does the work if there's a new module

 

 

반응형
  • 네이버 블로그 공유
  • 네이버 밴드 공유
  • 페이스북 공유
  • 카카오스토리 공유