• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: I can't boot from NFS  (Read 1088 times)
bob38
Newbie
*

Karma: 1
Posts: 22


View Profile
« on: August 31, 2010, 11:25:16 PM »

Hello,

I'm trying to boot SheevaPlug from NFS. But it doesn't work !!! I have no problem to
get uImage from tftpboot, but after booting kernel, nothing appears:

    TFTP from server 192.168.0.154; our IP address is 192.168.0.199
    Filename 'uImage.sheeva.20090319'.
    Load address: 0x2000000
    Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################
    done
    Bytes transferred = 2106760 (202588 hex)
    ## Booting image at 02000000 ...
       Image Name:   Linux-2.6.22.18
       Created:      2009-03-19   9:18:16 UTC
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    2106696 Bytes =  2 MB
       Load Address: 00008000
       Entry Point:  00008000
       Verifying Checksum ... OK
    OK

    Starting kernel ...

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




I have Ubuntu 10.04 64bits. And, I do all the actions in the documentation.

- I extract rootfs.tar.bz2 and LSP package into /opt/sheevaplug. My rootpath
  will be: /opt/sheevaplug/rootfsv1.0
   # pwd
   /opt/sheevaplug
   # ls -l
   drwxrwxrwx 12 root     root          4096 2010-08-31 15:18 rootfsv1.0

   # ls -l rootfsv1.0
   total 80
   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 sbin
   drwxr-xr-x  2 root     root      4096 2008-02-26 18:19 lib
   drwxr-xr-x 10 root     root      4096 2008-02-26 18:25 usr
   drwxr-xr-x  2 root     root      4096 2008-02-26 18:25 bin
   drwxr-xr-x  2 root     root      4096 2008-02-26 18:26 proc
   drwxr-xr-x  4 root     root     36864 2008-02-26 18:27 dev
   drwxr-xr-x  2 root     root      4096 2009-02-25 05:45 mnt
   drwxrwxr-x  2 root     root      4096 2009-03-19 10:35 Image
   drwxrwxr-x  2 root     root      4096 2009-03-19 10:35 Sources
   lrwxrwxrwx  1 root     root        11 2010-08-31 15:13 linuxrc -> bin/busybox

- I configure my /etc/exports file and restart my NFS server
   /opt/sheevaplug/ *(rw,sync,no_subtree_check,no_root_squash)
   /tftpboot/ *(rw,sync,no_subtree_check,no_root_squash)

- I test this NFS filesystem from another SheevaPlug and I test that I can write on it.
   # mount -t nfs 192.168.0.154:/opt/sheevaplug/rootfsv1.0 /mnt/opt
   # df
   192.168.0.154:/opt/sheevaplug/rootfsv1.0
                     326917120 120402944 189907968  39% /mnt/opt
   # ls -l /mnt/opt
   total 76
   drwxrwxr-x  2 root root  4096 Mar 19  2009 Image
   drwxrwxr-x  2 root root  4096 Mar 19  2009 Sources
   drwxr-xr-x  2 root root  4096 Feb 26  2008 bin
   drwxr-xr-x  4 root root 36864 Feb 26  2008 dev
   drwxr-xr-x  3 root root  4096 Feb 26  2008 etc
   drwxr-xr-x  2 root root  4096 Feb 26  2008 lib
   lrwxrwxrwx  1 root root    11 Aug 31 15:13 linuxrc -> bin/busybox
   drwxr-xr-x  2 root root  4096 Feb 25  2009 mnt
   drwxr-xr-x  2 root root  4096 Feb 26  2008 proc
   drwxr-xr-x  2 root root  4096 Feb 26  2008 sbin
   drwxrwxrwx  2 root root  4096 Sep  1 07:43 tmp
   drwxr-xr-x 10 root root  4096 Feb 26  2008 usr

- I put uImage.sheeva.20090319 into /tftpboot


- I update uboot parameter like Appendix C
    set ipaddr 192.168.0.199
    set serverip 192.168.0.154
    set rootpath /opt/sheevaplug/rootfsv1.0
    set image_name uImage.sheeva.20090319
    set console 'console=ttyS0,115200 mtdparts=nand_flash:0x100000@0x000000(u-boot),0x400000@0x10000 0(uImage),0x1f800000@0x500000(rootfs)rw'
    set bootargs_root 'root=/dev/nfs rw'
    set bootargs_end ‘:::DB88FXX81:eth0:none’
    set bootcmd 'tftpboot 0x2000000 $(image_name);setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000'
    saveenv
    reset



What's going wrong ?

Thanks very much for you help.
Logged

bob38
Newbie
*

Karma: 1
Posts: 22


View Profile
« Reply #1 on: September 02, 2010, 12:42:17 AM »


Hi,

after several trials, my SheevaPlug boot on NFS. I just change the bootcmd parameter, to not get uImage from tftpboot !

so, I set it:

set bootcmd 'nand read.e 0x800000 0x100000 0x400000;setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x800000'

Then, I can update my Linux rootfs... But I don't understand why it doesn't work by using kernel in tftp Huh

After this update, I update the bootcmd and bootargs described in the chapter 2 of the documentation:
       PlugComputer Development Kit Writing Jaunty Filesystem on the NAND Flash.pdf

It says:
8. At the U-Boot prompt, change the following parameters.
    a. Marvell>> setenv bootargs 'console=ttyS0,115200
        mtdparts=nand_flash:0x400000@0x100000(uImage)ro,0x1fC00000@0x500000(
        rootfs)rw root=/dev/mtdblock2'
    b. Marvell>> saveenv
    c. Marvell>> setenv bootcmd 'nand read.e 0x800000 0x100000 0x400000; bootm
        0x800000'
    d. Marvell>> saveenv

With these commands, I have the errors:
     No filesystem could mount root, tried:  ext3 ext2 ext4 cramfs vfat msdos jfs
     Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
     [<c0030a14>] (unwind_backtrace+0x0/0xe0) from [<c003dbec>] (panic+0x50/0x120)
     [<c003dbec>] (panic+0x50/0x120) from [<c0008ec0>] (mount_block_root+0x1d4/0x214)
     [<c0008ec0>] (mount_block_root+0x1d4/0x214) from [<c0009168>] (prepare_namespace+0x16c/0x1c4)
     [<c0009168>] (prepare_namespace+0x16c/0x1c4) from [<c0008734>] (kernel_init+0xc0/0xec)
     [<c0008734>] (kernel_init+0xc0/0xec) from [<c0040bf8>] (do_exit+0x0/0x6ac)

So, I just update the bootargs to specify the rootfs type:

set bootargs 'rootfstype=jffs2 console=ttyS0,115200 mtdparts=nand_flash:0x400000@0x100000(uImage),0x1fc00000@0x500000(rootfs)rw root=/dev/mtdblock2'

and all is fine  Smiley




Logged

Pages: [1]
Print
Jump to: