NFS trouble?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I could use some help figuring out this problem.  I am bringing-up a
Freescale M5373EVB board.  The documentation included with the uCLinux
BSP is flawed in many ways and had made it a very time consuming
task.  I finally got it going only to have it hang shortly after it
seems to mount the NFS root.  Here's the output from minicom:

dBUG> show
        base: 16
        baud: 115200
    autoboot: Stop at prompt
      server: 192.168.0.5
      client: 192.168.0.50
     gateway: 192.168.0.1
     netmask: 255.255.255.0
    filename: vmlinux.bin
    filetype: Image
     ethaddr: 00:CF:53:73:CF:01
         kcl: root=/dev/nfs rw nfsroot19%2.168.0.5:/tftpboot/ltib
ip19%2.168.0.50:192.168.0.5:192.168.0.1:255.255.255.0::eth0:off
dBUG> dn
Downloading Image 'vmlinux.bin' from 192.168.0.5
TFTP transfer completed
Read 1990656 bytes (3889 blocks)
dBUG> go 0x40020000
Linux version 2.6.22-uc1 (mattw@loa) (gcc version 4.2.1 (Sourcery G++
Lite 4.2-47)) #1 Fri Nov 9 09:40:36 MST 2007


uClinux/COLDFIRE(m537x)
COLDFIRE port done by Greg Ungerer, snipped-for-privacy@snapgear.com
Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne
Built 1 zonelists.  Total pages: 8128
Kernel command line: root=/dev/nfs rw nfsroot19%2.168.0.5:/tftpboot/
ltib ip19%2.168.0.50:192.168.0.5:192.168.0.1:255.255.255.0::eth0:off
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 30308k/32768k RAM, (1788k kernel code, 244k data)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
USB-MCF537x: (HOST module) EHCI device is registered
USB-MCF537x: (OTG module) EHCI device is registered
USB-MCF537x: (OTG module) UDC device is registered
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: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
JFFS2 version 2.2. (NAND) .. 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler cfq registered (default)
ColdFire internal UART serial driver version 1.00
ttyS0 at 0xfc060000 (irq = 90) is a builtin ColdFire UART
ttyS1 at 0xfc064000 (irq = 91) is a builtin ColdFire UART
ttyS2 at 0xfc068000 (irq = 92) is a builtin ColdFire UART
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: module loaded
nbd: registered device at major 43
usbcore: registered new interface driver ub
FEC ENET Version 0.2
fec: PHY @ 0x1, ID 0x20005c90 -- DP83848
eth0: ethernet 00:cf:53:73:cf:01
uclinux[mtd]: RAM probe address=0x4021c22c size=0x401000
Creating 1 MTD partitions on "RAM":
0x00000000-0x00401000 : "ROMfs"
uclinux[mtd]: set ROMfs to be root filesystem
NAND device: Manufacturer ID: 0x20, Chip ID: 0x73 (ST Micro NAND 16MiB
3,3V 8-bit)
Scanning device for bad blocks
Creating 1 MTD partitions on "NAND 16MiB 3,3V 8-bit":
0x00000000-0x01000000 : "M53xx flash partition 1"
QSPI: spi->max_speed_hz 300000
QSPI: Baud set to 255
SPI: Coldfire master initialized
M537x - Disable UART1 when using Audio
udc: Freescale MCF53xx UDC driver version 27 October 2006 init
udc: MCF53xx USB Device is found. ID=0x5 Rev=0x41
i2c /dev entries driver
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: config: auto-negotiation on, 100FDX, 100HDX, 10FDX, 10HDX.
IP-Config: Complete:
      device=eth0, addr19%2.168.0.50, mask25%5.255.255.0,
gw19%2.168.0.1,
     host19%2.168.0.50, domain=, nis-domain=(none),
     bootserver19%2.168.0.5, rootserver19%2.168.0.5, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.5
Looking up port of RPC 100005/1 on 192.168.0.5
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 64k freed (0x401f5000 - 0x40204000)
nfs: server 192.168.0.5 not responding, still trying
nfs: server 192.168.0.5 OK
nfs: server 192.168.0.5 not responding, still trying
nfs: server 192.168.0.5 OK
...
This continues nonstop.  It never gets to a command prompt.  This is
my first uClinux project (and the first time back to Linux in a long
time (last time I played with Linux it was version 1.4 or so) and I'm
a little confused as to what might be going on here.

BTW, I verified that NFS is working by mounting it locally with:
mount -t nfs localhost:...etc, etc.

Thanks,

-Martin



Re: NFS trouble?
Quoted text here. Click to load it

Mounting the given path (/tftpboot/ltib) seems to work.

Quoted text here. Click to load it

IP address unique? MAC address unique? Exported with
option "no_root_squash"? Does any startup script in your root filesystem
change the network configuration? Check with "tcpdump" what happens might
help also.

JB

Re: NFS trouble?
Quoted text here. Click to load it

Yes.  Although...I changed the IP address assigned to the board and it
went futher!  Here's how far I got:

IP-Config: Complete:
      device=eth0, addr19%2.168.0.32, mask25%5.255.255.0,
gw19%2.168.0.1,
     host19%2.168.0.32, domain=, nis-domain=(none),
     bootserver19%2.168.0.5, rootserver19%2.168.0.5, rootpath=
Looking up port of RPC 100003/2 on 192.168.0.5
Looking up port of RPC 100005/1 on 192.168.0.5
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 64k freed (0x401f5000 - 0x40204000)
init started:  BusyBox v1.00 (2007.11.09-16:41+0000) multi-call
binary.Setting the hostname to freescale
Mounting filesystems
mount: Mounting devpts on /dev/pts failed: No such device
mount: Mounting usbfs on /proc/bus/usb failed: No such file or
directory
Starting syslogd and klogd
Setting up networking on loopback device:
Setting up networking on eth0:
info, udhcpc (v0.9.9-pre) started
nfs: server 192.168.0.5 not responding, still trying

... and it gets stuck here

Board now is as follows:

dBUG> show
        base: 16
        baud: 115200
    autoboot: Stop at prompt
      server: 192.168.0.5
      client: 192.168.0.32
     gateway: 192.168.0.1
     netmask: 255.255.255.0
    filename: vmlinux.bin
    filetype: Image
     ethaddr: 00:CF:53:73:CF:01
         kcl: root=/dev/nfs rw nfsroot19%2.168.0.5:/tftpboot/ltib
ip19%2.168.0.32:192.168.0.5:192.168.0.1:255.255.255.0::eth0:off
dBUG>


Quoted text here. Click to load it

Yes.


Yes:

/tftpboot/ltib/ *(rw,no_root_squash,async)


Quoted text here. Click to load it
configuration?

I'll look into this next.  Don't know.

Quoted text here. Click to load it

Working on this as well (didn't have it installed)


Thanks for your pointers,

-Martin


Re: NFS trouble?
Quoted text here. Click to load it
Does "rootpath" have to be set for this to work?  I am not too clear
on where to do this. Is it part of the kernel command line string?  I
currently have:

 kcl: root=/dev/nfs rw nfsroot19%2.168.0.5:/tftpboot/ltib
ip19%2.168.0.32:192.168.0.5:192.168.0.1:255.255.255.0::eth0:off

Thanks,

-Martin

Re: NFS trouble?

Quoted text here. Click to load it

Arrgh. I asked you: "Does any startup script in your root filesystem change
the network configuration?". And you answered: "None that I could tell."
What do you think udhcp above do?

Remove udhcp from your startup scripts list. You already define your network
with the "ip=<...>" kernel parameter. Or enable kernels network
autoconfiguration feature (must be already done to be able to use NFS as
root filesystem) and exchange your kernelparameter to "ip=dhcp". This will
do the dhcp in kernel, *prior* mounting the root filesystem.

Quoted text here. Click to load it

Reconfigure your network device at this point is like changing the harddisk
while the system is currently booting from it...

JB

Re: NFS trouble?
Quoted text here. Click to load it

Sorry.  Don't get angry.  I am not an expert.

I suspected that "udhcpc" may have something to do with it.  In the
LTIB configurator you can turn off DHCP and give the board fixed IP
information.  I did this and it didn't work.  This confused me a bit.
After many iterations I deleted the IP address for the DNS server and
it all started working.  Not sure why.  The kernel now boots reliably
every time.

I do need this board to work using DHCP, I can't deploy this with
fixed IP configurations.

Quoted text here. Click to load it

Ah, it sounds like this is what I need to do.  I need DHCP.  Thanks.


Quoted text here. Click to load it

I understand.  Thanks.

-Martin

Re: NFS trouble?
Quoted text here. Click to load it
configuration?

None that I could tell.

I did recompile to configure for fixed IP rather than DHCP on
startup.  I'm not sure that it made a difference.

I did see the system boot all the way to the command prompt ONE time,
and everything worked.  However, after I restarted the target board,
downloaded the same kernel again I could not get it to boot
completely.


Quoted text here. Click to load it

Here's what I think to be the relevant portion of the output:


18:48:23.322782 arp who-has 192.168.0.1 tell 192.168.0.5
18:48:23.323384 arp reply 192.168.0.1 is-at 00:0f:b5:d6:54:ae (oui
Unknown)
18:48:23.323436 arp reply 192.168.0.1 is-at 00:0f:b5:d6:54:ae (oui
Unknown)
18:48:23.323706 IP 192.168.0.5.32794 >
dns1.lsanca.sbcglobal.net.domain:  37736+ PTR? 1.0.168.192.in-
addr.arpa. (42)
18:48:23.339256 IP dns1.lsanca.sbcglobal.net.domain >
192.168.0.5.32794:  37736 NXDomain* 0/1/0 (98)
18:48:23.698370 IP 192.168.0.32.3277285108 > 192.168.0.5.nfs: 104
getattr [|nfs]
18:48:23.698662 IP 192.168.0.5.nfs > 192.168.0.32.3277285108: reply ok
96 getattr DIR 40755 ids 1000/100 sz 408
18:48:26.478981 arp who-has 192.168.0.32 tell 192.168.0.5
18:48:27.479043 arp who-has 192.168.0.32 tell 192.168.0.5
18:48:28.102585 IP 192.168.0.32.3277285108 > 192.168.0.5.nfs: 104
getattr [|nfs]
18:48:28.102900 IP 192.168.0.5.nfs > 192.168.0.32.3277285108: reply ok
96 getattr DIR 40755 ids 1000/100 sz 408
18:48:28.479107 arp who-has 192.168.0.32 tell 192.168.0.5
18:48:29.197483 IP 192.168.0.32.3277285108 > 192.168.0.5.nfs: 104
getattr [|nfs]
18:48:29.197794 IP 192.168.0.5.nfs > 192.168.0.32.3277285108: reply ok
96 getattr DIR 40755 ids 1000/100 sz 408
18:48:31.397115 IP 192.168.0.32.3277285108 > 192.168.0.5.nfs: 104
getattr [|nfs]
18:48:31.399296 arp who-has 192.168.0.32 tell 192.168.0.5
18:48:32.399374 arp who-has 192.168.0.32 tell 192.168.0.5
18:48:33.399419 arp who-has 192.168.0.32 tell 192.168.0.5
18:48:35.796409 IP 192.168.0.32.3277285108 > 192.168.0.5.nfs: 104
getattr [|nfs]
18:48:35.799567 arp who-has 192.168.0.32 tell 192.168.0.5
18:48:36.799628 arp who-has 192.168.0.32 tell 192.168.0.5
18:48:36.896235 IP 192.168.0.32.3277285108 > 192.168.0.5.nfs: 104
getattr [|nfs]
18:48:37.799694 arp who-has 192.168.0.32 tell 192.168.0.5
18:48:37.800034 arp reply 192.168.0.32 is-at 00:cf:53:73:cf:01 (oui
Unknown)
18:48:37.800043 IP 192.168.0.5.nfs > 192.168.0.32.3277285108: reply ok
96 getattr DIR 40755 ids 1000/100 sz 408
18:48:37.800054 IP 192.168.0.5.nfs > 192.168.0.32.3277285108: reply ok
96 getattr DIR 40755 ids 1000/100 sz 408
18:48:37.803636 IP 192.168.0.32.3277285109 > 192.168.0.5.nfs: 104
getattr [|nfs]
18:48:37.803772 IP 192.168.0.5.nfs > 192.168.0.32.3277285109: reply ok
96 getattr DIR 40755 ids 0/0 sz 960
18:48:37.804588 arp reply 192.168.0.32 is-at 00:cf:53:73:cf:01 (oui
Unknown)
18:48:37.804842 arp reply 192.168.0.32 is-at 00:cf:53:73:cf:01 (oui
Unknown)
18:48:37.805168 arp reply 192.168.0.32 is-at 00:cf:53:73:cf:01 (oui
Unknown)
18:48:37.805490 arp reply 192.168.0.32 is-at 00:cf:53:73:cf:01 (oui
Unknown)
18:48:37.805812 arp reply 192.168.0.32 is-at 00:cf:53:73:cf:01 (oui
Unknown)
18:48:37.806071 arp reply 192.168.0.32 is-at 00:cf:53:73:cf:01 (oui
Unknown)
18:48:37.806331 arp reply 192.168.0.32 is-at 00:cf:53:73:cf:01 (oui
Unknown)
18:48:37.806592 arp reply 192.168.0.32 is-at 00:cf:53:73:cf:01 (oui
Unknown)
18:48:37.807499 IP 192.168.0.32.3277285110 > 192.168.0.5.nfs: 104
getattr [|nfs]
18:48:37.807789 IP 192.168.0.5.nfs > 192.168.0.32.3277285110: reply ok
96 getattr DIR 40755 ids 0/0 sz 4160
18:48:37.808204 IP 192.168.0.32.3277285111 > 192.168.0.5.nfs: 104
getattr [|nfs]
18:48:37.812291 IP 192.168.0.5.nfs > 192.168.0.32.3277285111: reply ok
96 getattr DIR 40755 ids 1000/100 sz 408


I now need to figure out what the above means.  I'd appreciate a shove
in the right direction.

Thanks,

-Martin


Site Timeline