免费注册 查看新帖 |

Chinaunix

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

[开发环境] 无法挂载nfs根文件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-07-15 06:18 |只看该作者 |倒序浏览
大家好,

我把编译好的新内核用redboot加载到板子上,但是在之后的加载根文件系统时出错了,错误代码我贴在下边了。我在网上看好像这个问题很普遍,我是个新手,不太知道具体流程。我想问一下,是不是每个编译好的内核我都需要自己做个文件系统给板子挂载啊?还是可以用别的?我现在用的是在TS7250官网上提供的2.6.21的文件系统,网址是http://www.embeddedarm.com/software/arm-linux-26-ts72xx.php。谢谢。

RedBoot> exec -c "console=ttyAM0,115200 ip=dhcp nfsroot=192.168.0.29:/tftpboot/tmp
Unbalanced string!
Using base address 0x00218000 and length 0x001e4170
Uncompressing Linux.....................................................................................
Linux version 2.6.32.3-m (netwis@ubuntu) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #1 P0
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=40007177
CPU: VIVT data cache, VIVT instruction cache
Machine: Technologic Systems TS-72xx SBC
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 9040
Kernel command line: console=ttyAM0,115200 ip=dhcp nfsroot=192.168.0.29:/tftpboot/tmp
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 8MB 8MB 8MB 8MB 8MB 8MB 8MB 8MB = 64MB total
Memory: 60748KB available (3552K code, 298K data, 112K init, 0K highmem)
Hierarchical RCU implementation.
NR_IRQS:120
VIC @fefb0000: id 0x00041190, vendor 0x41
VIC @fefc0000: id 0x00041190, vendor 0x41
Console: colour dummy device 80x30
Calibrating delay loop... 99.73 BogoMIPS (lpj=49868
Security Framework initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
ep93xx: PLL1 running at 400 MHz, PLL2 at 192 MHz
ep93xx: FCLK 200 MHz, HCLK 100 MHz, PCLK 50 MHz
M2P DMA subsystem initialized
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 204
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: AMBA driver
apb:uart1: ttyAM0 at MMIO 0x808c0000 (irq = 52) is a AMBA
console [ttyAM0] enabled
apb:uart2: ttyAM1 at MMIO 0x808d0000 (irq = 54) is a AMBA
apb:uart3: ttyAM2 at MMIO 0x808e0000 (irq = 55) is a AMBA
Searching for NAND flash...
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 0 at 0x000000000000
Bad eraseblock 13 at 0x0000001a0000
Bad eraseblock 1001 at 0x000007d20000
Bad eraseblock 1002 at 0x000007d40000
cmdlinepart partition parsing not available
Using static partition definition
Creating 3 MTD partitions on "ts7250-nand":
0x000000000000-0x000000004000 : "TS-BOOTROM"
mtd: partition "TS-BOOTROM" doesn't end on an erase block -- force read-only
0x000000004000-0x000007d04000 : "Linux"
mtd: partition "Linux" doesn't start on an erase block boundary -- force read-only
0x000007d04000-0x000008000000 : "RedBoot"
mtd: partition "RedBoot" doesn't start on an erase block boundary -- force read-only
ep93xx-eth version 0.12 loading
eth0: ep93xx on-chip ethernet, IRQ 39, 00:d0:69:41:89:85.
ep93xx_mii_bus: probed
Generic PHY 0:01: PHY supports MII frame preamble suppression
net eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)
net eth0: ep93xx on-chip ethernet, IRQ 39, 00:d0:69:41:89:85
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ep93xx-ohci ep93xx-ohci: EP93xx OHCI
ep93xx-ohci ep93xx-ohci: new USB bus registered, assigned bus number 1
ep93xx-ohci ep93xx-ohci: irq 56, io mem 0x80020000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EP93xx OHCI
usb usb1: Manufacturer: Linux 2.6.32.3-m ohci_hcd
usb usb1: SerialNumber: ep93xx
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mice: PS/2 mouse device common for all mice
ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx-rtc as rtc0
rtc-m48t86 rtc-m48t86: rtc core: registered m48t86 as rtc1
rtc-m48t86 rtc-m48t86: battery exhausted
i2c-gpio i2c-gpio.0: using pins 14 (SDA) and 15 (SCL)
cpuidle: using governor ladder
Registered led device: platform:grled
Registered led device: platform:rdled
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
rtc-m48t86 rtc-m48t86: hctosys: invalid date/time
usb 1-3: new full speed USB device using ep93xx-ohci and address 2
usb 1-3: New USB device found, idVendor=0ace, idProduct=1215
usb 1-3: New USB device strings: Mfr=16, Product=32, SerialNumber=0
usb 1-3: Product: USB2.0 WLAN
usb 1-3: Manufacturer: ZyDAS
usb 1-3: configuration #1 chosen from 1 choice
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.0.47
IP-Config: Complete:
     device=eth0, addr=192.168.0.47, mask=255.255.254.0, gw=192.168.0.1,
     host=ts7250-eb2-3042-1, domain=ece.ncsu.edu, nis-domain=(none),
     bootserver=0.0.0.0, rootserver=192.168.0.29, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.29
