How to reuse initrd massflash packages on another pc?

I’ve generated the massflash package with the script.

It created a folder starting with “mfi_” inside the root directory of the l4t bsp.
My board config has been copied, but the files it references are not inside that folder.
Despite the mfi folder containing a tools/kernel_flash directory I can not run the file from there. Files are missing.

The documentation tells me to still use the massflash command with the script from the normal tools folder.

Does the MFI folder contain all data required to flash the board standalone if I just tar them?
How can I flash with it then?
I’d like to move the package to a production pc.

Hi, what’s the result or error after you run

Well, the conf file which is used in the target conf is not copied, so it complains that it doesn’t exist.

If I add the file it says:

Log will be saved to Linux_for_Tegra/initrdlog/flash_1-1_0_20230508-060545.log
Ongoing processes: 4263

In fact I found the file here instead: mfi_p3509-0000+p3668-nvme/initrdlog/flash_1-1_0_20230508-060545.log

I can copy the mfi folder somewhere else and it will work.
As soon as I move the Linux_for_Tegra folder somewhere else it fails to flash since the flash command references files which are not in the mfi folder:

/mnt/wsl/data/projects/oms5/l4t_custom_creator_test/mfi_p3509-0000+p3668-nvme/tools/kernel_flash/  --usb-instance 1-1 --device-instance 0 --flash-only --external-device nvme0n1p1 -c "/mnt/wsl/data/projects/oms5/l4t_custom_creator/work/Linux_for_Tegra/tools/kernel_flash/flash_l4t_nvme_rootfs_ab.xml" -S 8GiB --network usb0 p3509-0000+p3668-nvme external
Start flashing device: 1-1, rcm instance: 0, PID: 13359
Log will be saved to Linux_for_Tegra/initrdlog/flash_1-1_0_20230508-061918.log
Ongoing processes: 13359
Ongoing processes:
Flash complete (WITH FAILURES)

When I check ongoing processes in htop I can see a flash command running. But it uses absolute paths to files in my Linux_for_Tegra folder.

The flash logs says nothing:

cat initrdlog/flash_1-1_0_20230508-061918.log
Job for nfs-server.service canceled.
Cleaning up...

seems like it’s a normal behavior as our script uses absolute paths as you mentioned.
I’ll check with our internal team, and see if we can add an option to select paths to BSP in future release.

I was hoping that the package geneterated for massflash would be standalone.
Otherwise there is not really a use of placing it in a separate folder and making copies of files which are in the L4T directory anyway.

We can of course use a copy of the L4T folder, but it is 53GB in my case and that will cause some issues. Please add a way of creating a tar file which can be copied to a production machine for flashing which is much smaller.

What are the command that you are using? This is an example:

I create a massflash package using this command:

sudo ./tools/kernel_flash/ --massflash 5 --network usb0 --no-flash concord mmcblk0p1

It will generate a mfi… tarball

you can copy that tarball to another location and when you need to use the tarball, you can untar it and go inside it and run

sudo ./tools/kernel_flash/ --massflash 5 --flash-only --network usb0

Hey @lhoang

Maybe there is a misunderstanding due to an undocumented feature. I did not see a tarball, just a folder. Where will the tarball be located? I used the same command as you just with 10 instances instead of 5.

It is under the Linux_for_Tegra folder

Also what version are you using?

When I post in the forum about issues then usually about the latest version. Sorry for not mentioning it. L4T 5.1.1
Will recreate the massflash and see if the file is there. Did not see it last time.

Yeah you were right. There is a tar.gz file.
It has the same content as the folder which I was using.

So it is missing referenced conf files and does not work anymore as soon as I rename my original BSP folder as the flash command referenced the xml partition file for the NVMe directly by its absolute path. So that will not work :(

What command are you using to flash again?


sudo ./tools/kernel_flash/ --massflash 5 --flash-only --network usb0

Does not use any conf file and partition config

I guess it’s bugged then?

Running this command from the root directory which is inside the tar:

sudo tools/kernel_flash/ --flash-only --massflash 10 --network usb0
/data/mfi_p3509-0000+p3668-nvme/tools/kernel_flash/ --network usb0 --usb-instance 1-1 --device-instance 0 --flash-only --external-device nvme0n1p1 -c "/data/Linux_for_Tegra/tools/kernel_flash/flash_l4t_nvme_rootfs_ab.xml" -S 8GiB --network usb0 p3509-0000+p3668-nvme external
Start flashing device: 1-1, rcm instance: 0, PID: 84474
Log will be saved to Linux_for_Tegra/initrdlog/flash_1-1_0_20230509-080457.log
Ongoing processes: 84474
Ongoing processes:
Flash complete (WITH FAILURES)
exportfs: Failed to stat /data/Linux_for_Tegra/rootfs: No such file or directory
exportfs: Failed to stat /data/Linux_for_Tegra/tools/kernel_flash: No such file or directory

/data/Linux_for_Tegra is the path to my BSP…I moved the folder to test the mfi package.

that is weird I do not see that behaviour. do you have


in your /etc/exports file

Yes I added them in there while the BSP was there. After removing the BSP that does not work anymore, naturally…

Yeah you need to remove that line if you add it manually. It will not work if there is any non existent paths in your /etc/exports file


This is not solved yet. I just did not have the time to follow this issue anymore as there was another bug in my way.

Seems to work when I remove all the content of /etc/exports.

The only bug is that not all referenced .conf files are copied and the mfi package is not usable without user modification.