Partitioning to increase disk space

I bricked my Jetson by attempting to move the /usr, /tmp and /var folders to separate partitions on an inserted sd card. Currently reinstalling the system, which is going well, but I feel like I’m walking in to the same mistake again - I need more disk space on my Jetson, and I don’t want to brick the unit in the process. What’s the proper way to add more disk to it?
I have an SD card, an NVMe SSD and the internal storage to use. If possible, migrating to the SSD would be ideal. What options do I have? Tutorials available?

Thanks.

Hi,
We suggest move rootfs to NVMe SSD. Please refer to
Jetson/L4T/Boot From External Device - eLinux.org

Following the tutorial in question didn’t quite do it for me. I have my home folder on the same disk which I am not interested in formatting, so I shrunk that partition and made space for a system partition on the SSD. It already had a GPT partition table, but I don’t think it has the right sector size. Gparted summary below.


I then went on to follow the tutorial, made the rootfs, ran apply_binaries.sh, copied rootfs to the new partition. Finally, running ./flash returned the following message:
$ sudo ./flash.sh jetson-agx-xavier-devkit nvme0n1p2
###############################################################################
# L4T BSP Information:
# R32 , REVISION: 5.1
###############################################################################
Error: probing the target board failed.
Make sure the target board is connected through
USB port and is in recovery mode.

Unsure how to proceed. The drive is explicitly not connected through USB, nor in recovery mode. I was under the impression that this should be run on the Jetson, not on the host device - is that incorrect?
Thank you.

Hi,
Please let Xavier enter recovery mode, connect to host PC(with type-C to type-A cable). And on host PC, run

$ sudo ./flash.sh jetson-xavier nvme0n1p2

Hi,
I have not built the rootfs on the host computer, but instead built it on the target device, then mounted the nvme0n1p2 partition to /mnt, then copied the entire rootfs to /mnt. Do I need to build rootfs on host computer rather? Thank you.
Output from your command run on host computer with AGX Xavier on usb yields:

$ sudo ./flash.sh jetson-xavier nvme0n1p2
 ###############################################################################
# L4T BSP Information:
# R32 , REVISION: 5.1
###############################################################################
# Target Board Information:
# Name: jetson-xavier, Board Family: t186ref, SoC: Tegra 194, 
# OpMode: production, Boot Authentication: NS, 
# Disk encryption: disabled ,
###############################################################################
copying soft_fuses(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-soft-fuses-l4t.cfg)... done.
./tegraflash.py --chip 0x19 --applet "/home/per/Downloads/Linux_for_Tegra/bootloader/mb1_t194_prod.bin" --skipuid --soft_fuses tegra194-mb1-soft-fuses-l4t.cfg --bins "mb2_applet nvtboot_applet_t194.bin" --cmd "dump eeprom boardinfo cvm.bin;reboot recovery" 
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0030 ] Generating RCM messages
[   0.0039 ] tegrahost_v2 --chip 0x19 0 --magicid MB1B --appendsigheader /home/per/Downloads/Linux_for_Tegra/bootloader/mb1_t194_prod.bin zerosbk
[   0.0047 ] Header already present for /home/per/Downloads/Linux_for_Tegra/bootloader/mb1_t194_prod.bin
[   0.0076 ] 
[   0.0084 ] tegrasign_v2 --key None --getmode mode.txt
[   0.0092 ] Assuming zero filled SBK key
[   0.0093 ] 
[   0.0102 ] tegrasign_v2 --key None --file /home/per/Downloads/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin --offset 2960 --length 1136 --pubkeyhash pub_key.key
[   0.0110 ] Assuming zero filled SBK key
[   0.0115 ] 
[   0.0123 ] tegrahost_v2 --chip 0x19 0 --updatesigheader /home/per/Downloads/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin /home/per/Downloads/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.hash zerosbk
[   0.0158 ] 
[   0.0167 ] tegrabct_v2 --chip 0x19 0 --sfuse tegra194-mb1-soft-fuses-l4t.cfg.pdf sfuse.bin
[   0.0176 ] 
[   0.0183 ] tegrarcm_v2 --listrcm rcm_list.xml --chip 0x19 0 --sfuses sfuse.bin --download rcm /home/per/Downloads/Linux_for_Tegra/bootloader/mb1_t194_prod_sigheader.bin 0 0
[   0.0190 ] RCM 0 is saved as rcm_0.rcm
[   0.0220 ] RCM 1 is saved as rcm_1.rcm
[   0.0220 ] RCM 2 is saved as rcm_2.rcm
[   0.0220 ] List of rcm files are saved in rcm_list.xml
[   0.0220 ] 
[   0.0220 ] Signing RCM messages
[   0.0254 ] tegrasign_v2 --key None --list rcm_list.xml --pubkeyhash pub_key.key --getmontgomeryvalues montgomery.bin
[   0.0263 ] Assuming zero filled SBK key
[   0.0269 ] 
[   0.0269 ] Copying signature to RCM mesages
[   0.0277 ] tegrarcm_v2 --chip 0x19 0 --updatesig rcm_list_signed.xml
[   0.0289 ] 
[   0.0290 ] Boot Rom communication
[   0.0299 ] tegrarcm_v2 --chip 0x19 0 --rcm rcm_list_signed.xml --skipuid
[   0.0308 ] RCM version 0X190001
[   0.0318 ] Boot Rom communication completed
[   1.0467 ] 
[   2.0512 ] tegrarcm_v2 --isapplet
[   2.0539 ] Applet version 01.00.0000
[   2.0698 ] 
[   2.0733 ] tegrarcm_v2 --ismb2
[   2.1086 ] 
[   2.1103 ] tegrahost_v2 --chip 0x19 --align nvtboot_applet_t194.bin
[   2.1117 ] 
[   2.1128 ] tegrahost_v2 --chip 0x19 0 --magicid PLDT --appendsigheader nvtboot_applet_t194.bin zerosbk
[   2.1139 ] adding BCH for nvtboot_applet_t194.bin
[   2.1169 ] 
[   2.1188 ] tegrasign_v2 --key None --list nvtboot_applet_t194_sigheader.bin_list.xml --pubkeyhash pub_key.key
[   2.1198 ] Assuming zero filled SBK key
[   2.1202 ] 
[   2.1214 ] tegrahost_v2 --chip 0x19 0 --updatesigheader nvtboot_applet_t194_sigheader.bin.encrypt nvtboot_applet_t194_sigheader.bin.hash zerosbk
[   2.1235 ] 
[   2.1245 ] tegrarcm_v2 --download mb2 nvtboot_applet_t194_sigheader.bin.encrypt
[   2.1253 ] Applet version 01.00.0000
[   2.1409 ] Sending mb2
[   2.1410 ] [................................................] 100%
[   2.1538 ] 
[   2.1548 ] tegrarcm_v2 --boot recovery
[   2.1556 ] Applet version 01.00.0000
[   2.1763 ] 
[   3.1808 ] tegrarcm_v2 --isapplet
[   3.2020 ] 
[   3.2058 ] tegrarcm_v2 --ismb2
[   3.2088 ] MB2 Applet version 01.00.0000
[   3.2410 ] 
[   3.2426 ] tegrarcm_v2 --ismb2
[   3.2437 ] MB2 Applet version 01.00.0000
[   3.2771 ] 
[   3.2781 ] Retrieving board information
[   3.2790 ] tegrarcm_v2 --oem platformdetails chip chip_info.bin
[   3.2798 ] MB2 Applet version 01.00.0000
[   3.3154 ] Saved platform info in chip_info.bin
[   3.3194 ] Chip minor revision: 2
[   3.3196 ] Bootrom revision: 0xf
[   3.3197 ] Ram code: 0x2
[   3.3199 ] Chip sku: 0xd0
[   3.3200 ] Chip Sample: non es
[   3.3200 ] 
[   3.3203 ] Retrieving EEPROM data
[   3.3203 ] tegrarcm_v2 --oem platformdetails eeprom cvm /home/per/Downloads/Linux_for_Tegra/bootloader/cvm.bin
[   3.3212 ] MB2 Applet version 01.00.0000
[   3.3552 ] Saved platform info in /home/per/Downloads/Linux_for_Tegra/bootloader/cvm.bin
[   3.3896 ] 
[   3.3897 ] Rebooting to recovery mode
[   3.3906 ] tegrarcm_v2 --ismb2
[   3.3914 ] MB2 Applet version 01.00.0000
[   3.4090 ] 
[   3.4091 ] Rebooting to recovery mode
[   3.4102 ] tegrarcm_v2 --reboot recovery
[   3.4112 ] MB2 Applet version 01.00.0000
[   3.4520 ] 
Board ID(2888) version(400) sku(0004) revision(L.0)
Copy /home/per/Downloads/Linux_for_Tegra/kernel/dtb/tegra194-p2888-0001-p2822-0000.dtb to /home/per/Downloads/Linux_for_Tegra/kernel/dtb/tegra194-p2888-0001-p2822-0000.dtb.rec
copying bctfile(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-memcfg-p2888.cfg)... done.
copying bctfile1(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-memcfg-sw-override.cfg)... done.
copying uphy_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-uphy-lane-p2888-0000-p2822-0000.cfg)... done.
copying minratchet_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-ratchet-p2888-0000-p2822-0000.cfg)... done.
copying device_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-bct-device-sdmmc.cfg)... done.
copying misc_cold_boot_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-misc-l4t.cfg)... done.
copying misc_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-misc-flash.cfg)... done.
copying pinmux_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg)... done.
copying gpioint_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg)... done.
copying pmic_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-pmic-p2888-0001-a04-E-0-p2822-0000.cfg)... done.
copying pmc_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-padvoltage-p2888-0000-a00-p2822-0000-a00.cfg)... done.
copying prod_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-prod-p2888-0000-p2822-0000.cfg)... done.
copying scr_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-scr-cbb-mini.cfg)... done.
copying scr_cold_boot_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-scr-cbb-mini.cfg)... done.
copying bootrom_config(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-mb1-bct-reset-p2888-0000-p2822-0000.cfg)... done.
copying dev_params(/home/per/Downloads/Linux_for_Tegra/bootloader/t186ref/BCT/tegra194-br-bct-sdmmc.cfg)... done.
Existing bootloader(/home/per/Downloads/Linux_for_Tegra/bootloader/nvtboot_cpu_t194.bin) reused.
copying initrd(/home/per/Downloads/Linux_for_Tegra/bootloader/l4t_initrd.img)... done.
	populating kernel to rootfs... done.
/home/per/Downloads/Linux_for_Tegra/bootloader/tegraflash.py  --chip 0x19 --key  --cmd sign /home/per/Downloads/Linux_for_Tegra/rootfs/boot/Image
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0028 ] Generating signature
[   0.0035 ] tegrasign_v2 --key  --getmode mode.txt
[   0.0042 ] Assuming zero filled SBK key
[   0.0044 ] 
[   0.0046 ] header_magic: 5614
[   0.0055 ] tegrahost_v2 --chip 0x19 --align 1_Image
[   0.0063 ] 
[   0.0071 ] tegrahost_v2 --chip 0x19 0 --magicid DATA --appendsigheader 1_Image zerosbk
[   0.0078 ] adding BCH for 1_Image
[   0.6782 ] 
[   0.6804 ] tegrasign_v2 --key  --list 1_Image_sigheader_list.xml --pubkeyhash pub_key.key
[   0.6813 ] Assuming zero filled SBK key
[   0.7161 ] 
[   0.7172 ] tegrahost_v2 --chip 0x19 0 --updatesigheader 1_Image_sigheader.encrypt 1_Image_sigheader.hash zerosbk
[   1.0679 ] 
[   1.0898 ] Signed file: /home/per/Downloads/Linux_for_Tegra/bootloader/Image_sigheader.encrypt
l4t_sign_image.sh: Generate header for Image_sigheader.encrypt
l4t_sign_image.sh: chip 0x19: add 0x20bf808 to offset  0x8 in sig file
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for Image_sigheader.encrypt
l4t_sign_image.sh: the sign header is saved at /home/per/Downloads/Linux_for_Tegra/rootfs/boot/Image.sig
done.
	populating initrd to rootfs... done.
/home/per/Downloads/Linux_for_Tegra/bootloader/tegraflash.py  --chip 0x19 --key  --cmd sign /home/per/Downloads/Linux_for_Tegra/rootfs/boot/initrd
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0027 ] Generating signature
[   0.0035 ] tegrasign_v2 --key  --getmode mode.txt
[   0.0042 ] Assuming zero filled SBK key
[   0.0044 ] 
[   0.0046 ] header_magic: 1f8b0800
[   0.0054 ] tegrahost_v2 --chip 0x19 --align 1_initrd
[   0.0062 ] 
[   0.0070 ] tegrahost_v2 --chip 0x19 0 --magicid DATA --appendsigheader 1_initrd zerosbk
[   0.0077 ] adding BCH for 1_initrd
[   0.1559 ] 
[   0.1574 ] tegrasign_v2 --key  --list 1_initrd_sigheader_list.xml --pubkeyhash pub_key.key
[   0.1581 ] Assuming zero filled SBK key
[   0.1654 ] 
[   0.1666 ] tegrahost_v2 --chip 0x19 0 --updatesigheader 1_initrd_sigheader.encrypt 1_initrd_sigheader.hash zerosbk
[   0.2450 ] 
[   0.2500 ] Signed file: /home/per/Downloads/Linux_for_Tegra/bootloader/initrd_sigheader.encrypt
l4t_sign_image.sh: Generate header for initrd_sigheader.encrypt
l4t_sign_image.sh: chip 0x19: add 0x6e6ce8 to offset  0x8 in sig file
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for initrd_sigheader.encrypt
l4t_sign_image.sh: the sign header is saved at /home/per/Downloads/Linux_for_Tegra/rootfs/boot/initrd.sig
done.
	populating /home/per/Downloads/Linux_for_Tegra/kernel/dtb/tegra194-p2888-0001-p2822-0000.dtb to rootfs... done.
Making Boot image... done.
/home/per/Downloads/Linux_for_Tegra/bootloader/tegraflash.py  --chip 0x19 --key  --cmd sign boot.img
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands
 
[   0.0004 ] Generating signature
[   0.0014 ] tegrasign_v2 --key  --getmode mode.txt
[   0.0021 ] Assuming zero filled SBK key
[   0.0023 ] 
[   0.0025 ] header_magic: 414e4452
[   0.0034 ] tegrahost_v2 --chip 0x19 --align 1_boot.img
[   0.0042 ] 
[   0.0050 ] tegrahost_v2 --chip 0x19 0 --magicid DATA --appendsigheader 1_boot.img zerosbk
[   0.0058 ] adding BCH for 1_boot.img
[   0.8191 ] 
[   0.8205 ] tegrasign_v2 --key  --list 1_boot_sigheader.img_list.xml --pubkeyhash pub_key.key
[   0.8212 ] Assuming zero filled SBK key
[   0.8630 ] 
[   0.8642 ] tegrahost_v2 --chip 0x19 0 --updatesigheader 1_boot_sigheader.img.encrypt 1_boot_sigheader.img.hash zerosbk
[   1.2973 ] 
[   1.3264 ] Signed file: /home/per/Downloads/Linux_for_Tegra/bootloader/temp_user_dir/boot_sigheader.img.encrypt
l4t_sign_image.sh: Generate header for boot_sigheader.img.encrypt
l4t_sign_image.sh: chip 0x19: add 0x27a7800 to offset  0x8 in sig file
l4t_sign_image.sh: Generate 16-byte-size-aligned base file for boot_sigheader.img.encrypt
l4t_sign_image.sh: the signed file is /home/per/Downloads/Linux_for_Tegra/bootloader/temp_user_dir/boot_sigheader.img.encrypt
done.
Making recovery ramdisk for recovery image...
Re-generating recovery ramdisk for recovery image...
~/Downloads/Linux_for_Tegra/bootloader/ramdisk_tmp ~/Downloads/Linux_for_Tegra/bootloader ~/Downloads/Linux_for_Tegra
30402 blocks
_BASE_KERNEL_VERSION=4.9.201-tegra
find: ‘/home/per/Downloads/Linux_for_Tegra/rootfs/lib’: No such file or directory
cp: cannot stat '/home/per/Downloads/Linux_for_Tegra/rootfs/bin/mv': No such file or directory
failed command: cp -fv /home/per/Downloads/Linux_for_Tegra/rootfs/bin/mv /home/per/Downloads/Linux_for_Tegra/bootloader/ramdisk_tmp//bin/mv

edit: yes, building rootfs on host and running the recommended line worked great. Thank you.