Qengineering / Jetson-Nano-Ubuntu-20-image

Jetson Nano with Ubuntu 20.04 image
https://qengineering.eu/install-ubuntu-20.04-on-jetson-nano.html
BSD 3-Clause "New" or "Revised" License
647 stars 70 forks source link

Image creation question. #9

Open martinerk0 opened 2 years ago

martinerk0 commented 2 years ago

Hi, can you describe workflow how to create such an image? I would like to create similar images for Xavier NX or other Jetson devices, and I used your image on nano successfully :)

Qengineering commented 2 years ago

https://qengineering.eu/install-ubuntu-20.04-on-jetson-nano.html

By the way, the latest JetPack 5.0 release has Ubuntu 20.04 on-board. (not available for the Nano yet)

martinerk0 commented 2 years ago

I read your post, but I was more interested if you somehow compressed it or anything. Did you just dd it byte for byte? I would like to install all needed stuff like Pytorch, ROS, etc and then create ~7Gb image from 128gb SD card, that you can burn with imager, like Raspberry OS images or Nvidia's Jetson default images.

longwm commented 2 years ago

If you download the Image which includes Pytorch + Open CV etc from the Gdrive link on Github it will run ROS2 no problem. I am using the image to run ROS2 Foxy without any issues. The image is 30 gigs once unzipped, you can write it using Balena etcher and then use Gparted to extend the partition to the full size of the SD card.

martinerk0 commented 2 years ago

@longwm yes but if you make changes to the OS and SD card, install some other packages, and then want to create smaller image (~10s of GBs) from larger SD card (100s of GBs) that contains lot of free space how do you do it? I saw some tutorials that you just dd it and zip should compress the free space but I wanted to know whole procedure from author ( that already has experience with it).

longwm commented 2 years ago

@longwm yes but if you make changes to the OS and SD card, install some other packages, and then want to create smaller image (~10s of GBs) from larger SD card (100s of GBs) that contains lot of free space how do you do it? I saw some tutorials that you just dd it and zip should compress the free space but I wanted to know whole procedure from author ( that already has experience with it).

If you want a smaller image, I can suggest the following options 1. Pythops has an image of sub 3 gigs (No Desktop) It works fine. Instructions here : https://pythops.com/post/create-your-own-image-for-jetson-nano-board.html & Git hub Here : https://github.com/pythops/jetson-nano-image 2. The other option is to use the original Jetson Image and pull Docker images for it, you can do that here : https://github.com/timongentzsch/Jetson_Ubuntu20_Images

Qengineering commented 2 years ago

If you're flashing an image from a 128GB card, balenaEtcher will want a 128GB card too, even if you're only using 24GB on your card. You need to reduce the size. I used GParted to split a large partition (eg 128 GB) into two parts. One with the data (24 GB) and the other without any valid data (104 GB). I then copied the 24 GB partition with dd to a new 32 GB SD card. (Some brands have only 31.3 GB of free space! #16) The next step is to use a tool like DiskInternals Linux Reader (if you have Windows) to create an image. The image can now be zipped if you wish.

mrcmunir commented 1 year ago

jetcard-master.zip Hello I'm using this script for automatic autoresize needed Setup this python script into you sdcard before Create backup image.

Qengineering commented 1 year ago

@mrcmunir ,

Try option 2.

rwbot commented 1 year ago

@longwm yes but if you make changes to the OS and SD card, install some other packages, and then want to create smaller image (~10s of GBs) from larger SD card (100s of GBs) that contains lot of free space how do you do it? I saw some tutorials that you just dd it and zip should compress the free space but I wanted to know whole procedure from author ( that already has experience with it).

I'm interested in creating my own images as well, with different versions of ROS/Ubuntu for each. @longwm Did you figure out a solution?