Looking up port of RPC 100005/1 on 192.168.0.29
Root-NFS: Server returned error -13 while mounting /tftpboot/tmp
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "<NULL>" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00              16 mtdblock0 (driver?)
1f01          128000 mtdblock1 (driver?)
1f02            3056 mtdblock2 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

论坛徽章:
0
2 [报告]
发表于 2010-07-15 08:45 |只看该作者
楼主设置的DHCP,检查下有没有DHCP服务器,没有的话需要手动设置IP

另外检查下NFS服务器工作设置是否正确,工作是否正常

论坛徽章:
0
3 [报告]
发表于 2010-07-15 09:08 |只看该作者
我load之前检查过nfs服务器,从板子上可以挂载nfs下面共享的文件夹啊。关于DHCP,我确实没设,但Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.0.47
IP-Config: Complete:
     device=eth0, addr=192.168.0.47, mask=255.255.254.0, gw=192.168.0.1,
     host=ts7250-eb2-3042-1, domain=ece.ncsu.edu, nis-domain=(none),
     bootserver=0.0.0.0, rootserver=192.168.0.29, rootpath=
这几行是不是可以判断可以分配到ip啊?或者怎么检查dhcp是否正常?

论坛徽章:
0
4 [报告]
发表于 2010-07-15 23:11 |只看该作者
高人给帮忙看看啊

论坛徽章:
0
5 [报告]
发表于 2010-07-16 09:14 |只看该作者
Root-NFS: Server returned error -13 while mounting /tftpboot/tmp
是不是权限没设置好啊?

论坛徽章:
0
6 [报告]
发表于 2010-07-16 09:15 |只看该作者
楼主设置的DHCP,检查下有没有DHCP服务器,没有的话需要手动设置IP

另外检查下NFS服务器工作设置是否正确 ...
bitmilong 发表于 2010-07-15 08:45



    版主如果不用dhcp的话,在那里设置ip啊?uboot吗?

论坛徽章:
0
7 [报告]
发表于 2010-07-16 12:30 |只看该作者
感谢大家的回复,检查了一下,发现确实权限设置有问题,我改了权限的问题之后错误代码从
Root-NFS: Server returned error -13 while mounting /tftpboot/tmp
变成了
rpcbind:server 192.168.0.100 not responding, timed out.
我觉得现在问题都应该集中在nfs服务器上,我现在启动portmap sudo /etc/init./portmap restart,总会有提示:
Rather than invoking init scripts through /etc/init.d, use the service( utility, e.g.service portmap restart.
Since the script you are attempting to invoke has been converte to an Upstart job, you may also use the restart ( utility, e.g. restart portmap portmap start/running, porcess 850.
但是如果我使用命令 restart portmap,又会有如下提示:
resart: Rejected send message, 1 matched rules; type="method_call", sender=""......
我不太确定这样portmap算是启动了还是没启动?
谢谢大家的继续关注。

论坛徽章:
0
8 [报告]
发表于 2010-07-16 20:48 |只看该作者
nfsroot=192.168.0.29

论坛徽章:
0
9 [报告]
发表于 2010-07-17 14:25 |只看该作者
已经成功挂载,感谢大家帮忙,我的错误在于没有按照内核中有关nfs的document中规定的命令格式给出ip参数的值,建议大家今后严格按照命令格式写全客户端,服务器,网关等的地址。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP