Two partitions on SSD and would like SDK only flash one of them

Hi,

I have a new Jetson Orin Nano Developer board and installed a new 512G SSD on it. My PC is X86 type with Ubuntu 22.04 with the latest SDK Manager 2.2.0.1 2021 (Jetpack 6.1).

I know how to flash the SSD with the latest OS, rootfs and all Nivdia components.

Now, I need to divide the 512G SSD into two partitions, 256 GB each so all OS, rootfs and all Nivdia components are on just one partition and the other partition will be used as a storage drive.

I did not find the option on SDK Manager to do this.

Does your SDK Manager support this?

Thanks,

Steven

Hi,
For creating a custom SSD partition, I suggest utilizing the command specified in the documentation

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
  -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 jetson-orin-nano-devkit internal

Prior to executing this command, it’s necessary to modify the flash_l4t_t234_nvme.xml to set a custom size. In your case, you should set num_sectors to 536870912, as section_size*num_sectors = 512* 536870912 = 256GiB

2c2
<     <device type="external" instance="0" sector_size="512" num_sectors="536870912" >
---
>     <device type="external" instance="0" sector_size="512" num_sectors="EXT_NUM_SECTORS" >

Add the -S argument to resize the rfs size.

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 \
  -c tools/kernel_flash/flash_l4t_t234_nvme.xml -S 250GiB -p "-c bootloader/generic/cfg/flash_t234_qspi.xml" \
  --showlogs --network usb0 jetson-orin-nano-devkit internal

After flashing, use the fdisk to create a new partition from the available free space. Once the partition is created, format it with the ext4 filesystem by running sudo mkfs.ext4 ${NewPartition}. You would see similar output using df -h.

~$ df -h
Filesystem       Size  Used Avail Use% Mounted on
/dev/nvme0n1p1   251G  6.8G  232G   3% /
tmpfs            3.8G   84K  3.8G   1% /dev/shm
tmpfs            1.5G   27M  1.5G   2% /run
tmpfs            5.0M  4.0K  5.0M   1% /run/lock
/dev/nvme0n1p10   63M  118K   63M   1% /boot/efi
tmpfs            762M   92K  762M   1% /run/user/128
tmpfs            762M   80K  762M   1% /run/user/1000
/dev/nvme0n1p16  251G   28K  239G   1% /tmp/storage

Hi,
Thanks for the reply.

I installed a 256 GB nvme SSD and put Developer board in REC mode.
I planned to allocate128GB for OS and the other 128 GB for storage.
After modified the flash_l4t_t234_nvme.xml file and entered a sector number 268435456 for 128 GB,
I tried your method but failed.
I put a part of outputs here and highlighted the error messages.
I also attached the whole outputs file.


[ 5.1203 ] Copying signatures
[ 5.1208 ] tegrahost_v2 --chip 0x23 0 --partitionlayout flash.xml.bin --updatesig images_list_signed.xml
[ 5.1219 ] tegraparser_v2 --generategpt --pt flash.xml.bin
[ 5.1223 ] End sector for APP, expected at: 268435422, actual: 0
Error: Return value 4
Command tegraparser_v2 --generategpt --pt flash.xml.bin
cp: cannot stat ‘signed/*’: No such file or directory
cp: cannot stat ‘signed/flash.xml.tmp’: No such file or directory
Using bpmp-dtb concatenated with odmdata in blob for t23x
XPath set is empty
./tegraflash.py --bl --bct br_bct_BR.bct --bldtb tegra234-p3768-0000+p3767-0005-nv.dtb --applet rcm_2_encrypt.rcm --applet_softfuse rcm_1_encrypt.rcm --cmd “secureflash;reboot” --cfg secureflash.xml --chip 0x23 --mb1_bct mb1_bct_MB1_sigheader.bct.encrypt --mem_bct mem_rcm_sigheader.bct.encrypt --mb1_cold_boot_bct mb1_cold_boot_bct_MB1_sigheader.bct.encrypt --mb1_bin mb1_t234_prod_aligned_sigheader.bin.encrypt --psc_bl1_bin psc_bl1_t234_prod_aligned_sigheader.bin.encrypt --mem_bct_cold_boot mem_coldboot_sigheader.bct.encrypt --bins “psc_fw pscfw_t234_prod_sigheader.bin.encrypt; mts_mce mce_flash_o10_cr_prod_sigheader.bin.encrypt; tsec_fw tsec_t234_sigheader.bin.encrypt; mb2_applet applet_t234_sigheader.bin.encrypt; mb2_bootloader mb2_t234_with_mb2_bct_MB2_sigheader.bin.encrypt; xusb_fw xusb_t234_prod_sigheader.bin.encrypt; pva_fw nvpva_020_sigheader.fw.encrypt; dce_fw display-t234-dce_sigheader.bin.encrypt; nvdec nvdec_t234_prod_sigheader.fw.encrypt; bpmp_fw bpmp_t234-TE950M-A1_prod_sigheader.bin.encrypt; bpmp_fw_dtb tegra234-bpmp-3767-0003-3509-a02_with_odm_sigheader.dtb.encrypt; rce_fw camera-rtcpu-t234-rce_sigheader.img.encrypt; ape_fw adsp-fw_sigheader.bin.encrypt; spe_fw spe_t234_sigheader.bin.encrypt; tos tos-optee_t234_sigheader.img.encrypt; eks eks_t234_sigheader.img.encrypt”
saving flash command in flashcmd.txt

*** no-flash flag enabled. Exiting now… ***

User can run above saved command in factory environment without
providing pkc and sbk keys to flash a device

Example:

$ cd bootloader 
$ sudo bash ./flashcmd.txt

Error: /home/seattle/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/bootloader/signed/flash.idx is not found
Error: failed to relocate images to /home/seattle/nvidia/nvidia_sdk/JetPack_6.1_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/tools/kernel_flash/images
Cleaning up…


Thanks,

Steven

PartitionFlash1.txt (184.8 KB)

Hi stevenc,
In your case, you should define a smaller size using -S ${size} to fit the other partitions in the layout.
For example, set -S 120GiB. Once the flashing is complete, you’ll proceed with the OEM configuration, where you can adjust the rfs size as shown in the image:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.