Boot FS via NFS on Pandaboard

2053 views
Skip to first unread message

Gr3yh0und

unread,
Aug 13, 2011, 6:26:07 PM8/13/11
to pandaboard
Hey guys,

I learned on ATNGW100 and mini2400 and I'm now getting on to panda and
beagle. But i'm still stuck in getting a running network fs.

I've compiled the newest X-Loader and U-Boot for both boards and have
the demo kernel file (still need to look depper into that) on the SD
Card. However I now want to load the root filesystem via NFS from my
development system. Any ideas, which parameters i need?

I've found nothing to that topic on the web :-/

I.e. setenv bootargs ttyO2,115200 root=/dev/nfs rw
nfsroot=192.168.1.1:root=/dev/nfs rw nfsroot=192.168.1.1:/panda/fs
ip=192.168.1.2

Gr3yh0und

unread,
Aug 14, 2011, 6:57:28 PM8/14/11
to pandaboard
Well, refering to Jeffrey Wang here http://groups.google.com/group/pandaboard/msg/8a591dde88a9486f
the bootargs must be something like

setenv bootargs console=ttyO2,115200n8 mem=456M@0x80000000
mem=512M@0xA0000000 init=/init vram=32M smsc95xx.macaddr=76:2F:
97:85:4F:56 root=/dev/nfs rw nfsroot=192.168.1.1:/panda/
fs,nolock,wsize=1024,rsize=1024 ip=192.168.1.2 rootdelay=2

Doing a mmc rescan and load the kernel via
Panda # mmc rescan
Panda # fatload mmc 0 0x82000000 uImage
reading uImage
2733352 bytes read

Doing a
Panda # bootm
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-2.6.35-g6d019da-dirty
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2733288 Bytes = 2.6 MiB
...
...
usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
smsc95xx v1.0.4
smsc95xx 1-1.1:1.0: usb0: register 'smsc95xx' at usb-ehci-omap.0-1.1,
smsc95xx USB 2.0 Ethernet, 76:2f:97:85:4f:56
Looking up port of RPC 100003/2 on 192.168.1.1
rpcbind: server 192.168.1.1 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.1.1
rpcbind: server 192.168.1.1 not responding, timed out

Root-NFS: Unable to get mountd port number from server, using default
Root-NFS: Server returned error -101 while mounting /panda/fs
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:

b300 15768576 mmcblk0 driver: mmcblk
b301 72261 mmcblk0p1
b302 15695505 mmcblk0p2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-
block(2,0)
CPU1: stopping

Any ideas? :-/

modyrater

unread,
Aug 14, 2011, 11:04:13 PM8/14/11
to panda...@googlegroups.com

Omapedia

Gr3yh0und

unread,
Aug 16, 2011, 7:52:43 AM8/16/11
to pandaboard
Not very helpful. I already searched OMAPPedia twice and only found
some NFS boot roundup about Zooms, where the options cannot be 1:1
applied to pandaboard. Also most of the options are already apart.

I recently changed the kernels and also built some by myself. For my
mini2440 kernel to bootup properly, i had to change the
NFS_DEF_OPTIONS variable in fs/nfs/nfsroot.c to their old value
"vers=2,udp,rsize=4096,wsize=4096".
But also that doesn't help the kernel to get alive. But it's working
so far as the NIC lights are blinking - a little bit of gain...

Others on the u-boot patchtree made some patches for the smsc95xx NIC
chip and added it. But they are still not up in the mainline of u-boot
and i failed applying the patches manually. Booting the kernel via
tftp would be nice, but not mandatory. Remote NFS IS mandatory for me
for development purposes...

Dechesne, Nicolas

unread,
Aug 16, 2011, 8:46:40 AM8/16/11
to panda...@googlegroups.com


