Query: Initrd flashing via eth0

How is initrd flashing via eth0 intended to work? Is there an example anywhere?

My rootfs image is quite large so flashing Jetsons via USB2 is taking a long time. Therefore I am looking at flashing via ethernet.

My host PC is ubuntu 22. It’s not a VM.

I am trying to flash an Orin Nano with Jetpack 6.2.1, on the official devboard and have read the notes in README_initrd_flash.txt. This mentions adding the eth0 parameter, and a syntax example is given in l4t_initrd_flash.func:

–network eth0:192.168.0.17/24:192.168.0.21

If I build an image and try to flash like this :

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only

my flash succeeds (obviously over usb0).

However if I follow the syntax given and try:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --network eth0:192.168.0.248/24:192.168.0.127

Where .248 is my device and .127 is my host PC, I get this error:

***************************************
*                                     *
*  Step 3: Start the flashing process *
*                                     *
***************************************
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for target to boot-up...
Waiting for device to expose ssh ......Waiting for device to expose ssh ...Run command: flash on fc00:1:1:0::2
15:54:22.751 - Debug: Debug log saved to /tmp/tmp.btBoiF6ylA.
SSH ready
mount.nfs: access denied by server while mounting [fc00:1:1:0::1]:/home/user/jetson_flasher_ixs2/6.2.1/Linux_for_Tegra/rootfs
15:54:23.178 - Error: Flash failure.
15:54:23.181 - Error: Either the device cannot mount the NFS server on the host or a flash command has failed. Check your network setting (VPN, firewall,...) to make sure the device can mount NFS server. Debug log saved to /tmp/tmp.btBoiF6ylA. You can access the target's terminal through "sshpass -p root ssh root@fc00:1:1:0::2" 
15:54:23.183 - Debug: The last 5 lines of the debug log are:
SSH ready
mount.nfs: access denied by server while mounting [fc00:1:1:0::1]:/home/user/jetson_flasher_ixs2/6.2.1/Linux_for_Tegra/rootfs
Cleaning up...

Logging in to the initrd via ssh root@fc00:1:1:0::2 I get:

ip a
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 48:b0:2d:eb:df:63 brd ff:ff:ff:ff:ff:ff
3: usb0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 6a:98:e9:f0:8d:47 brd ff:ff:ff:ff:ff:ff
    inet6 fc00:1:1::2/64 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::6898:e9ff:fef0:8d47/64 scope link 
       valid_lft forever preferred_lft forever
    inet6 fe80::1/128 scope link 
       valid_lft forever preferred_lft forever

So the eth0 interface is not set up in the initrd.
I can turn it on with:

ifconfig eth0 up
# and
dhclient eth0
# then
ip a
# which gives me
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 48:b0:2d:eb:df:63 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.248/24 brd 192.168.0.255 scope global dynamic eth0
       valid_lft 86397sec preferred_lft 86397sec

So the correct IP address is now assigned.

But now I can’t flash, because the host can’t find the board anymore:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --network eth0:192.168.0.248/24:192.168.0.127
# Entry added by NVIDIA initrd flash tool
/home/user/jetson_flasher_ixs2/6.2.1/Linux_for_Tegra/tools/kernel_flash/tmp 127.0.0.1(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
rpcbind: another rpcbind is already running. Aborting
Export list for localhost:
/home/calum/jetson_flasher_ixs2/6.2.1/Linux_for_Tegra/tools/kernel_flash/tmp 127.0.0.1
16:02:31.585 - Debug: Checking UFW status and NFS port rules...
16:02:31.642 - Debug: UFW is not active. NFS port is accessible.
16:02:31.643 - Debug: Checking VPN connections...
16:02:31.646 - Debug: IPSec service is not running.
16:02:31.647 - Debug: VPN routes none in tun|tap|ppp|vpn|gpd.
16:02:31.648 - Debug: No VPN connection detected.
No devices to flash

and I need to power cycle the board before trying again.

so, what is the recommended way to do an initrd flash over eth0?

Hi,

Please provide the serial console log for us to review.

Thanks