New IT forum Follow us on Twitter
22 May 2012, 11:27:00 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: TonidoPlug2 - Now in stock!
 
   Home   SHOP Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Booting from NFS server  (Read 4751 times)
maisondouf
Jr. Member
**
Posts: 68


Crazy hacker's family since 1982


WWW
« on: 30 May 2010, 05:25:32 pm »

I try (just to see) to boot from my TFTP/NFS server as described in "Writing Jaunty Filesystem on the NAND flash Rev 1.2.pdf".

her are my settings :
Quote
image_name=USB-Recovery/uImage.sheeva.040309
rootpath=/srv/tftp
mainlineLinux=yes
loadaddr=0x02000000
arcNumber=2097
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
cesvcid=ULULULULULULPPULULULULULDA
bootargs_end=:::DB88FXX81:eth0:none

bootargs_console=console=ttyS0,115200n8
bootroot_nfs=root=/dev/nfs rw
bootargs_nfs=nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig)
bootload_nfs=tftpboot 0x2000000 $(image_name)
nfs_boot=run bootload_nfs; setenv bootargs $(bootargs_console) $(bootroot_nfs) $(bootargs_nfs); bootm 0x2000000;


and when I run "run nfs_boot", the plug stop here :

Quote
Marvell>> run nfs_boot
Using egiga0 device
TFTP from server 192.168.0.9; our IP address is 192.168.0.8
Filename 'USB-Recovery/uImage.sheeva.040309'.
Load address: 0x2000000
Loading: #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    ###############
done
Bytes transferred = 2070316 (1f972c hex)
## Booting image at 02000000 ...
   Image Name:   Linux-2.6.22.18
   Created:      2009-04-04   1:49:44 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2070252 Bytes =  2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
|

  • Is there a problem with my NFS server ?
    From my PC, I can type "mount -t nfs 192.168.0.9:/srv/nfs /mnt" without any error and after "ls /mnt" show me the contents of the NFS server directory.
.
  • Is there a problem with "mainlineLinux" or "arcNumber" ?
.
  • Does I have to set TFTP server and NFS server to serve on the same directory ?
    For example to read uImage and jffs2 file in the same location
.
  • Does I have to really set NFS server to serve on the both drirectories "/srv/tftp" and "/srv/nfs" ?

A lot of question, I know, but perhaps only one answer...

Logged

