主题 : 求助,关于使用NFS挂载根文件系统的问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 816
精华: 0
发帖: 22
金钱: 120 两
威望: 22 点
综合积分: 44 分
注册时间: 2008-06-04
最后登录: 2015-03-31
楼主  发表于: 2011-08-06 19:47

 求助,关于使用NFS挂载根文件系统的问题

测试NFS服务器:
jacsy@jacsy-PC$ ls /mnt/
jacsy@jacsy-PC$ sudo mount -t nfs 192.168.10.100:/home/rootfs /mnt
[sudo] password for jacsy:
jacsy@jacsy-PC$ ls /mnt/
bin  dev  etc  home  lib  linuxrc  mnt  proc  root  sbin  sys  tmp  usr  var
jacsy@jacsy-PC$

uboot信息:
[u-boot@MINI2440]#
baudrate=115200
netmask=255.255.255.0
stdin=serial
stdout=serial
stderr=serial
ethact=dm9000
bootdelay=3
ipaddr=192.168.10.10
gatwayip=192.168.10.1
serverip=192.168.10.100
gatway=192.168.10.1
gatewayip=192.168.10.1
ethaddr=00:08:11:18:12:27
bootcmd=tftp 0x30008000 uImage;bootm
bootargs=noinitrd init=linuxrc console=ttySAC0 root=/dev/nfs rw nfsroot=192.168.10.100:/home/rootfs ip=192.168.10.102:192.168.10.100:192.168.10.1:255.255.255.0::eth0ff

内核启动信息:
[u-boot@MINI2440]# boot
dm9000 i/o: 0x20000300, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:08:11:18:12:27
operating at 100M full duplex mode
Using dm9000 device
TFTP from server 192.168.10.100; our IP address is 192.168.10.10
Filename 'uImage'.
Load address: 0x30008000
Loading: T #################################################################
     #################################################################
     ################
