Jetson Nano - Root Password - Reset

~7months back i had a working project on jetson nano with 4.2 pack running on headless mode with tensorflow, opencv4 setup. I took a backup of sd card and have it as jetsonnano_backup.img which is ~64GB size. I didnot save the root password anywhere and now i cannot login to the jetson nano. My host machine runs ubuntu 18.04. I tried below approaches all with no use

  1. Downloaded and installed VM Ware workstation and tried to create a virtual machine with the .img file - it failed , workstation could not detect the image file
  2. Downloaded and installed Oracle VirtualBox and tried to create a virtual machine with .img file - it failed, virtualbox could not detect the image file
  3. Downloaded and installed PowerISO and tried creating an iso file from img file and it failed , poweriso detected the first partition but failed after that
  4. I tried the steps here but when i run the ./ it says “Invalid Board” I tried replacing it with - jetson, jetsonnano0(thats what my device was called before) ,nano - all with NO luck.

I had lot of dependencies to have my program run and i am worried if it will be a easy ride to get back to where i was. Lesson learnt the hard way :(.

Any help is appreciated.


Why is a virtual machine here? I don’t get the purpose of virtual machine.

You could just use the clone method in below link.

Also, requires you to enter some specific board config name but not your device name creating in ubuntu. is not that smart to know your board is called jetsonnano0. You could read the quick start guide on dlc to understand how to use

If your image is an entire SD card, then you cannot mount the entire card…you would have to mount one partition within the card. There is a lot of non-rootfs partition content used during boot. If the entire card’s image is present, then you can probably cover the entire image with loopback, and then mount a partition within this…or else use dd to extract a particular partition (rootfs) if you know the byte offsets. Do you know if you saved an entire SD card image, versus a partition?

@WayneWWW - i tried different approaches that i tought i might bring it back. I listed all the options i tried.
@linuxdev - I saved the entire SD Card. the reason why i know this is because when i try to convert to .iso using PowerISO the moment i selected source(in this case my 64GB .img file) it showed me 6 partitions where the first one had all the data.

If you cover the entire image with loopback, then assuming it is the first loop device (named “loop0”), and assuming your image is “sdimage.bin”, you can run gdisk operations on it, and then mount partitions seen by gdisk. Something like:

sudo -s
losetup --find --show ./sdimage.bin
gdisk -l /dev/loop0

Then one could copy a particular partition with dd just like with a regular disk. If you could copy “/dev/mmcblk0p1” partition, then there should also be a “/dev” file for the loopback partitions to dd. Or you could mount the loopback partition. Other information will be gained via “lsblk -f /dev/loop0”.

I don’t have your specific file, so I can’t give exact steps, but if you run into an issue and provide what message is visible, then we can probably figure out how to mount or extract just the rootfs partition in order to use password software (or directly mount the partition without extracting). When you do this also monitor what shows up in “dmesg --follow” since any created loop devices or partitions will likely show up there.