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
| Option | Description |
|---|
--target, -t | Target device to flash (e.g., /dev/sdb) |
--bucket, -b | S3 bucket URL (default: s3://jetson-nano-ub-20-bare) |
--image, -i | Image name to download from S3 (default: orion-nano-8gb-jp6.2.tar.gz) |
--archive, -a | Use local archive file instead of downloading from S3 |
--input, -d | Use local directory with partition images instead of archive |
--help, -h | Display 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:
- The tool checks for required dependencies and installs any missing ones
- If downloading from S3, the specified image is downloaded (or reused if already present)
- The archive is extracted to a temporary directory
- Any mounted partitions on the target device are identified and unmounted
- The partition table is restored to the target device
- Each partition image is restored to the correct partition with the appropriate filesystem type
- Compressed images (
.gz or .lz4) are automatically decompressed during restoration
Troubleshooting
Cannot access target device — Error: 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 found — Error: 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 issues — Failed 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 failure — Error: 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 denied — This script must be run as root
Run the command with sudo privileges.