UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer ishahak
Observer
1,304 Views
Registered: ‎01-31-2018

Booting from NFS

Jump to solution

Hello,

I was trying to follow the instructions here:

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_1/ug1144-petalinux-tools-reference-guide.pdf

 

But it seems the instructions are not complete there.

I doesn't explain how to declare a server for NFS, which files should be put in the NFS share, how to setup the user/password for accessing the external share.

 

Besides, it tells to make an SD card with two partitions but only tells what to put in the first partition. Do we really need to have two partitions?

 

Can you please point me to a checklist that will allow me to have such setup working?

 

thank you!

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer ishahak
Observer
1,744 Views
Registered: ‎01-31-2018

Re: Booting from NFS

Jump to solution

So here is what worked for me:

 

I have to set the following bootargs:

 

setenv bootargs='console=ttyPS0,115200n8 ip=dhcp root=/dev/nfs rootfstype=nfs nfsroot=192.168.0.101:/usr/nfs/xilinx-zynq,port=2049,tcp rw loglevel=8 nfsrootdebug'

saveenv

 

The declaration of the share is of course appearing in /etc/exports. in my case:

/usr/nfs/xilinx-zynq *(rw,sync,insecure,no_root_squash,no_subtree_check)

 

It was super critical to go into petalinux-config -> Yocto -> Image packaging and declare there: NFS + /home/NFSShare. That was the enabler for the kernel to look into the NFS declarations in the bootargs variable.

 

To put the rootfs into my exported folder, I used this command:

 

cd /usr/nfs/xilinx-zynq

sudo pax -r -c -f <path-to-rootfs.cpio>

 

(if needs to install pax, use: sudo apt-get install pax)

 

Hoping this will help others!

 

 

 

View solution in original post

Tags (2)
0 Kudos
5 Replies
Scholar watari
Scholar
1,269 Views
Registered: ‎06-16-2013

Re: Booting from NFS

Jump to solution

Hi @ishahak

 

I guess, your question is for NFS server.

In this case, you should prepare NFS server to access it from anyone for debug, like the following.

 

$ cat /etc/export

/export/home 192.168.0.0/8(rw,sync,no_root_squash,no_all_squadsh)

 

Best regards,

 

0 Kudos
Observer ishahak
Observer
1,250 Views
Registered: ‎01-31-2018

Re: Booting from NFS

Jump to solution

Hi @watari,

Thanks for the response.

You are probably missing the 's' at the end of /etc/export.

 

Anyway, this is not what I was asking. Assuming the NFS share is already set correctly at the server, which files should be put there? 

Should I copy 'rootfs.cpio' and run sudo pax -r -c -f rootfs.cpio on it? or something else?

it is simply not documented!

 

Thanks!

0 Kudos
Scholar watari
Scholar
1,235 Views
Registered: ‎06-16-2013

Re: Booting from NFS

Jump to solution

Hi @ishahak

 

If you know a cpio format, I suggest to extract and archive rootfs.cpio by cpio command.

Of cause, you need to modify some setting file for NFS.

 

Best regards,

0 Kudos
Highlighted
Observer ishahak
Observer
1,745 Views
Registered: ‎01-31-2018

Re: Booting from NFS

Jump to solution

So here is what worked for me:

 

I have to set the following bootargs:

 

setenv bootargs='console=ttyPS0,115200n8 ip=dhcp root=/dev/nfs rootfstype=nfs nfsroot=192.168.0.101:/usr/nfs/xilinx-zynq,port=2049,tcp rw loglevel=8 nfsrootdebug'

saveenv

 

The declaration of the share is of course appearing in /etc/exports. in my case:

/usr/nfs/xilinx-zynq *(rw,sync,insecure,no_root_squash,no_subtree_check)

 

It was super critical to go into petalinux-config -> Yocto -> Image packaging and declare there: NFS + /home/NFSShare. That was the enabler for the kernel to look into the NFS declarations in the bootargs variable.

 

To put the rootfs into my exported folder, I used this command:

 

cd /usr/nfs/xilinx-zynq

sudo pax -r -c -f <path-to-rootfs.cpio>

 

(if needs to install pax, use: sudo apt-get install pax)

 

Hoping this will help others!

 

 

 

View solution in original post

Tags (2)
0 Kudos
Visitor cchabert
Visitor
1,098 Views
Registered: ‎03-01-2018

Re: Booting from NFS

Jump to solution

@ishahakThnx! It worked for me as well =)

0 Kudos