NSLU2 owner since 4 years...
Very new owner of a black eSata Sheevaplug.
(Wiki en français http://plug.maisondouf.fr)
maisondouf
Jr. Member
**
Posts: 68


Crazy hacker's family since 1982


WWW
« Reply #1 on: 30 May 2010, 07:18:45 pm »

At this time, i had seen one big confusion with "rootpath" variable..

I believed that "rootpath" would point to TFTP directory, and in fact it have to point the NFS directory....


So I change rootpath from "/srv/tftp" to "/srv/nfs" without more success...  Undecided

So I have think that a '/' dir don't have to be empty !!!

So after reading and reading, I extract the "Linux Host Filesystem - rootfs.tar.bz2" in the NFS dir.

This create a new dir "rootfsv1.0", so I modify "rootpath" to "/srv/nfs/rootfsv1.0" and try....

no more success  Angry
Logged

NSLU2 owner since 4 years...
Very new owner of a black eSata Sheevaplug.
(Wiki en français http://plug.maisondouf.fr)
maisondouf
Jr. Member
**
Posts: 68


Crazy hacker's family since 1982


WWW
« Reply #2 on: 07 June 2010, 01:53:35 am »

any solution Huh
Logged

NSLU2 owner since 4 years...
Very new owner of a black eSata Sheevaplug.
(Wiki en français http://plug.maisondouf.fr)
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #3 on: 07 June 2010, 04:47:21 pm »

      I try (just to see) to boot from my TFTP/NFS server as described in "Writing Jaunty Filesystem on the NAND flash Rev 1.2.pdf".

      SheevaPlug Development Kit - USB Flash Recovery from U-Boot-Rev1.2.pdf has some errors. Maybe the document you are looking at does too.

      Quote
      her are my settings :
      Quote
      image_name=USB-Recovery/uImage.sheeva.040309

      So that's a Marvell kernel? The Marvell kernel requires mainlineLinux no and ArcNumber should not be set.

      Quote

      [/li][/list]
      .
      • Is there a problem with "mainlineLinux" or "arcNumber" ?
      [/list]


      Did you try different settings, or a different kernel?
      Logged
      maisondouf
      Jr. Member
      **
      Posts: 68


      Crazy hacker's family since 1982


      WWW
      « Reply #4 on: 13 June 2010, 04:11:47 pm »

      I make somes tries today...

      With mainlineLinux=no and arcNumber unset, the process also stop after decompressing the kernel

      Is there a command under uboot to test nfs access ?

      Like "tftpboot" for tftp protocol....
      « Last Edit: 13 June 2010, 04:13:23 pm by maisondouf » Logged

      NSLU2 owner since 4 years...
      Very new owner of a black eSata Sheevaplug.
      (Wiki en français http://plug.maisondouf.fr)
      maisondouf
      Jr. Member
      **
      Posts: 68


      Crazy hacker's family since 1982


      WWW
      « Reply #5 on: 13 June 2010, 06:53:52 pm »

      I don't understand for what, but as I have two sequencial redirection of variables content, the "bootargs" value was not good just before booting...


      Quote
      bootargs_console=console=ttyS0,115200n8
      nfs_path=/srv/tftp/rootfsv1.0/
      nfs_root=root=/dev/nfs rw
      nfs_args=nfsroot=$(serverip):$(nfs_path) ip=$(ipaddr):$(serverip)
      nfs_load=tftpboot 0x2000000 $(image_name)
      nfs_boot=run nfs_load; setenv bootargs $(bootargs_console) $(nfs_root) $(nfs_args)

      In fact, this make "bootargs" to be :

      Quote
      Marvell>> run nfs_boot
      Using egiga0 device
      TFTP from server 192.168.0.9; our IP address is 192.168.0.8
      Filename '/sheeva/sheeva-kernel-2.6.33.3/sheeva-2.6.33.3-uImage'.
      Load address: 0x2000000
      Loading: #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #################################################################
          #########
      done
      Bytes transferred = 2706252 (294b4c hex)
      Marvell>> print bootargs
      bootargs=console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=$(serverip):$(nfs_path) ip=$(ipaddr):$(serverip) $(new_parts)
      Marvell>>

      It would have been set to :
      Code:
      bootargs=console=ttyS0,115200n8 root=/dev/nfs rw nfsroot=192.168.0.9:/srv/tftp/rootfsv1.0/ ip=192.168.0.8:192.168.0.9 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)

      I dig....
      Logged

      NSLU2 owner since 4 years...
      Very new owner of a black eSata Sheevaplug.
      (Wiki en français http://plug.maisondouf.fr)
      maisondouf
      Jr. Member
      **
      Posts: 68


      Crazy hacker's family since 1982


      WWW
      « Reply #6 on: 13 June 2010, 07:27:19 pm »

      booting and ending with (iniramfs)

      Quote
      rpcbind: server 157.0.0.0 not responding, timed out
      Root-NFS: Unable to get nfsd port number from server, using default
      Looking up port of RPC 100005/1 on 157.0.0.0
      rpcbind: server 157.0.0.0 not responding, timed out
      Root-NFS: Unable to get mountd port number from server, using default
      Root-NFS: Server returned error -101 while mounting /tftpboot/$(serverip):$(nfs_path)
      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:

      Always "bootargs" .....
      Logged

      NSLU2 owner since 4 years...
      Very new owner of a black eSata Sheevaplug.
      (Wiki en français http://plug.maisondouf.fr)
      maisondouf
      Jr. Member
      **
      Posts: 68


      Crazy hacker's family since 1982


      WWW
      « Reply #7 on: 13 June 2010, 07:52:08 pm »

      When I type directly the setenv for bootargs, the boot start and stop whith this error

      Quote
      rpcbind: server 192.168.0.9 not responding, timed out
      Root-NFS: Unable to get nfsd port number from server, using default
      Looking up port of RPC 100005/1 on 192.168.0.9
      rpcbind: server 192.168.0.9 not responding, timed out
      Root-NFS: Unable to get mountd port number from server, using default
      Root-NFS: Server returned error -101 while mounting /var/tftp/rootfsv1.0
      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:

      RPC portmap is OK on the server
      Quote
      BigBoss@NSLU2:/srv# rpcinfo -p
         program vers proto   port
          100000    2   tcp    111  portmapper
          100000    2   udp    111  portmapper
          100024    1   udp  42054  status
          100024    1   tcp  44822  status
          391002    2   tcp   1009  sgi_fam
          100003    2   udp   2049  nfs
          100003    3   udp   2049  nfs
          100003    4   udp   2049  nfs
          100021    1   udp  60199  nlockmgr
          100021    3   udp  60199  nlockmgr
          100021    4   udp  60199  nlockmgr
          100003    2   tcp   2049  nfs
          100003    3   tcp   2049  nfs
          100003    4   tcp   2049  nfs
          100021    1   tcp  45197  nlockmgr
          100021    3   tcp  45197  nlockmgr
          100021    4   tcp  45197  nlockmgr
          100005    1   udp  44282  mountd
          100005    1   tcp  57166  mountd
          100005    2   udp  44282  mountd
          100005    2   tcp  57166  mountd
          100005    3   udp  44282  mountd
          100005    3   tcp  57166  mountd
      BigBoss@NSLU2:/srv#

      And I am able to mount this dir in nfs from my PC
      Quote
      papounet@P4Karmic:~$ sudo mount -t nfs 192.168.0.9:/srv/tftp/rootfsv1.0 /mnt/nfs
      [sudo] password for papounet:
      papounet@P4Karmic:~$ ls -l /mnt/nfs
      total 64
      drwxr-xr-x  2 root root  4096 2008-02-26 18:25 bin
      drwxr-xr-x  4 root root 36864 2008-02-26 18:27 dev
      drwxr-xr-x  3 root root  4096 2008-02-26 18:19 etc
      drwxr-xr-x  2 root root  4096 2008-02-26 18:19 lib
      lrwxrwxrwx  1 root root    11 2010-05-30 21:39 linuxrc -> bin/busybox
      drwxr-xr-x  2 root root  4096 2009-02-25 05:45 mnt
      drwxr-xr-x  2 root root  4096 2008-02-26 18:26 proc
      drwxr-xr-x  2 root root  4096 2008-02-26 18:19 sbin
      drwxr-xr-x 10 root root  4096 2008-02-26 18:25 usr
      papounet@P4Karmic:~$

      I stop for today, I will try next week-end.
      « Last Edit: 13 June 2010, 07:54:56 pm by maisondouf » Logged

      NSLU2 owner since 4 years...
      Very new owner of a black eSata Sheevaplug.
      (Wiki en français http://plug.maisondouf.fr)
      fragfutter
      Newbie
      *
      Posts: 24


      « Reply #8 on: 14 June 2010, 06:55:08 am »

      did you check /etc/exports on the server (on the server exportfs -v, on a client showmount -e server)? Did you check logfiles on the server? Are you using libwrap (/etc/hosts.{allow,deny}? Checking with tcpdump if the client contacts the host. Firewall on server.

      Boot the client to a ramdisk and then try to mount the nfs share (nfs version 2, no locking).
      Logged
      maisondouf
      Jr. Member
      **
      Posts: 68


      Crazy hacker's family since 1982


      WWW
      « Reply #9 on: 16 June 2010, 02:20:25 pm »

      I'm not at home, so I can't test this.

      but I remember that if I boot the sheeva with Ubuntu in the nand, I can mount the nfs disk on the server with "mount -t nfs 192.168.0.9:/srv/tftp/rootfsv1.0 /mnt".

      and a "ls -l /mnt" show all  fs dirs.

      The export file is ok on the server, I don't use any firewall and hosts.allow/deny are empty....

      All other PC on my network are able to mount the dir....

      Some forums says that only 2.6.26 kernels are bootable throught TFTP/NFS.
      What do you think about this ?
       

      Logged

      NSLU2 owner since 4 years...
      Very new owner of a black eSata Sheevaplug.
      (Wiki en français http://plug.maisondouf.fr)
      fragfutter
      Newbie
      *
      Posts: 24


      « Reply #10 on: 16 June 2010, 05:05:50 pm »

      booting with nfs root is old.

      does the nfs server allow nfs v2?
      Logged
      Pages: [1]
        Print  
       
      Jump to:  

      Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!