How to create image without expand allocated space

Hi all,
I created a image from jetpack that I loaded into jetson and has some modification and I created image from that, and the totall size of image is 17GB and I used 32 GB SD-Card.
My problem is that when I loaded that image into SD card, I need to expand the unallocated space of sd-card. Is there a way that is not needed for expand of this space. I know one solution is that to create image with tolall size 32GB same as sd-card, but I don’t need to this solution, becuase if I want to change the SD-card form 32 to 64 or more I have to expand that unallocated space.

Hi LoveNvidia,

You can use “jetson-disk-image-creator.sh” script to create disk image.
This script is on: /JetPack/Linux_for_Tegra/tools/
Then using Etcher tool to flash create image on SDcard.
After device boot up and in system configuration setup proceed, you can setup the APP partition value from “APP Partition size” page. (Please connect HDMI display on Nano).

@carolyuu,
I don’t find jetson-disk-image-creator.sh file, Where is that?
Is it possible to use this for jetson nx?

~/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_XAVIER_NX/Linux_for_Tegra$ find -iname “jetson-disk*”
./tools/jetson-disk-image-creator.sh

Do you see that?

I don’t find ~/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_XAVIER_NX/Linux_for_Tegra.

This is inside the Jetpack-4.4 package? Or I have to download another package.

Hi,

You didn’t try sdkmanager before, right?
This is on your host but not device.

@WayneWWW,
I didn’t used sdkmanager for flashing the image into jetson.

Hi! I have a similar situation, i have my system.img with modifications, and i would like to use the jetson-disk-image-creator.sh with my modified system.img file to burn it in an SDcard.

So i achieved to create the sd-blob.img file, but every time i burn it in my SDcard and plug it into my jetson it gaves me fresh install without my modifications, why?

It’s possible to port my OS modifications to a img file to burn a SDcard? I also know it’s not possible use directly my system.img modified to burn the SDcard that’s why i tried the jetson-disk-image-creator.sh

Appreciate any advise Thanks!

1 Like

@marcel.builes, Hi dear,
Is it possible to share jetson-disk-image-creator.sh file here, I can’t find that. Where is that file in packages?

Hi Love

I’m using the default created by the SDKM in the path nvidia/JetPack_4.4_JETSON-TYPE/Linux_for_Tegra/tools
jetson-disk-image-creator.sh
Attached is the file, i named it as jetson-disk-image-creator.sh.log because is not possible to upload this type of file jetson-disk-image-creator.sh.log (6.8 KB)

Also the info i used can be found in the nvidia’s page URL section named “Flashing to an SD Card”

Also include part of the output in which it’s the system.img created

> sudo ./jetson-disk-image-creator.sh -o sd-blob300.img -b jetson-nano -r 300
> [sudo] password for jetson: 
> ********************************************
>      Jetson Disk Image Creation Tool     
> ********************************************
> jetson-disk-image-creator.sh - creating signed images
> ~/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra ~/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/tools
> ###############################################################################
> # L4T BSP Information:
> # R32 , REVISION: 4.3
> ###############################################################################
> Board ID(3448) version(300) 
> copying bctfile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/t210ref/BCT/P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.cfg)... done.
> copying bootloader(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
> copying initrd(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/l4t_initrd.img)... done.
> 	populating kernel to rootfs... done.
> 	populating initrd to rootfs... done.
> 	populating /home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb to rootfs... done.
> Making Boot image... done.
> Existing sosfile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/nvtboot_recovery.bin) reused.
> copying tegraboot(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/t210ref/nvtboot.bin)... done.
> copying cpu_bootloader(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
> copying bpffile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/t210ref/sc7entry-firmware.bin)... done.
> Existing badpagefile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/badpage.bin) reused.
> copying wb0boot(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/t210ref/warmboot.bin)... done.
> Existing tosfile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/tos-mon-only.img) reused.
> Existing eksfile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/eks.img) reused.
> copying dtbfile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb)... done.
> Copying nv_boot_control.conf to rootfs
> Making system.img... 
> 	populating rootfs from /home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/rootfs ... done.
> 	populating /boot/extlinux/extlinux.conf ... done.
> 	Sync'ing system.img ... done.
> 	Converting RAW image to Sparse image... done.
> system.img built successfully. 
> Existing tbcfile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/nvtboot_cpu.bin) reused.
> copying tbcdtbfile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/kernel/dtb/tegra210-p3448-0000-p3449-0000-b00.dtb)... done.
> copying cfgfile(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/t210ref/cfg/flash_l4t_t210_spi_sd_p3448.xml) to flash.xml... done.
> copying flasher(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/t210ref/cboot.bin)... done.
> Existing flashapp(/home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/tegraflash.py) reused.
> ./tegraflash.py --bl cboot.bin --bct  P3448_A00_4GB_Micron_4GB_lpddr4_204Mhz_P987.cfg --odmdata 0x94000 --bldtb tegra210-p3448-0000-p3449-0000-b00.dtb --applet nvtboot_recovery.bin --cmd "sign"  --cfg flash.xml --chip 0x21    --bins "EBT cboot.bin; DTB tegra210-p3448-0000-p3449-0000-b00.dtb" 
> saving flash command in /home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/flashcmd.txt
> saving Windows flash command to /home/jetson/nvidia/nvidia_sdk/JetPack_4.4_Linux_JETSON_NANO_DEVKIT/Linux_for_Tegra/bootloader/flash_win.bat
> *** Sign and generate flashing ready partition images... *** 
> Welcome to Tegra Flash
> **It continues ok**

It’s possible to modify the script to don’t create the system.img and reuses my system.img with modifications?
Thanks

What i’m refering to is ifit’s possible to avoid the line" > Making system.img… " and reuse my system.img file instead of creating it again

If you use flash.sh directly, then you can run with “-r” parameters so that it will re-use the system image that already existed.

Hi Wayne!
Yes, i know that, what i’m trying to do here is to create a OS.img as nvidia does for burn it into a SDcard, instead of using the flash.sh (because i need to test my changes in another geo location without the sdkm) so they’ll need to burn the img in their jetson
That’s my situation :/

Hi,

There is a script under our driver package which can create a sdcard image based on the rootfs. The driver package can be downloaded by sdkmanager or you can download it from our download center too.

Hi Wayne
That’s right that’s the script I’m using, but in the routine it creates the system.img file i want to reuse my modified system.img with that script (check my post on Nov 27th)
In case it’s not possible to achieve by this method, any idea to how to get it?
Thanks

Hi,

Will it work if you bypass the create_signed_images?

It works using the flahs.sh but not for the jetson-disk-image-creator.sh As i mentioned the idea is to create a modified .img to share with my colleagues and they can burn it in an SDcard. Flash.sh wouldn’t be an option due they can’t run the SDKM

Or maybe i’m misunderstanding your question, how can i bypass the create_signed_images?
Thanks for elaborate the reply

@WayneWWW @LoveNvidia any updates regarding my request for creating a deployable .img file reusing the system.img base?

I mean modifying the jetson-disk-image-creator.sh. Didn’t you use this tool?

Yes that’s what i’m using but don’t know where to change to point to reuse my file instead of creating it, would you give me a hand with it?