done
Bytes transferred = 2132380 (20899c hex)
## Booting kernel from Legacy Image at 30008000 ...
  Image Name:  Linux-2.6.37.6
  Created:      2011-08-06  6:57:49 UTC
  Image Type:  ARM Linux Kernel Image (uncompressed)
  Data Size:    2132316 Bytes =  2 MB
  Load Address: 30008000
  Entry Point:  30008040
  Verifying Checksum ... OK
  XIP Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.37.6 (jacsy@jacsy-PC) (gcc version 4.4.5 (crosstool-NG-1.9.3) ) #18 Sat Aug 6 14:57:26 CST 2011
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 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: noinitrd init=linuxrc console=ttySAC0 root=/dev/nfs rw nfsroot=192.168.10.100:/home/rootfs ip=192.168.10.102:192.168.10.100:192.168.10.1:255.255.255.0::eth0ff
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: 64MB = 64MB total
Memory: 60532k/60532k available, 5004k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000  (  4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000  ( 896 kB)
    DMA    : 0xffc00000 - 0xffe00000  (  2 MB)
    vmalloc : 0xc4800000 - 0xf6000000  ( 792 MB)
    lowmem  : 0xc0000000 - 0xc4000000  (  64 MB)
    modules : 0xbf000000 - 0xc0000000  (  16 MB)
      .init : 0xc0008000 - 0xc0029000  ( 132 kB)
      .text : 0xc0029000 - 0xc03e55c4  (3826 kB)
      .data : 0xc03e6000 - 0xc0409240  ( 141 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinO 201.93 BogoMIPS (lpj=504832)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
gpiochip_add: gpios 288..303 (GPIOK) failed to register
gpiochip_add: gpios 320..334 (GPIOL) failed to register
gpiochip_add: gpios 352..353 (GPIOM) failed to register
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, Copyright 2003-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
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c: slave address 0x10
s3c-i2c s3c2440-i2c: bus frequency set to 98 KHz
s3c-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.23.
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
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
ROMFS MTD (C) 2007 Red Hat, Inc.
msgmni has been set to 118
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Console: switching to colour frame buffer device 60x53
fb0: s3c2410fb frame buffer device
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c24xx-nand s3c2440-nand: Tacls=3, 29ns Twrph0=7 69ns, Twrph1=3 29ns
s3c24xx-nand s3c2440-nand: NAND soft ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung )
Scanning device for bad blocks
Bad eraseblock 334 at 0x0000029c0000
Creating 5 MTD partitions on "NAND":
0x000000000000-0x000000040000 : "bootloader"
0x000000040000-0x000000080000 : "parameters"
uncorrectable error :
0x000000080000-0x000000580000 : "kernel"
uncorrectable error :
0x000000580000-0x000040580000 : "root file system"
mtd: partition "root file system" extends beyond the end of device "NAND" -- size truncated to 0xfa80000
ftl_cs: FTL header not found.
0x000000000000-0x000040000000 : "whole nand flash"
mtd: partition "whole nand flash" extends beyond the end of device "NAND" -- size truncated to 0x10000000
dm9000 Ethernet Driver, V1.31
eth0: dm9000e at c481c300,c4820304 IRQ 51 MAC: 00:08:11:18:12:27 (chip)
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
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
i2c /dev entries driver
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
Registering the dns_resolver key type
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
eth0: link down
IP-Config: Complete:
    device=eth0, addr=192.168.10.102, mask=255.255.255.0, gw=192.168.10.1,
    host=192.168.10.102, domain=, nis-domain=(none),
    bootserver=192.168.10.100, rootserver=192.168.10.100, rootpath=
eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
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; here are the available partitions:
1f00            256 mtdblock0  (driver?)
1f01            256 mtdblock1  (driver?)
1f02            5120 mtdblock2  (driver?)
1f03          256512 mtdblock3  (driver?)
1f04          262144 mtdblock4  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[<c002e6d8>] (unwind_backtrace+0x0/0xf0) from [<c02f5128>] (panic+0x54/0x184)
[<c02f5128>] (panic+0x54/0x184) from [<c0008e84>] (mount_block_root+0x1c8/0x208)
[<c0008e84>] (mount_block_root+0x1c8/0x208) from [<c0008f64>] (mount_root+0xa0/0xc0)
[<c0008f64>] (mount_root+0xa0/0xc0) from [<c00090e4>] (prepare_namespace+0x160/0x1b8)
[<c00090e4>] (prepare_namespace+0x160/0x1b8) from [<c0008438>] (kernel_init+0x108/0x148)
[<c0008438>] (kernel_init+0x108/0x148) from [<c002a8f0>] (kernel_thread_exit+0x0/0x8)

内核已经支持nfs做为跟文件系统了:
--- Network File Systems  
   <*>   NFS client support  
       [*]     NFS client support for NFS version 3
       [*]       NFS client support for the NFSv3 ACL protocol extension
       [*]     NFS client support for NFS version 4        
       [ ]       NFS client support for NFSv4.1 (EXPERIMENTAL)  
       [*]   Root file system on NFS  
       [ ]   Use the legacy NFS DNS resolver  
       [ ]   Use the new idmapper upcall routine    
     < >   NFS server support  

nandflash到驱动还没写,请问一下,哪个地方出我没有配置对?
忘记了思念的负担~
级别: 侠客
UID: 43227
精华: 0
发帖: 81
金钱: 410 两
威望: 82 点
综合积分: 162 分
注册时间: 2011-04-14
最后登录: 2013-02-21
1楼  发表于: 2011-10-23 18:38
楼主,你搞定没有,我也遇到这个问题了
级别: 侠客
UID: 52583
精华: 0
发帖: 83
金钱: 420 两
威望: 84 点
综合积分: 166 分
注册时间: 2011-07-21
最后登录: 2013-01-15
2楼  发表于: 2011-12-11 16:25
我的是6410开发板,碰到这个不能挂载NFS,一直接了快七天了,还没搞定