This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to mount the filesystem using nfs

hye guyz i have written the kernel for the davinci DM6446.I am trying to mount the file system using nfs but get error as shown in my log.

rpcbind: server 172.16.1.244 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
Root-NFS: Server returned error -5 while mounting /home/rohan/dir
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)

I have mounted my host on a client PC it is working fine now when i connect it to the board it gives following error

U-Boot > printenv
baudrate=115200
ethaddr=00:1C:C0:0A:00:01
bootm=0x80700000
filesize=200000
fileaddr=80700000
gatewayip=172.16.0.10
netmask=255.255.240.0
bootcmd_nand=nand read 0x80700000 0x100000 0x200000; bootm 0x80700000
bootfile=/home/admin/uImage
serverip=172.16.0.97
bootdelay=10
bootcmd=nboot 0x80700000 0 100000; bootm
nfshost=172.16.1.244
rootpath=/home/rohan/workdir/
ipaddr=172.16.0.92
bootargs=console=ttyS0,115200n8 noinitrd rw root=/dev/nfs nfsroot=172.16.1.244:/
home/rohan/workdir ,nolock mem=120M
stdin=serial
stdout=serial
stderr=serial
videostd=ntsc
ver=U-Boot 2009.06-rc2 (Aug 22 2009 - 16:01:10)

Environment size: 643/131068 bytes


U-Boot > boot

Loading from NAND 256MiB 1,8V 8-bit, offset 0x100000
   Image Name:   Linux-2.6.31-rc5-davinci1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1478780 Bytes =  1.4 MB
   Load Address: 80008000
   Entry Point:  80008000
## Booting kernel from Legacy Image at 80700000 ...
   Image Name:   Linux-2.6.31-rc5-davinci1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1478780 Bytes =  1.4 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