On Tue, Aug 16, 2011 at 1:52 PM, Gr3yh0und <kleinm...@googlemail.com> wrote:
I recently changed the kernels and also built some by myself. For my
mini2440 kernel to bootup properly, i had to change the
NFS_DEF_OPTIONS variable in fs/nfs/nfsroot.c to their old value
"vers=2,udp,rsize=4096,wsize=4096".
But also that doesn't help the kernel to get alive. But it's working
so far as the NIC lights are blinking - a little bit of gain...

Others on the u-boot patchtree made some patches for the smsc95xx NIC
chip and added it. But they are still not up in the mainline of u-boot
and i failed applying the patches manually. Booting the kernel via
tftp would be nice, but not mandatory. Remote NFS IS mandatory for me
for development purposes...

i don't think you need any patch in uboot to do that. patches in uboot you are refering to are for PXE or TFTP boot where you download the kernel image from the network. but assuming that your kernel image is on SD, all you need to mount the rootFS over NFS is to make sure that your kernel is built with all the drivers required to access ethernet (that includes USB Host for panda). that's likely what you are missing. the other option is to create an initrd image, but that's a bit more difficult. then you just pass the proper root= arguments in the bootargs.

Ashwini Singh

unread,
Aug 16, 2011, 10:03:12 AM8/16/11
to pandaboard
Hi Grey Hound,



KERNEL CONFIGURATION:
Enable Ethernet Driver (if disabled) and 'NFS Support' (CONFIG_NFS_FS
& CONFIG_ROOT_NFS) in kernel configuration.



INSTALL NFS:
apt-get install nfs-kernel-server nfs-common

ALLOW YOUR DEVICE TO ACCESS NFS (kept in /myfs)
vi /etc/exports

add this line:
/myfs 192.168.0.1/24(rw,sync,no_root_squash)

{192.168.0.x/24 - any device on network 192.168.0.*}



RESTART NFS:
/etc/init.d/nfs-kernel-server restart



BOOT-ARGUMENTS (that i used): for release -
http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes
http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes#Bootargs

FINE-TUNED rootfs env: setenv rootfs ip=DHCP root=/dev/nfs rw
nfsroot=192.168.0.32:/myfs
@ Everyone:
How can i make it work using static IP?


Thank You.
- Ashwini

Jeffrey Wang

unread,
Aug 17, 2011, 1:58:48 AM8/17/11
to pandaboard
Dear Ashwini :

for Static IP , try to edit your bootarg:

ip=192.168.2.111:192.168.2.234:192.168.2.254:255.255.255.0::usb1:on
~~~~~~~~~~~ ~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~
pandaborad's IP Server IP gateway netmask

In my experience this shall work to mount NFS on static IP.

Best Regards
Jeffrey Wang

On 8月16日, 下午10時03分, Ashwini Singh <asingh.e...@in.com> wrote:
> Hi Grey Hound,
>
> KERNEL CONFIGURATION:
> Enable Ethernet Driver (if disabled) and 'NFS Support' (CONFIG_NFS_FS
> & CONFIG_ROOT_NFS) in kernel configuration.
>
> INSTALL NFS:
> apt-get install nfs-kernel-server nfs-common
>
> ALLOW YOUR DEVICE TO ACCESS NFS (kept in /myfs)
> vi /etc/exports
>
> add this line:
> /myfs 192.168.0.1/24(rw,sync,no_root_squash)
>
> {192.168.0.x/24 - any device on network 192.168.0.*}
>
> RESTART NFS:
> /etc/init.d/nfs-kernel-server restart
>
> BOOT-ARGUMENTS (that i used): for release -http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Noteshttp://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Notes#Bo...

Ashwini Singh

unread,
Aug 17, 2011, 4:42:00 AM8/17/11
to pandaboard


On Aug 17, 10:58 am, Jeffrey Wang <temjim1...@gmail.com> wrote:
> Dear Ashwini :
>
> for Static IP , try to edit your bootarg:
>
> ip=192.168.2.111:192.168.2.234:192.168.2.254:255.255.255.0::usb1:on
>     ~~~~~~~~~~~  ~~~~~~~~~  ~~~~~~~~~~ ~~~~~~~~~~
>     pandaborad's IP  Server IP       gateway          netmask
>
> In my experience this shall work to mount NFS on static IP.
>
> Best Regards
> Jeffrey Wang
>
> On 8月16日, 下午10時03分, Ashwini Singh <asingh.e...@in.com> wrote:
>
> > Hi Grey Hound,
>
> > KERNEL CONFIGURATION:
> > Enable Ethernet Driver (if disabled) and 'NFS Support' (CONFIG_NFS_FS
> > & CONFIG_ROOT_NFS) in kernel configuration.
>
> > INSTALL NFS:
> > apt-get install nfs-kernel-server nfs-common
>
> > ALLOW YOUR DEVICE TO ACCESS NFS (kept in /myfs)
> > vi /etc/exports
>
> > add this line:
> > /myfs 192.168.0.1/24(rw,sync,no_root_squash)
>
> > {192.168.0.x/24 - any device on network 192.168.0.*}
>
> > RESTART NFS:
> > /etc/init.d/nfs-kernel-server restart
>
> > BOOT-ARGUMENTS (that i used): for release -http://www.omappedia.org/wiki/PandaBoard_L27.12.1-P2_Release_Noteshtt......
>
> > FINE-TUNED rootfs env: setenv rootfs  ip=DHCP root=/dev/nfs rw
> > nfsroot=192.168.0.32:/myfs
>
> > On Aug 14, 3:26 am, Gr3yh0und <kleinmors...@googlemail.com> wrote:
>
> > > Hey guys,
>
> > > I learned on ATNGW100 and mini2400 and I'm now getting on to panda and
> > > beagle. But i'm still stuck in getting a running network fs.
>
> > > I've compiled the newest X-Loader and U-Boot for both boards and have
> > > the demo kernel file (still need to look depper into that) on the SD
> > > Card. However I now want to load the root filesystem via NFS from my
> > > development system. Any ideas, which parameters i need?
>
> > > I've found nothing to that topic on the web :-/
>
> > > I.e. setenv bootargs ttyO2,115200 root=/dev/nfs rw
> > > nfsroot=192.168.1.1:root=/dev/nfs rw nfsroot=192.168.1.1:/panda/fs
> > > ip=192.168.1.2
>
> > @ Everyone:
> > How can i make it work using static IP?
>
> > Thank You.
> > - Ashwini
>
>

Thank You Jeffrey.
- Ashwini

Gr3yh0und

unread,
Aug 17, 2011, 7:20:32 AM8/17/11
to pandaboard
Thanks Nicolas and Ashwini for the startup help. I got it working for
me mostly...

Just one thing, maybe you have an idea: I'm building my fs using
buildroot but I get no login prompt over serial. I found out that the
ttyO2 on the system points to whatever not working. I made an symbolic
link to /dev/console and named it ttyO2. But actually I'm getting some
errors and cannot login via root. To what console must the one point?
( "-sh: can't access tty; job control turned off")

I made a tutorial based on my experiences:
http://gr3yh0und.wordpress.com/2011/08/17/booting-the-pandaboard-over-nfs/
Mainly I needed to enable USB EHCI Mode and the USB ETH NIC driver
combined with the NFS settings. Thanks!

Dechesne, Nicolas

unread,
Aug 22, 2011, 8:47:43 AM8/22/11
to panda...@googlegroups.com
On Wed, Aug 17, 2011 at 1:20 PM, Gr3yh0und <kleinm...@gmx.de> wrote:
Thanks Nicolas and Ashwini for the startup help. I got it working for
me mostly...

Just one thing, maybe you have an idea: I'm building my fs using
buildroot but I get no login prompt over serial. I found out that the
ttyO2 on the system points to whatever not working. I made an symbolic
link to /dev/console and named it ttyO2. But actually I'm getting some
errors and cannot login via root. To what console must the one point?
( "-sh: can't access tty; job control turned off")

