아래와 같은 환경에서
- 부트로더 : u-boot
- 커널 : Linux
- root filesystem : nfs
- 보드 IP : 192.168.1.100
- Server IP : 192.168.1.10
- nfs dir : /tftpboot/rootfs
작업할 경우 "RPC : sendmsg returned error 101" 라는 메시지와 함께 root filesystem 마운트에 실패하는 경우가 있다.
이럴경우 kernel cmdline 으로 전달되는 bootargs 변수에 "nolock" 옵션을 붙여 주면 해결된다.
Marvell >> setenv bootargs 'console=ttyS0,115200 root=/dev/nfs init=/linuxrc rw nfsroot=192.168.1.10:/tftpboot/rootfs/,nolock ip=192.168.1.100' Marvell >> tftpboot 0x400000 uImage Marvell >> bootm 0x400000 |
위의 예제처럼 nolock 옵션을 붙여주면 kernel/fs/nfs/nfsroot.c::static int __init root_nfs_parse() 에서 옵션을 인식해서 nolock 모드로 마운트를 할 수 있게 해준다.
'development' 카테고리의 다른 글
[program] unused variable 문제 (0) | 2013.08.02 |
---|---|
[program] 32bit CPU 에서 64bit 변수 사용 문제 (0) | 2013.07.25 |
[Kernel] Kbuild system (0) | 2013.07.12 |
[kernel] __read_mostly????? (0) | 2013.05.08 |
[etc] Reglar expressions (0) | 2012.09.19 |