................................... done, booting the kernel.
Linux version 2.6.31-rc5-davinci1 (root@skw) (gcc version 4.2.2) #1 PREEMPT Thu
Aug 20 11:17:51 WIT 2009
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: DaVinci DM644x EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci dm6446a variant 0x1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 30480
Kernel command line: console=ttyS0,115200n8 noinitrd rw root=/dev/nfs nfsroot=17
2.16.1.244:/home/rohan/workdir,nolock mem=120M
PID hash table entries: 512 (order: 9, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 120MB = 120MB total
Memory: 118512KB available (2708K code, 295K data, 124K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:229
Console: colour dummy device 80x30
Calibrating delay loop... 147.86 BogoMIPS (lpj=739328)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
DaVinci: 71 gpio irqs
NET: Registered protocol family 16
WARNING: both IDE and Flash are enabled, but they share AEMIF pins.
        Disable IDE for NAND/NOR support.
MUX: Setting register HPIEN_DISABLE
           PINMUX0 (0x00000000) = 0x80000c1f -> 0x80000c1f
MUX: initialized ATAEN
MUX: Setting register ATAEN
           PINMUX0 (0x00000000) = 0x80000c1f -> 0x80020c1f
MUX: initialized HDIREN
MUX: Setting register HDIREN
           PINMUX0 (0x00000000) = 0x80020c1f -> 0x80030c1f
MUX: initialized MCBSP
MUX: Setting register MCBSP
           PINMUX1 (0x00000004) = 0x00000081 -> 0x00000481
bio: create slab <bio-0> at 0
pcf857x: probe of 1-0038 failed with error -121
pcf857x: probe of 1-0039 failed with error -121
pcf857x: probe of 1-003a failed with error -121
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 231
io scheduler noop registered
io scheduler anticipatory registered (default)
Setting Up Clocks for DM420 OSD
Console: switching to colour frame buffer device 90x30
fb0: dm_osd0_fb frame buffer device
fb1: dm_vid0_fb frame buffer device
fb2: dm_osd1_fb frame buffer device
fb3: dm_vid1_fb frame buffer device
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
Platform driver 'serial8250' needs updating - please use dev_pm_ops
serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
console [ttyS0] enabled
serial8250 serial8250.0: unable to register port at index 1 (IO0 MEM1c20400 IRQ4
1): -22
serial8250 serial8250.0: unable to register port at index 2 (IO0 MEM1c20800 IRQ4
2): -22
brd: module loaded
at24 1-0050: 32768 byte 24c256 EEPROM (writable)
davinci_emac_probe: using random MAC addr: 76:ef:60:a9:74:0b
emac-mii: probed
dm9000 Ethernet Driver, V1.31
Platform driver 'dm9000' needs updating - please use dev_pm_ops
console [netcon0] enabled
netconsole: network logging started
i2c /dev entries driver
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
Clocks: disable unused uart1
Clocks: disable unused uart2
Clocks: disable unused ide
Clocks: disable unused asp0
Clocks: disable unused mmcsd
Clocks: disable unused spi
Clocks: disable unused usb
Clocks: disable unused vlynq
Clocks: disable unused pwm0
Clocks: disable unused pwm1
Clocks: disable unused pwm2
Clocks: disable unused timer1
Looking up port of RPC 100003/2 on 172.16.1.244
rpcbind: server 172.16.1.244 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 172.16.1.244
rpcbind: server 172.16.1.244 not responding, timed out
Root-NFS: Unable to get mountd port number from server, using default
Root-NFS: Server returned error -5 while mounting /home/rohan/dir
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:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

 

 

Can someone plz help me in this.

  • Hi Rohan,

    There seems to be some confusion.

    Your bootargs show that the nfs directory path is rootpath=/home/rohan/workdir/

    while the error shows

    Server returned error -5 while mounting /home/rohan/dir

    Please recheck this.

    Regards,

    Sid

  • hi sid i have checked its correct rootpath is not going to do anything here because i have set the nfsroot=172.16.1.244:/home/rohan/workdir and simply just declared rootpath.Anywayz thanks don't knw what the hell is dis problem........................ 

  • Hi Rohan,

    Disabling the Firewall of your PC might be a solution worth trying.

    Regards,

    Sid

  • does your hosts '/etc/exports' file deifne the ':/home/rohan/workdir' directory as specified by your bootargs.  I believe the GSG suggests :/home/rohan/workdir/filesys instead, but the path does not really matter so long as it matches what is on /etc/exports file.

  • yes my host /etc/exports file defines the :/home/rohan/workdir directory as specified by my bootargs.And path really does not matters.the directory is empty do i really need to put some thing in there.

    one more thing i get error root='boot option' i have set the root=/dev/nfs as in the GSG what does that stands for????????????

  • I believe you should have a basic set of files in your file system (it should not be empty).  When the Linux kernel loads the file system, it looks under /sbin and /etc directory for programs and initialization scripts it needs to run to give you a log-in prompt.  If your file system directory is empty, chances are you will get errors...

    Also, as someone else pointed out earlier, did you make sure you have your firewall disabled. 

  • wait a second over it.in my case directory is :/home/rohan/workdir so i need to copy sbin and etc directory into them but what is dis root=/dev/nfs.My firewallis disabled.

  •  'root=/dev/nfs' is an option passed via u-boot's bootargs variable that tells the system where to look for the Linux root-file-system.  If this option would have been 'root=/dev/hda1' the system would look under HDD drive represented by hda1 device node.  By specifying /dev/nfs, you are telling the system this will be a file-system loaded via NFS, which requires additional instructions on where your nfs directory representing your Linux root-file-system can be found.  This is specified by arguments

       nfsroot=$(nfshost):$(rootpath),nolock

    normally found in your bootargs, where nfshost is the ip address of your host Linux station and rootpath is the path to your target NFS file-system (not just an empty directory, but a working file-system such as the one we provide in our DVSDK).  Please note that simply cpying etc sbin directories from an ARM-compatible file-system may not be enough, you need to have a full-fledged file system in the directory you are NFS mouting.

  • your DVSDK so how much your DVSDK costs and then my question is will that work for our custom board DM6446 with a nand of 256MB.and one more thing i am so close in mounting the linux to my system why you don't mail me the sample filesystem.I will really appreciate your help and yet there will be a solution with some other way around. 

  • The DVSDK should be available at the link below (may require registration)

    http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/dvsdk/mv_dvsdk/index.html

    Unfortunately, I cannot e-mail this to you due to legal issues (export compliance, ULAs...).  I wish I could, it would make life much easier...unfortunately, we must abode by the laws.

  • Hi juan have read the getting started manual and also seen the link what is differen in my case is just a cross compiler and for file system i have downloaded the source code for the busybox and compiled it for my target and refered it as my filesystem.

    Even in your case in Getting started guide we have to set an NFS mount point first i think there is some mistake going on with the NFS server.rght now i am unable to figure it please do let me know if there is some thing wrong in the post i mailed earlier regarding the NFS mounting the file system.

  • What we can feasibly support is our DVSDK software running on our EVMs.  At this point, it appears you are using open source software with a different cross compiler; you have not mentioned anything about the hardware (at least that I can recall, sometimes it is difficult to remember what everyone is working with).  Are you using our hardware EVM?

    As I mentioned, the GSG for our DVSDK/EVM combination explains step by step how to setup NFS service on your host (e.g. edit /etc/exports file and restart NFS service) as well as provides target kernel that is able to NFS mount a file system.  The exports file you posted earlier looks very different from what is recommended on our GSG, so this lead me to think you are not following the GSG steps...Even if you did follow the GSG steps, the fact that you are not using the linux kernel included on our DVSDK complicates things as I we have no way of knowing if the kernel you are using has the right features enabled to be able to do an NFS mount (we can only test what we provide with DVSDK).  Additionally, there has been communication between us about how your file-system directory structure should look like leading me to doubt if you have a valid file-system to be loaded.  There are just too many variables to consider (e.g. is it a kernel problem, file-system problem, host-problem, hardware problem....), we need start eliminating some of these variables.  The simplest way to do this is to get everything working on our EVM first (assuming this is your hardware platform) and with our DVSDK software and changing one thing at a time.

  • Hye juan i have made the initram diskimage using busybox i made the filesystem using the link

    http://wiki.davincidsp.com/index.php/Creating_a_Root_File_System_for_Linux_on_OMAP35x

    it is able to mount the filesystem correctly but says unable to open the initial console can you now tell what prob;em it can be by the way my board is DM6446 with nand flash 256MB

    here is what i get

     

    RAMDISK: ext2 filesystem found at block 0
    RAMDISK: Loading 5000KiB [1 disk] into ram disk... done.
    VFS: Mounted root (ext2 filesystem) on device 1:0.
    Freeing init memory: 124K
    Warning: unable to open an initial console.

     

    then it stucks here

  • Creating a working file system from scratch can be quite complex; the one described in the wiki article is probrably the simplest file-system you can get and as you can see from the wiki, it includes creating nodes and scripts which are not trivial to get everything working.  If you start with this simple file-system, you will likely find that there are many libraries and tools needed by your system missing; getting the right versions and dependancies of these libraries into your file-system can become quite complex.  Unfortunately, I am not an expert in file-systems to advice you what may be missing.

    In order to help our customers with this effort, TI provides two working and tested file systems within our DVSDK ( a small one, and a large one which includes almost evrything you would need).  This is what we can feasibly support.  When you go outside our DVSDK and start working with non-TI derived open source software, I can help advice you  based on my limited knowledge, but you will need to do much of the work on you own as well.

  • I had lot of problem with this earlier and then realized the rootpath in 'setenv' was wrong. I had 'davinci' instead of 'workdir' and I would recommend from my personal experience to retain this default. Otherwise you need to make changes to path in other files like 'Rules.make'

    e.g: # The directory that points to your kernel source directory.
    #LINUXKERNEL_INSTALL_DIR=$(HOME)/workdir/lsp/ti-davinci/linux-2.6.18_pro500
    LINUXKERNEL_INSTALL_DIR=/home/user/workdir/lsp/ti-davinci/linux-2.6.18_pro500


    and

    EXEC_DIR=/home/user/workdir/filesys/opt/dvsdk/$(PLATFORM)

  • DHCP + NFS + TFTPBOOT
    ------------------------------------------------------------------

    setenv bootcmd 'dhcp;bootm'

    setenv serverip 10.2.172.101

    setenv bootfile uImage

    setenv rootpath /home/user/workdir/filesys

    setenv nfshost 10.2.172.101

    setenv bootargs video=davincifb:vid0=0,2500K:vid1=0,2500K:osd0=720x576x16,2025K davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=$(videostd) console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=$(nfshost):$(rootpath),nolock mem=118M

    ---------------------------------

    also don't forget to saveenv after you setenv all of them. Remember you need to set these each time you boot your PC preferrably in that order since your DHCP changes.

    Do ifconfig to find nfshost and serverip (assuming both are same - you are working from one workstation)

    I see in your rootpath you are missing 'filesys'. Do you have this directory?