查看: 7260|回复: 7

[提问] NFS文件系统配置求助

[复制链接]
发表于 2009-11-30 18:56:23 | 显示全部楼层 |阅读模式
关键词: nfs , 求助
小弟刚开始学习驱动开发,开发板是S3C2410,为的调试方便,想搭建NFS文件系统,可总是遇到问题,请大虾指教。
下面是u-boot的环境变量设置:

baudrate=115200
ethaddr=12:24:56:78:9a:bc
bootcmd=nand read 30008000 100000 200000 ;go 30008000
filesize=1120ec
fileaddr=30008000
netmask=255.255.255.0
ipaddr=192.168.1.12
serverip=192.168.1.26
bootargs=boot=/dev/nfs rw ip=192.168.1.12:192.168.1.26:192.168.1.1:255.255.255.0ff init=/bin/ash nfsroot=/home/geyingzhen/myroofs console=ttySAC0,115200



下面是终端显示的错误信息!

AND read: device 0 offset 1048576, size 2097152 ...  2097152 bytes read: OK
## Starting application at 0x30008000 ...
Uncompressing Linux.............................................................
Linux version 2.6.30.4 (root@geyingzhen-laptop) (gcc version 4.3.2 (Sourcery G+9
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=00007177
CPU: VIVT data cache, VIVT instruction cache
Machine: SMDK2410
ATAG_INITRD is deprecated; please update your bootloader.
Memory policy: ECC disabled, Data cache writeback
CPU S3C2410A (id 0x32410002)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C2410: core 202.800 MHz, memory 101.400 MHz, peripheral 50.700 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: boot=/dev/nfs rw ip=192.168.1.12:192.168.1.26:192.168.1.1:0
NR_IRQS:99
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60512KB available (3848K code, 370K data, 140K init, 0K highmem)
Calibrating delay loop... 50.38 BogoMIPS (lpj=125952)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 936 bytes
NET: Registered protocol family 16
S3C Power Management, Copyright 2004 Simtec Electronics
S3C2410: Initialising architecture
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
bio: create slab at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c2410-i2c s3c2410-i2c: slave address 0x10
s3c2410-i2c s3c2410-i2c: bus frequency set to 99 KHz
s3c2410-i2c s3c2410-i2c: i2c-0: S3C I2C adapter
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 2048)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 118
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
s3c2410-lcd s3c2410-lcd: no platform data for lcd, cannot attach
s3c2410-lcd: probe of s3c2410-lcd failed with error -22
lp: driver loaded but no devices found
ppdev: user-space parallel port driver
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
s3c2410-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2410
s3c2410-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2410
s3c2410-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2410
brd: module loaded
loop: module loaded
Uniform Multi-Platform E-IDE driver
ide-gd driver 1.18
ide-cd driver 5.00
Driver 'sd' needs updating - please use bus_type methods
dm9000 Ethernet Driver, V1.31
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand s3c2410-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bi)
Scanning device for bad blocks
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x000000000000-0x000000100000 : "bootloader"
0x000000100000-0x000000400000 : "kernel"
0x000000400000-0x000002c00000 : "root"
0x000002d00000-0x000003c00000 : "user"
usbmon: debugfs is not available
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver ftdi_sio
ftdi_sio: v1.4.3:USB FTDI Serial Converters Driver
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
Advanced Linux Sound Architecture Driver Version 1.0.20.
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
IP-Config: No network devices available.
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0 (driver?)
1f01            3072 mtdblock1 (driver?)
1f02           40960 mtdblock2 (driver?)
1f03           15360 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
发表于 2009-12-2 14:12:44 | 显示全部楼层
顶一下。难道没人会?
发表于 2009-12-2 14:20:51 | 显示全部楼层
路过帮顶!
 楼主| 发表于 2009-12-3 22:51:39 | 显示全部楼层
使用的系统是ubuntu9.04谢谢,
 楼主| 发表于 2009-12-3 22:51:58 | 显示全部楼层
我自顶
发表于 2009-12-4 23:24:11 | 显示全部楼层
IP-Config: No network devices available.
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00            1024 mtdblock0 (driver?)
1f01            3072 mtdblock1 (driver?)
1f02           40960 mtdblock2 (driver?)
1f03           15360 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

错误很明显啊,自己不好好看kernel打印的消息

你这个是把NFS做根文件系统吧

首先是网卡没驱动起来,可能网卡驱动有问题,
IP-Config: No network devices available.

后面还有没有NFS server
Root-NFS: No NFS server available, giving up.
可能你的主机上的NFS没有启动,或者NFS启动了,但是防火墙开着,导致NFS不能正常使用

后面就是NFS不能当根文件系统,然后kernel尝试本地文件系统,但是你那个mtdblock2又搞成unknown了

后面的报错不重要,关键是要把网卡驱动以及启动配置搞定,还有就是主机上的NFS server要能用
 楼主| 发表于 2009-12-6 12:32:48 | 显示全部楼层
非常感谢,查看了一下内核配置(menuconfig)发现 是没有选择NFS支持,是内核的问题
 楼主| 发表于 2009-12-6 12:45:01 | 显示全部楼层
小弟刚学驱动开发,对这一块不是太熟悉,不过有了这回以后会注意的!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关于我们  -  服务条款  -  使用指南  -  站点地图  -  友情链接  -  联系我们
电子工程网 © 版权所有   京ICP备16069177号 | 京公网安备11010502021702
快速回复 返回顶部 返回列表