Forget passwordhow to get it back
Generally speaking you’d have to flash again if you don’t remember the password. Assuming this is an eMMC model you could first clone and save content. For the case of an SD card model you can easily save a copy of the SD card and use the stock SD, followed by adding your original content back in.
I can retrieve the image and mount it into the password management folder n
Is this the SD card dev kit? Or is it the eMMC module? Answers will depend on knowing that.
Design of EMMC module
In that case what you can do is:
- Clone the image of the rootfs.
- On the host PC, loopback mount this on the “
- Use the script “
l4t_create_default_user.sh” to put your user in place.
- Note that I don’t know if this works when there is already a default user, but probably it does work.
- If you cannot use that script directly, then you can apply that script to the original “
rootfs/” without the loopback mount, and then copy the updated files related to password to your image.
- Flash again with the edited image rather than generating a new “
Can you look in your “
Linux_for_Tegra/” directory and see if you have file “
l4t_create_default_user.sh”? If you have this, then try:
- Clone the Jetson in recovery mode via:
sudo ./flash.sh -r -k APP -G my_backup.img jetson-xavier-nx-devkit-emmc.conf mmcblk0p1
(I wish to emphasize your host PC will need about 50 GB of free space prior to starting and that this will run for a significant time).
- The above should have produced files “
my_backup.img” (a “sparse” file) and “
my_backup.img.raw” (a “raw” file). The sparse file is smaller, but you cannot directly edit this. Both files would work for flash, but since you are editing, then I would delete the sparse “
my_backup.img”. Then to mount over “
sudo mount -o loop my_backup.img.raw ./rootfs/
- At this point your original system is an overlay on top of the original “
rootfs/”. Changes made to this will change the loopback mounted file and not the original “
- See if “
l4t_create_default_user.sh” works (I am pretending your user name is “
jetson”, but adjust for your case, and also assuming the password is “
sudo ./l4t_create_default_user.sh -u jetson -p mypassword
- If this works, then “
sudo umount ./rootfs” to remove the overlay on top of the original
- Be very careful that you have enough disk space, and then copy the edited “
my_backup.img.raw” to the “
Linux_for_Tegra/bootloader/” directory (this file will be about 32 GB in size…big and slow):
sudo cp my_backup.img.raw ./bootloader/system.img
- Flash while telling the software to reuse your existing image:
sudo ./flash.sh -r jetson-xavier-nx-devkit-emmc mmcblk0p1
Here is an important point to remember: If you are not using a dev kit carrier board, and you are instead using another carrier board from a third party, then non-rootfs content would be customized for that board. The manufacturer of the other carrier board would have its own BSP. You would use that instead of the default Jetson flash software, but the steps would otherwise be the same. The goal is to have the non-rootfs content flashed by the correct software (either devkit or third party), and use the clone which was repaired as the
If you cannot use that
l4t_create_default_user.sh script, then we can use it on the original “
rootfs/” and copy the password related files, and then flash as above.