主题 : switch_root: bad init linuxrc: No such file or directory 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 137688
精华: 0
发帖: 6
金钱: 30 两
威望: 6 点
贡献值: 0 点
综合积分: 12 分
注册时间: 2018-03-11
最后登录: 2018-04-06
楼主  发表于: 2018-03-16 19:22

 switch_root: bad init linuxrc: No such file or directory

Hi All:
最近一直linux碰到nfs不能挂在的问题, 烦请各位出谋划策, 谢谢

环境:
smart210开发板,
ubuntu 14.04

问题log如下:
[    3.329882] s5p-tvout s5p-tvout: hpd status is cable removed
[    3.365859] dm9000 dm9000: eth0: link down
[    3.366389] ADDRCONF(NETDEV_UP): eth0: link is not ready
[    3.596066] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    3.611170] dm9000 dm9000: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[    3.611651] IP-Config: Complete:
[    3.611718]      device=eth0, addr=192.168.1.68, mask=255.255.255.0, gw=192.168.1.69,
[    3.611843]      host=dm9000, domain=, nis-domain=(none),
[    3.611917]      bootserver=192.168.1.69, rootserver=192.168.1.69, rootpath=
[    3.620108] Freeing init memory: 1456K
192.168.1.69 /home/lhe/nfs 192.168.1.68 192.168.1.69 192.168.1.69 255.255.255.0 dm9000 eth0 off
switch_root: bad init linuxrc: No such file or directory
[    3.786098] Kernel panic - not syncing: Attempted to kill init!
[    3.786279] [<c0184fe4>] (unwind_backtrace+0x0/0xf0) from [<c0694b40>] (panic+0x70/0x1ac)
[    3.786435] [<c0694b40>] (panic+0x70/0x1ac) from [<c01a1550>] (do_exit+0x5dc/0x68c)
[    3.786566] [<c01a1550>] (do_exit+0x5dc/0x68c) from [<c01a185c>] (do_group_exit+0x3c/0xbc)
[    3.793885] [<c01a185c>] (do_group_exit+0x3c/0xbc) from [<c01a18ec>] (sys_exit_group+0x10/0x18)
[    3.802573] [<c01a18ec>] (sys_exit_group+0x10/0x18) from [<c017f640>] (ret_fast_syscall+0x0/0x30)
[    3.811600] Rebooting in 5 seconds..


我从电脑上sudo mount -t nfs 192.168.1.69:/home/lhe/nfs /mntm是可以成功的, 可以看到如下内容:
drwxrwxrwx 10 lhe  lhe     4096  3月 16 09:28 ./
drwxr-xr-x 24 root root    4096  8月 29  2017 ../
drwxrwxr-x  2 lhe  lhe     4096  3月 16 09:20 bin/
drwxrwxr-x  2 lhe  lhe     4096  3月 16 09:28 ddddd/
-rw-r--r--  1 lhe  lhe  1530597  3月 16 09:27 ddd.tar
drwxrwxr-x  2 lhe  lhe     4096  3月 16 09:30 dev/
drwxrwxr-x  2 lhe  lhe     4096  3月 16 09:20 etc/
drwxrwxr-x  2 lhe  lhe     4096  3月 16 09:26 lib/
lrwxrwxrwx  1 lhe  lhe       11  3月 16 09:21 linuxrc -> bin/busybox*
drwxrwxr-x  2 lhe  lhe     4096  3月 16 09:20 proc/
drwxrwxr-x  2 lhe  lhe     4096  3月 16 09:20 usr/
drwxrwxr-x  2 lhe  lhe     4096  3月 16 09:20 var/



boot引导参数为:
Goni # print
baudrate=115200
bootargs=root=/dev/nfs rw nfsroot=192.168.1.69:/home/lhe/nfs init=/linuxrc ip=192.168.1.68:192.168.1.69:192.168.1.69:255.255.255.0:dm9000:eth0:off console=ttySAC0,115200
bootblock=9
bootchart=set opts init=/sbin/bootchartd; run bootcmd
bootcmd=run ubifsboot
bootk=onenand read 0x30007FC0 0xc00000 0x600000;bootm 0x30007FC0
boottrace=setenv opts initcall_debug; run bootcmd
console=console=ttySAC2,115200n8
ethact=dm9000
ethaddr=d0:17:c2:9a:6d:50
flashboot=set bootargs root=/dev/mtdblock${bootblock} rootfstype=${rootfstype} ubi.mtd=${ubiblock} ubi.mtd=3 ubi.mtd=6 ${opts} ${lcdinfo} ${console} ${meminfo} ${mtdpartsk
ipaddr=192.168.1.68
meminfo=mem=80M mem=256M@0x40000000 mem=128M@0x50000000
mmcblk=/dev/mmcblk1p1
mmcboot=set bootargs root=${mmcblk} rootfstype=${rootfstype} ubi.mtd=${ubiblock} ubi.mtd=3 ubi.mtd=6 ${opts} ${lcdinfo} ${console} ${meminfo} ${mtdparts}; run bootk
mtdparts=mtdparts=samsung-onenand:1m(bootloader),256k(params),2816k(config),8m(csa),7m(kernel),1m(log),12m(modem),60m(qboot),-(UBI)
opts=always_resume=1
ramboot=set bootargs root=/dev/ram0 rw rootfstype=ext2 ${console} ${meminfo} initrd=0x33000000,8M ramdisk=8192
rootfstype=cramfs
serverip=192.168.1.69
tftpboot=set bootargs root=ubi0!rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc ubi.mtd=${ubiblock} ubi.mtd=3 ubi.mtd=6 ${opts} ${lcdinfo} ${console} ${meminf0
ubi=enabled
ubiblock=8
ubifsboot=set bootargs root=ubi0!rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc ubi.mtd=${ubiblock} ubi.mtd=3 ubi.mtd=6 ${opts} ${lcdinfo} ${console} ${memink
updateb=onenand erase 0x0 0x100000; onenand write 0x32008000 0x0 0x100000
updatek=onenand erase 0xc00000 0x600000;onenand write 0x31008000 0xc00000 0x600000
updateu=onenand erase 0x01560000 0x1eaa0000;onenand write 0x32000000 0x1260000 0x8C0000
verify=n


nfs配置文件为:
/home/lhe/nfs  *(rw,sync,no_root_squash)
ubuntu 14.04.