there is a buildroot config option : BR2_TARGET_GENERIC_GETTY_PORT ( in System config) where you can specify on which port buildroot will run a getty. are you missing this?

iirc, this option will put the appropriate entry in the init script


I made a tutorial based on my experiences:
http://gr3yh0und.wordpress.com/2011/08/17/booting-the-pandaboard-over-nfs/
Mainly I needed to enable USB EHCI Mode and the USB ETH NIC driver
combined with the NFS settings. Thanks!

thanks for the tutorial! this is really nice to take the time to write this!

Gr3yh0und

unread,
Aug 25, 2011, 12:05:48 PM8/25/11
to pandaboard
Thanks,

I needed to enable the devtmpfs option in my kernel config
(Generic/...) to get those udev stuff working! Took me some time :)

Dechesne, Nicolas

unread,
Aug 25, 2011, 12:10:20 PM8/25/11
to panda...@googlegroups.com
sure...i should have told you.. but i thought it was the default (at least in recent BR)... glad it works!

barun...@gmail.com

unread,
Jul 22, 2013, 5:08:00 AM7/22/13
to panda...@googlegroups.com
Hi,

I have followed your tutorial to boot my panda from NFS.

http://gr3yh0und.wordpress.com/2011/08/17/booting-the-pandaboard-over-nfs/

But its not working.

I have used the following bootargs.
macaddres: is the mac address of the PC--please let me know if it has to be of the board.
setenv bootargs vram=32M console=ttyO2,115200 mem=456M@0x80000000 smsc95xx.macaddr=b8:ac:6f:34:e4:90 root=/dev/nfs rw nfsroot=10.1.101.146:/panda/fs,nolock,wsize=1024,rsize=1024 ip=10.1.101.167 rootdelay=2 init=/linuxrc omapdss.def_disp=hdmi
setenv bootcmd 'mmc rescan 0;fatload mmc 0 0x80000000 uImage; bootm 0x80000000'
boot


My minicom output is


  5.175659] Sending DHCP and RARP requests .
[    5.205963] usb 1-1.3: New USB device found, idVendor=413c, idProduct=2003
[    5.213592] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    5.221435] usb 1-1.3: Product: Dell USB Keyboard
[    5.226562] usb 1-1.3: Manufacturer: Dell
[    5.235443] input: Dell Dell USB Keyboard as /devices/platform/omap/usbhs_omap/ehci-omap.0/usb1/1-1/1-1.3/1-1.3:1.0/input/input3
[    5.249145] generic-usb 0003:413C:2003.0002: input: USB HID v1.10 Keyboard [Dell Dell USB Keyboard] on usb-ehci-omap.0-1.3/input0
[    6.140289] (stk) :line disc installation timed out
[    6.145568] (stk) :ldisc_install = 0
[    6.253753] (stk) :ldisc_install = 1
[    6.679046] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
[    7.257476] (stk) :line disc installation timed out
[    7.263366] (stk) :ldisc_install = 0
[    7.372100] (stk) :ldisc_install = 1.
[    8.347045] (stk) :line disc installation timed out
[    8.352416] (stk) :ldisc_install = 0
[    8.461730] (stk) :ldisc_install = 1
[    9.467895] (stk) :line disc installation timed out
[    9.473266] (stk) :ldisc_install = 0
[    9.581878] (stk) :ldisc_install = 1
[   10.538696] (stk) :line disc installation timed out
[   10.544189] (stk) :ldisc_install = 0
[   10.548095] Bluetooth: st_register failed -22
[   12.866851] .
[   20.192871] ...
[   62.007873] omap-rproc omap-rproc.1: rproc_loader_cont: failed to load ducati-m3.bin
[   83.632476]  timed out!
[   83.839080] IP-Config: Retrying forever (NFS root)...
[   83.979522] Sending DHCP and RARP requests .
[   85.631591] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1



Please help me to resolve this issue.

Thanks,
Arun
Reply all
Reply to author
Forward
0 new messages