게시물 1,376건
   
Manage Kernel Modules
글쓴이 : 최고관리자 날짜 : 2016-11-01 (화) 15:33 조회 : 3792
글주소 :
                                


Kernel 모듈 관리방법
요즘 Linux / Ubuntu 배포판들은 운영체제를 설치할때 왠만한 기본적인 디바이스의 모듈은 알아서 대부분 설치하게된다.
8~9년전 Kernel 2.X Version만 하더라도 필요한 디바이스 모듈이 있다면 별도로 커널컴파일 할일이 잦았는데 요즘은 커널컴파일할일도 부쩍 줄어들었다.
아래 안내하는 커널모듈 명령어 몇개만 알고있어도 왠만한 모듈 관리는 할수있기에 몇가지 적어봅니다.

lsmod : 모듈리스트 출력 
             시스템내에 올라와있는 전체 모듈을 리스트로 보여줍니다.
# lsmod

:: r8169 : 1G NIC 모듈
# lsmod |grep r8169
r8169                  81920  0
mii                    16384  1 r8169


modinfo : 모듈 정보출력
# modinfo r8169


modprobe : 모듈을 직접적으로 추가, 삭제
커널모듈 기본경로 /lib/modules/`uname -r`/kernel/drivers/
# ls /lib/modules/`uname -r`/kernel/drivers/

# uname -r
4.4.0-47-generic

:: r8169 모듈 삽입 
# modprobe r8169

:: r8169 모듈 삭제
# modprobe -r r8169

:: 모듈종속성 체크
# modprobe --show-depends r8169
insmod /lib/modules/4.4.0-47-generic/kernel/drivers/net/mii.ko 
insmod /lib/modules/4.4.0-47-generic/kernel/drivers/net/ethernet/realtek/r8169.ko


# modprobe --help
Usage:
modprobe [options] [-i] [-b] modulename
modprobe [options] -a [-i] [-b] modulename [modulename...]
modprobe [options] -r [-i] modulename
modprobe [options] -r -a [-i] modulename [modulename...]
modprobe [options] -c
modprobe [options] --dump-modversions filename
Management Options:
-a, --all                   Consider every non-argument to
                           be a module name to be inserted
                           or removed (-r)
-r, --remove                Remove modules instead of inserting
   --remove-dependencies   Also remove modules depending on it
-R, --resolve-alias         Only lookup and print alias and exit
   --first-time            Fail if module already inserted or removed
-i, --ignore-install        Ignore install commands
-i, --ignore-remove         Ignore remove commands
-b, --use-blacklist         Apply blacklist to resolved alias.
-f, --force                 Force module insertion or removal.
                           implies --force-modversions and
                           --force-vermagic
   --force-modversion      Ignore module's version
   --force-vermagic        Ignore module's version magic

Query Options:
-D, --show-depends          Only print module dependencies and exit
-c, --showconfig            Print out known configuration and exit
-c, --show-config           Same as --showconfig
   --show-modversions      Dump module symbol version and exit
   --dump-modversions      Same as --show-modversions

General Options:
-n, --dry-run               Do not execute operations, just print out
-n, --show                  Same as --dry-run
-C, --config=FILE           Use FILE instead of default search paths
-d, --dirname=DIR           Use DIR as filesystem root for /lib/modules
-S, --set-version=VERSION   Use VERSION instead of `uname -r`
-s, --syslog                print to syslog, not stderr
-q, --quiet                 disable messages
-v, --verbose               enables more messages
-V, --version               show version
-h, --help                  show this help

이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.