免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 9471 | 回复: 18
打印 上一主题 下一主题

linux2.6.14启动错误,找不到根文件系统!!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-19 15:41 |只看该作者 |倒序浏览
你好,我是个新手,现在在做linux2.6往magic2410试验箱上移植,在移植内核时出现了以下错误:
NET: Registered protocol family 1                                               
eth0: link down                                                                
IP-Config: Complete:                                                            
      device=eth0, addr=192.168.1.10, mask=255.255.255.0, gw=192.168.1.1,      
     host=192.168.1.10, domain=, nis-domain=(none),                             
     bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=                  
Looking up port of RPC 100003/2 on 192.168.1.1                                 
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1                                 
Looking up port of RPC 100005/1 on 192.168.1.1                                 
mount: server 192.168.1.1 not responding, timed out                             
Root-NFS: Server returned error -5 while mounting /home/arm/rootbox            
VFS: Unable to mount root fs via NFS, trying floppy.                           
VFS: Cannot open root device "nfs" or unknown-block(2,0)                        
Please append a correct "root=" boot option                                    
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
现在我也不能确定问题到底是出在哪,有三种怀疑:一是主机的nfs服务没配置好,但我将主机与另一台电脑相连,另一台电脑能mount上主机上的文件;二是,试验箱的网卡是dm9000e,我对linux2.6.14中dm9000程序做了一些修改,也不指导网络到底通了没,但在显示Looking up port of RPC 100005/1 on 192.168.1.1 后,停顿了几秒,期间试验箱上网卡的指示灯也在闪,网络是否通了呢;三是,内核传递参数有问题。
希望各位大侠给我指点一下迷津,在下感激不尽!!!

论坛徽章:
0
2 [报告]
发表于 2008-05-19 16:25 |只看该作者
找不到根文件系统,你采用的是nfsroot,注意两个问题:
1.bootloader传递给内核的参数设置的对不对,及nfsroot。(也可以在内核里指定);
2.linux的网路配置的是否正确,nfs的配置,还有bootp的配置。

论坛徽章:
0
3 [报告]
发表于 2008-05-19 17:29 |只看该作者

回复 #2 kingreat 的帖子

多谢kingreat的指点!我将u-boot中的bootargs及内核默认的启动参数设置是相同的:root=/dev/nfs nfsboot=192.168.1.1:/home/arm/rootbox rw noinitrd init=/sbin/init ip=192.168.1.10:192.168.1.1:192.168.1.1:255.255.255.0此处不太清楚咋填所以就设为空格了):eth0:off , console=ttySAC0 mem=64M
其中192.168.1.1为主机ip,192.168.1.10为试验箱ip,麻烦你帮我看一下我的参数设置有什么问题吗?
另外nfs的配置现在我也不确定是否是好使了,反正从其它机器上可以mount主机上的文件,mount命令后要等几十秒才mount上了,是不是也有问题啊?
对于bootp配置我还没接触过,我现在还是个菜鸟,呵呵,我会去查一下,您能稍微具体些谈一下吗?谢谢了!

论坛徽章:
0
4 [报告]
发表于 2008-05-19 20:43 |只看该作者

帮助

请大家帮我看看吧,急!谢谢了!

论坛徽章:
0
5 [报告]
发表于 2008-05-20 17:53 |只看该作者

回复 #1 zl_hit 的帖子

U-Boot是支持tftp协议的,你可以在bootloader命令行下使用tftp的相关命令从主机上下载个文件试试,看网络是否通的。然后再定位其余的问题吧

论坛徽章:
0
6 [报告]
发表于 2008-05-21 08:27 |只看该作者
是不是你的启动参数配置的不对。下面是我以前配过的一个RedBoot的nfs启动配置,你看看有没有帮助吧。
exec -c "console=ttyS0,115200 mem=100M@0 root=/dev/nfs nfsroot=192.168.6.110:/hda1/mnt_initrd,nolock ip=192.168.6.200:192.168.6.110:192.168.6.1:255.255.255.0:mnt_initrd:eth0:"   
0x200000
其中, 192.168.6.110是我的linux主机IP地址, 192.168.6.200是目标板的ip地址。 /hda1/mnt_initrd是根文件系统目录

论坛徽章:
0
7 [报告]
发表于 2008-05-21 08:55 |只看该作者
你检查一下你的脚本,你好像把nfsroot写成了nfsboot了。

论坛徽章:
0
8 [报告]
发表于 2008-05-21 12:48 |只看该作者

回复 #8 xdsupermanli 的帖子

非常感谢你的指点!前面nfsboot是写错了,笔误。我会按你的提示再修改,试一下。
但内核传递参数中有些参数的设定我还是不太清楚,您能给稍微解释一下吗?
在"console=ttyS0,115200 mem=100M@0 root=/dev/nfs nfsroot=192.168.6.110:/hda1/mnt_initrd,nolock ip=192.168.6.200:192.168.6.110:192.168.6.1:255.255.255.0:mnt_initrd:eth0:"中
1、直接将mem=100M@0写成mem=100M行吗?
2、192.168.6.1应该是网关地址吧,我在电脑上开始默认的是没有,后来自己根据ip地址随意加了一个行吗?
3、mnt_initrd:eth0:中mnt_initrd是对应的是什么啊,是电脑的hostname吗?

论坛徽章:
0
9 [报告]
发表于 2008-05-21 17:27 |只看该作者

回复 #9 zl_hit 的帖子

1、直接将mem=100M@0写成mem=100M行吗?
A:这个我不清楚。我上面所写的配置是按照芯片提供商给我们的文档上要求写的。

2、192.168.6.1应该是网关地址吧,我在电脑上开始默认的是没有,后来自己根据ip地址随意加了一个行吗?
A:是网关IP地址,如果host和target在同一个网段内,这个地址应该没什么用(我个人认为,呵呵)。

3、mnt_initrd:eth0:中mnt_initrd是对应的是什么啊,是电脑的hostname吗?
A:mnt_initrd就是位于主机nfs共享目录下的根文件系统目录。

这个脚本是Redboot中配置的脚本格式,不一定适用与U-boot的,如果你还没搞定的话,我也无能为力了,水平有限。呵呵~

论坛徽章:
0
10 [报告]
发表于 2008-05-21 19:40 |只看该作者

回复 #10 xdsupermanli 的帖子

非常感谢你的解答!今天下午根据你的提示修改了一下内核启动参数,修改为root=/dev/nfs nfsroot=192.168.1.1:/home/arm/rootbox ,nolock noinitrd init=/sbin/init ip=192.168.1.10:192.168.1.1:192.168.1.29:255.255.255.0::eth0: , console=ttySAC0 mem=64M
其中,我加了nolock,因为我也发现不加nolock的话两台电脑之间的文件系统也不通过mount挂载上。另外我将主机上的网关地址去掉了,在启动参数随便设了一个192.168.1.29,其它几个我也不太清楚的参数也就设为空了。这样设好后,内核启动好像更进了一步,但还是到不了shell界面,我会继续查找一些相关的资料,希望大家看了后也能给些指导,再次感谢你的指点!
我修改后的内核启动界面为:
my2410# bootm 0x30008000
## Booting image at 30008000 ...
   Image Name:   linux-2.6.14
   Created:      2008-05-21   8:24:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1195800 Bytes =  1.1 MB
   Load Address: 30008000
   Entry Point:  30008040
   Verifying Checksum ... OK
   XIP Kernel Image ... OK

Starting kernel ...

Uncompressing Linux................................................................................ done, booting the kernel.
Linux version 2.6.14 (Zhanglong@zhang) (gcc version 4.0.0 (DENX ELDK 4.1 4.0.0)) #2 Wed May 21 16:22:54 CST 2008
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
Machine: SMDK2410
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C2410: core 200.000 MHz, memory 100.000 MHz, peripheral 50.000 MHz
S3C2410 Clocks, (c) 2004 Simtec Electronics
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists
Kernel command line: root=/dev/nfs nfsroot=192.168.1.1:/home/arm/rootbox ,nolock noinitrd init=/sbin/init ip=192.168.1.10:192.168.1.1:192.168.1.29:255.255.255.0::eth0: console=tty
irq: clearing pending ext status 00000100
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 bytes)
timer tcon=00500000, tcnt a2c1, tcfg 00000200,00000000, usec 00001eb8
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62208KB available (2050K code, 457K data, 92K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
softlockup thread 0 started up.
NET: Registered protocol family 16
S3C2410: Initialising architecture
usbcore: registered new driver usbfs
usbcore: registered new driver hub
S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
NetWinder Floating Point Emulator V0.97 (double precision)
devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au)
devfs: devfs_debug: 0x0
devfs: boot_options: 0x1
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Initializing Cryptographic API
Console: switching to colour frame buffer device 80x25
fb0: Virtual frame buffer device, using 1024K of video memory
S3C2410 RTC, (c) 2004 Simtec Electronics
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
dm9000 Ethernet Driver
eth%d: Invalid ethernet MAC address.  Please set using ifconfig
eth0: dm9000 at c4910300,c4912304 IRQ 16 MAC: 00:00:00:00:00:00
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand: mapped registers at c4980000
s3c2410-nand: timing: Tacls 10ns, Twrph0 10ns, Twrph1 10ns
No NAND device found!!!
usbmon: debugfs is not available
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
eth0: link down
IP-Config: Complete:
      device=eth0, addr=192.168.1.10, mask=255.255.255.0, gw=192.168.1.29,
     host=192.168.1.10, domain=, nis-domain=(none),
     bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.1
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
eth0: link down
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
portmap: server 192.168.1.1 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 192.168.1.1
VFS: Mounted root (nfs filesystem).
Mounted devfs on /dev
Freeing init memory: 92K
init started:  BusyBox v0.60.5 (2006.02.20-09:27+0000) multi-call binary
Using /bin/zlg_fs.ko
insmod: Not configured to support old kernels
Using /bin/zlg_ffs.ko
insmod: Not configured to support old kernels
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP