cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bfung_2
Adventurer
Adventurer
383 Views
Registered: ‎07-02-2020

Petalinux 2020.1 NFS Root FS Boot

Jump to solution
  • Configured NFS (/mnt/nfs_petalinux) on my server
  • On the server (10.1.50.145) in /etc/exports, I add

 

/mnt/nfs_petalinux 10.1.50.137(rw,sync,no_subtree_check,no_root_squash,insecure)

 

  • I do a test mount on another client computer and can confirm I can read and write into the NFS...good
  • Configured petalinux-config with the appropriate details of the NFS on my server
  • Petalinux-build, and toss BOOT.BIN, boot.scr, and image.ub into a FAT partition on an SD Card, then boot up the Zynq-7000...
  • I extract rootfs.tar.gz into /mnt/nfs_petalinux
  • Kernel boot-args:

 

Kernel command line: console=ttyPS0,115200 earlycon root=/dev/nfs nfsroot=10.1.50.145:/mnt/nfs_petalinux,tcp ip=dhcp rw

 

Short History of the Kernel Boot Log

 

mmc0: new high speed SDHC card at address aaaa
mmcblk0: mmc0:aaaa SE32G 29.7 GiB 
 mmcblk0: p1
macb e000b000.ethernet eth0: link up (1000/Full)
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Sending DHCP requests ., OK
IP-Config: Got DHCP answer from 10.1.50.1, my address is 10.1.50.137
IP-Config: Complete:
     device=eth0, hwaddr=00:0a:35:00:1e:53, ipaddr=10.1.50.137, mask=255.255.254.0, gw=10.1.50.1
     host=10.1.50.137, domain=, nis-domain=(none)
     bootserver=0.0.0.0, rootserver=10.1.50.145, rootpath=
     nameserver0=10.1.54.31, nameserver1=8.8.8.8, nameserver2=8.8.4.4
ALSA device list:
  No soundcards found.
random: fast init done

random: crng init done

 

Whereupon it'll hang here for a while, then...kernel panic!

 

VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0100           16384 ram0 
 (driver?)
0101           16384 ram1 
 (driver?)
0102           16384 ram2 
 (driver?)
0103           16384 ram3 
 (driver?)
0104           16384 ram4 
 (driver?)
0105           16384 ram5 
 (driver?)
0106           16384 ram6 
 (driver?)
0107           16384 ram7 
 (driver?)
0108           16384 ram8 
 (driver?)
0109           16384 ram9 
 (driver?)
010a           16384 ram10 
 (driver?)
010b           16384 ram11 
 (driver?)
010c           16384 ram12 
 (driver?)
010d           16384 ram13 
 (driver?)
010e           16384 ram14 
 (driver?)
010f           16384 ram15 
 (driver?)
b300        31166976 mmcblk0 
 driver: mmcblk
  b301         2097152 mmcblk0p1 de56c1af-01

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.0-xilinx-v2020.1 #1
Hardware name: Xilinx Zynq Platform
[<c010e41c>] (unwind_backtrace) from [<c010a1c8>] (show_stack+0x10/0x14)
[<c010a1c8>] (show_stack) from [<c06a1aa8>] (dump_stack+0xb4/0xd0)
[<c06a1aa8>] (dump_stack) from [<c010ca04>] (ipi_cpu_stop+0x3c/0x98)
[<c010ca04>] (ipi_cpu_stop) from [<c010d250>] (handle_IPI+0x64/0x80)
[<c010d250>] (handle_IPI) from [<c033ef34>] (gic_handle_irq+0x84/0x90)
[<c033ef34>] (gic_handle_irq) from [<c0101a8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc0b01d18 to 0xc0b01d60)
1d00:                                                       c0b01d98 00000000
1d20: 0000003c ef6cf380 c0a38380 ef03eb00 ef6d6180 2ec97000 ef03eb00 00000000
1d40: 00000000 c0b38458 00000000 c0b01d68 c0144f08 c06a0a40 60000113 ffffffff
[<c0101a8c>] (__irq_svc) from [<c06a0a40>] (memset+0x0/0xa8)
[<c06a0a40>] (memset) from [<c0144f08>] (load_balance+0x58/0x724)
[<c0144f08>] (load_balance) from [<c01457b8>] (rebalance_domains+0x1e4/0x298)
[<c01457b8>] (rebalance_domains) from [<c0102328>] (__do_softirq+0x180/0x1e4)
[<c0102328>] (__do_softirq) from [<c011fc14>] (irq_exit+0x64/0xc4)
[<c011fc14>] (irq_exit) from [<c01595e0>] (__handle_domain_irq+0x74/0xa0)
[<c01595e0>] (__handle_domain_irq) from [<c033ef08>] (gic_handle_irq+0x58/0x90)
[<c033ef08>] (gic_handle_irq) from [<c0101a8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc0b01ee0 to 0xc0b01f28)
1ee0: 00000000 0000006e 2ec97000 ef6d6180 c0b2d5ac 00000000 ef6d5578 00000000
1f00: 67622d9d 67fa0053 0000006e 0000006e fffffff5 c0b01f30 c052b3bc c052b3e0
1f20: 60000013 ffffffff
[<c0101a8c>] (__irq_svc) from [<c052b3e0>] (cpuidle_enter_state+0xec/0x288)
[<c052b3e0>] (cpuidle_enter_state) from [<c052b5b8>] (cpuidle_enter+0x28/0x38)
[<c052b5b8>] (cpuidle_enter) from [<c0140324>] (do_idle+0x230/0x258)
[<c0140324>] (do_idle) from [<c01404b0>] (cpu_startup_entry+0x18/0x1c)
[<c01404b0>] (cpu_startup_entry) from [<c0a00cb8>] (start_kernel+0x3a0/0x440)
[<c0a00cb8>] (start_kernel) from [<00000000>] (0x0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0) ]---

 

I'm led to believe my NFS server is correctly configured since I can mount, read, and write from another client.

I'm thinking there's something I need to change in petalinux?

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
bfung_2
Adventurer
Adventurer
152 Views
Registered: ‎07-02-2020

Thanks @watari for the suggestion.

I managed to mount using NFS v4 by a combination of two strategies:

1) Disabling ufw (brute force approach I know - but for some reason ufw keeps blocking my connections even though I explicitly allowed it)

2) Explicit kernel bootargs to u-boot cmd line:

 

setenv bootargs 'console=ttyPS0,115200 root=/dev/nfs nfsroot=10.1.50.145:/mnt/nfs_petalinux ip=dhcp'

 

View solution in original post

0 Kudos
4 Replies
watari
Teacher
Teacher
347 Views
Registered: ‎06-16-2013

Hi @bfung_2 

 

What is your nfs protocol version ?

I guess you might have to use v3.

 

>I do a test mount on another client computer and can confirm I can read and write into the NFS...good

 

BTW, if ip address at an another client is 10.1.50.137, your mentioned is correct.

But I can't believe it. (I suspect different IP address...)

 

Best regards,

bfung_2
Adventurer
Adventurer
340 Views
Registered: ‎07-02-2020

I am using NFS v4.

Yes, my test client was at another IP address which I didn’t include in my message. Nevertheless, my client was able to mount the NFS.

0 Kudos
watari
Teacher
Teacher
336 Views
Registered: ‎06-16-2013

Hi @bfung_2 

 

Would you change nfs protocol version from 4 to 3 ?

 

Best regards,

bfung_2
Adventurer
Adventurer
153 Views
Registered: ‎07-02-2020

Thanks @watari for the suggestion.

I managed to mount using NFS v4 by a combination of two strategies:

1) Disabling ufw (brute force approach I know - but for some reason ufw keeps blocking my connections even though I explicitly allowed it)

2) Explicit kernel bootargs to u-boot cmd line:

 

setenv bootargs 'console=ttyPS0,115200 root=/dev/nfs nfsroot=10.1.50.145:/mnt/nfs_petalinux ip=dhcp'

 

View solution in original post

0 Kudos