Overview

SkyCore includes a drive flashing feature that restores Jetson Orin images to target devices. The flash command can download images from S3 buckets or use locally stored images. With the flash functionality, you can:
  • Download Jetson Orin images directly from S3
  • Flash images to a target device such as an SSD or NVMe drive
  • Restore previously created backups made with the clone command
  • Maintain proper partition structure and filesystem types
  • Create bootable drives for Jetson Orin devices

Requirements

  • SkyCore installed on your system
  • Root privileges (sudo)
  • partclone package installed
  • Internet connection (for downloading from S3)
  • AWS CLI for S3 functionality (auto-installed if missing)
  • Target storage device (SSD/NVMe)

Basic Usage

sudo skycore flash --target TARGET_DEVICE [options]
Where TARGET_DEVICE is the device you want to flash (e.g., /dev/sdb or /dev/nvme1n1).
The flashing process erases all data on the target device. Make sure you have selected the correct device and backed up any important data.

Command Line Options

OptionDescription
--target, -tTarget device to flash (e.g., /dev/sdb)
--bucket, -bS3 bucket URL (default: s3://jetson-nano-ub-20-bare)
--image, -iImage name to download from S3 (default: orion-nano-8gb-jp6.2.tar.gz)
--archive, -aUse local archive file instead of downloading from S3
--input, -dUse local directory with partition images instead of archive
--help, -hDisplay help information

Examples

Download and flash the default Orin Nano image:
sudo skycore flash --target /dev/sdb
Download a specific image from a custom S3 bucket:
sudo skycore flash --target /dev/sdb --bucket s3://custom-bucket --image custom-image.tar.gz
Use a local archive created by the clone command:
sudo skycore flash --target /dev/sdb --archive /path/to/backup.tar.gz
Use a directory with extracted partition images:
sudo skycore flash --target /dev/sdb --input /path/to/backup_dir

Flashing Process

When you run the flash command, the following steps are performed:
  1. The tool checks for required dependencies and installs any missing ones
  2. If downloading from S3, the specified image is downloaded (or reused if already present)
  3. The archive is extracted to a temporary directory
  4. Any mounted partitions on the target device are identified and unmounted
  5. The partition table is restored to the target device
  6. Each partition image is restored to the correct partition with the appropriate filesystem type
  7. Compressed images (.gz or .lz4) are automatically decompressed during restoration

Troubleshooting

Cannot access target deviceError: Target device /dev/XXX does not exist or is not a block device. Make sure the target device is correctly connected and recognized by the system. Use lsblk to list available block devices. No partition images foundError: No partition image files found in the source. Verify that the archive or directory contains valid partition images with the expected naming format (jetson_nvme_p*.img*). AWS access issuesFailed to download the image from S3. If using a private S3 bucket, make sure AWS credentials are properly configured. For public buckets, check the bucket URL and image name for typos. Partition table restoration failureError: Failed to restore partition table. Make sure the target device is not in use and has sufficient space. Verify that the partition table file exists in the extracted archive. Permission deniedThis script must be run as root Run the command with sudo privileges.