Update the rootfs without jetpack enviroment

Hi:

I got a special case that
I have a new image for downloading.
But there’s no Linux PC to be the host to executing the flash.sh.

I wonder putting the image into a USB storage then doing something to start the download process.

Is there any method to do this?

Thanks

Is the image from the same release which is currently running? Basically the rootfs must work with the other partitions, and if there is a major version change in L4T (see “head -n 1 /etc/nv_tegra_release”), then all partitions need update. An example is that going from R28.2 to R32.1 won’t work with just the rootfs being updated, but R28.2 going to R28.2.1 will work.

If you can boot up on alternate media, e.g., to a USB drive of some sort or SD card, then you can overwrite the rootfs using Linux itself. If you can’t boot, then the only method is with a Linux PC host (the flash software has Linux binary executables).

If you already had those other non-rootfs partitions, then you could do the same with those, but those partitions must be signed, and signing itself has to run on a Linux PC.

Hi:
Sorry for late reply,
I had SD-Card boot instead.
But the speed is pretty low.
Thanks

Keep in mind that in some later releases some content must be signed. If the rootfs is valid, including being a match for what is in the non-rootfs partitions, and if you are running on an alternate rootfs, then dd can be used. I have also seen (but not tested) references to using the “magic sysrq” system to trigger setting rootfs to read only (“sudo echo u > /proc/sysrq-trigger”) prior to dd of rootfs, but depending on what is running this may not always do what you want. What it comes down to is that a rootfs which is in use cannot be safely flashed by any method short of rsync.

If you do choose to attempt a flash of rootfs, and you know the image is valid and matches the other partitions, and are running on an alternate boot media (assuming SD card, mmcblk1p1 for this example case), then basically the following would work while logged in (assumes the new image is also on the SD card or otherwise available and has the file name “new_image.img.raw”):

sudo dd if=/where/ever/it/is/new_image.img.raw of=/dev/mmcblk0p1 bs=512

I highly suggest testing each such flash out before using it on anything important.

Note that there is no such thing as a fast flash. Using the flash.sh tool allows using a “sparse” image, which is smaller than a “raw” image, but time is spent converting the raw to sparse prior to flash. The benefit is that conversion of raw to sparse is usually done on a PC with a faster disk and CPU.

Thanks