> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.stereolabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.stereolabs.com/_mcp/server.

# Flash your ZED Box Mini

## Should I flash my ZED Box Mini?

The ZED Box Mini is shipped with a pre-configured operating system and drivers optimized for its hardware.

**Flashing** (resetting or upgrading the device firmware) is only recommended if you need to:

* Install a different OS or JetPack version,
* Recover from a corrupted system,
* Resolve issues preventing the device from booting or functioning properly.

> **Warning**
>
> Flashing will erase all data and custom configurations on your ZED Box Mini. Proceed only if you are familiar with the process or have been instructed by support. For most users, flashing should be a last resort.

## Flashing Procedure

> **Warning**
>
> The [NVIDIA® SDK Manager](https://developer.nvidia.com/nvidia-sdk-manager) does not support automatic flashing of the Jetson modules installed in the ZED Box. Therefore, you must manually flash the board using NVIDIA's BSP for the desired JetPack version.

### Force the ZED Box Mini in Recovery mode

> **Warning**
>
> **It is not required to open the ZED Box Mini to force it into Recovery mode. Opening the box will void the warranty**

* **First method**:

  > **Note**
  >
  > This is applicable only if your device can normally boot.

  Open a terminal console (`Ctrl+Alt+t`) and enter the command

  ```bash
  sudo reboot --force forced-recovery
  ```

* **Second method**:

  1. Connect the [power](/docs/products/embedded/zed-box-mini/connectivity/#front-side)
  2. Use a pin to push the [`RCV` button](/docs/products/embedded/zed-box-mini/connectivity/#front-side)
  3. While keeping the `RCV` button pushed, use a pin to push the [`RST` button](/docs/products/embedded/zed-box-mini/connectivity/#front-side)

> **Warning**
>
> When the ZED Box Mini boots in Force Recovery mode, **the power LED stays OFF**.

### Check that the ZED Box Mini restarted in Force Recovery mode

Connect a Type-A/MicroUSB cable to an Ubuntu host PC and to the `OTG` port of the ZED Box Mini.

Open a terminal console (`Ctrl+Alt+t`).

You can verify that the ZED Box Mini correctly started in "Recovery Mode" by entering this command:

```bash
lsusb -d '0955:'
```

* **NVIDIA® Jetson™ Orin Nano 4 GB**: an NVIDIA® device with VID:PID `0955:7623` should be listed.
  e.g. `Bus xxx Device yyy: ID 0955:7623 NVIDIA Corp. APX`
* **NVIDIA® Jetson™ Orin Nano 8 GB**: an NVIDIA® device with VID:PID `0955:7523` should be listed.
  e.g. `Bus xxx Device yyy: ID 0955:7523 NVIDIA Corp. APX`
* **NVIDIA® Jetson™ Orin NX 8 GB**: an NVIDIA® device with VID:PID `0955:7423` should be listed.
  e.g. `Bus xxx Device yyy: ID 0955:7423 NVIDIA Corp. APX`
* **NVIDIA® Jetson™ Orin NX 16 GB**: an NVIDIA® device with VID:PID `0955:7323` should be listed.
  e.g. `Bus xxx Device yyy: ID 0955:7323 NVIDIA Corp. APX`

> **Note**
>
> If an NVIDIA® device with VID:PID `0955:7020` and type `NVIDIA Corp. L4T (Linux for Tegra) running on Tegra` is listed, then your ZED Box Mini has not rebooted in *Force Recovery* mode. You must retry the procedure.

### Flash the ZED Box Mini

Requirements:

* use a host PC running **Ubuntu 20.04** or **Ubuntu 22.04**.

> **Warning**
>
> Do not use virtual machines or WSL2 to run Ubuntu when flashing the ZED Box Mini. If you do not have a PC running Ubuntu ready, please consider using a Live USB Key instead:
>
> * [Windows](https://ubuntu.com/tutorials/create-a-usb-stick-on-windows#1-overview)
> * [Ubuntu](https://ubuntu.com/tutorials/create-a-usb-stick-on-ubuntu#1-overview)
> * [MacOS](https://ubuntu.com/tutorials/create-a-usb-stick-on-macos#1-overview)

On the host PC:

1. Open a terminal console from an empty folder of your choice.

   For example:

   ```bash
   mkdir -p ~/zedbox_flash
   cd ~/zedbox_flash
   ```

2. Install QEMU to build the image:

   ```bash
   sudo apt install qemu-user-static
   ```

3. Ensure that you previously booted the ZED Box Mini in ["Recovery mode"](#check-that-the-zed-box-mini-restarted-in-force-recovery-mode).

4. Download the flash script for the NVIDIA® JetPack version you want to install:
   * [NVIDIA® JetPack 6.2 / L4T 36.4.3 / GPIO enabled](https://download.stereolabs.com/scripts/zedbox_mini_usb_flash_6.2_gpio.sh) - [JetPack details](https://developer.nvidia.com/embedded/jetpack-sdk-62)
   * [NVIDIA® JetPack 7.2 / L4T 39.2 / GPIO enabled](https://download.stereolabs.com/scripts/zedbox_mini_usb_flash_7.2_gpio.sh) - [JetPack details](https://developer.nvidia.com/embedded/jetpack)

5. Flash the ZED Box Mini:
   * Ensure you have at least 80GB of free space on your working hard drive.

   * Use the following commands to flash the ZED Box Mini:

     ```bash
     chmod +x <script_name>.sh
     BSP_ROOT=./stereolabs_bsp/ ./<script_name>.sh
     ```

     Replace `<script_name>` with the name of the downloaded script, e.g., `zedbox_mini_usb_flash_6.2_gpio`.

   * All necessary files will be downloaded in the folder `$BSP_ROOT`. The script will create this folder if it does not exist and will ask you to log in as `root`.

6. Wait for the operation to complete. You will see the following output if the flash is successful:

   ```bash
   [...]
   Flash is successful
   Reboot device
   Cleaning up...
   Log is saved to Linux_for_Tegra/initrdlog/flash_<date_time>.log 
   FLASH SUCCESS
   ```

If you encounter any problems during this procedure, please consult the [troubleshooting guide](/docs/products/embedded/zed-box-mini/troubleshooting/#i-cannot-flash-the-zed-box-mini).

### Post-Flash operations

After flashing your device, follow these steps to install the necessary NVIDIA® and StereoLabs packages to ensure your ZED camera works correctly.

1. **Boot and Login:**

   Power on the device and log in with your credentials.

   The new default credentials of your ZED Box are:

   * username: `user`
   * password: `admin`

2. **Check the OS Version:**

   Follow [this support guide](https://support.stereolabs.com/hc/en-us/articles/20818240553367-What-is-the-version-of-the-OS-running-on-my-ZED-Box-or-NVIDIA-Jetson-embedded-PC) to determine the version of the operating system installed on your device.

3. **Connect to the Internet:**

   Connect your device to the internet using an Ethernet cable (WiFi may not yet be available, depending on the script you used to flash the device).

4. **Open a Terminal:**

   Press `Ctrl+Alt+T` to open a terminal window.

5. **Update the APT cache:**

   Run the following commands to update the APT cache:

   ```bash
   sudo apt update
   ```

   > **Warning**
   >
   > Do not run the command `sudo apt upgrade` before performing the next steps!

6. **Install NVIDIA® JetPack Packages:**

   Run the following command to install the NVIDIA® JetPack packages, which include the required Jetson™ drivers, CUDA, and all necessary NVIDIA® libraries:

   ```bash
   sudo apt install nvidia-jetpack
   ```

7. **Install the ZED Box Mini GMSL2 driver (for ZED X and ZED X One cameras):**

   Download and install the appropriate drivers from the [driver web page](https://www.stereolabs.com/developers/drivers):

   ```bash
   cd ~/Downloads
   sudo dpkg -i stereolabs-zedbox-mini_<ver_info>_arm64.deb
   ```

8. **Hold the kernel packages to not upgrade them and invalidate the setup**:

   * Create a `hold-zedbox-kernel.sh` script file with the following content:

     * `nano hold-zedbox-kernel.sh`

       #### 'hold-zedbox-kernel.sh'

       Fill the file with this script:

       ```sh
       #!/bin/bash
       #
       # hold-zedbox-kernel.sh
       #
       # Prevents `apt upgrade` from installing nvidia-l4t-kernel versions
       # that are incompatible with the stereolabs-zedbox-mini package.
       #
       # The stereolabs-zedbox-mini package requires an nvidia-l4t-kernel version within the
       # range supported by the L4T release it was built for. For example, the
       # L4T 36.4 (JetPack 6.2) driver requires:
       #   >= 5.15.148-tegra-36.4.0-20240912212859
       #   <= 5.15.148-tegra-36.4.4-20250616085344
       # The range differs for other JetPack versions. Check your driver with:
       #   dpkg-query -W -f='${Package}: ${Depends}\n' stereolabs-zedbox-mini
       #
       # This script holds all NVIDIA L4T kernel-related packages at their
       # currently installed versions so they won't be upgraded past the
       # compatible range.
       #
       # The package list is discovered dynamically from dpkg rather than
       # hardcoded. L4T/JetPack images ship these packages
       # under names that vary between releases (sometimes version-suffixed, e.g.
       # nvidia-l4t-kernel-5.15.148, sometimes via a different meta-package), so a
       # fixed list often matches nothing and every entry is skipped.
       #
       # Usage:
       #   sudo ./hold-zedbox-kernel.sh hold     # Hold the packages (default)
       #   sudo ./hold-zedbox-kernel.sh unhold   # Release the hold
       #   sudo ./hold-zedbox-kernel.sh status   # Show current hold status

       set -euo pipefail

       # Regex matching the L4T kernel package family we want to hold. This is
       # anchored at the start and allows arbitrary suffixes (e.g. -headers,
       # version suffixes) so it catches naming variants across L4T releases.
       PKG_REGEX='^nvidia-l4t-(kernel|rt-kernel|display-kernel|bootloader|xusb-firmware|init)'

       # --- helpers ---------------------------------------------------------------

       require_root() {
          if [[ $EUID -ne 0 ]]; then
             echo "Error: this script must be run with sudo or as root." >&2
             exit 1
          fi
       }

       is_installed() {
          # Returns 0 if the package is installed (status "ii" or "hi"), 1 otherwise.
          dpkg-query -W -f='${db:Status-Abbrev}\n' "$1" 2>/dev/null | grep -qE '^.i'
       }

       # Discover installed L4T kernel-related packages by pattern. Populates the
       # global PACKAGES array. Exits with an error if nothing matches, since that
       # means the regex (or the image) needs to be inspected manually.
       discover_packages() {
          mapfile -t PACKAGES < <(
             dpkg-query -W -f='${Package} ${db:Status-Abbrev}\n' 2>/dev/null \
             | awk '$2 ~ /^.i/ {print $1}' \
             | grep -E "$PKG_REGEX" \
             | sort -u
          )

          if [[ ${#PACKAGES[@]} -eq 0 ]]; then
             echo "Error: no installed nvidia-l4t kernel packages matched." >&2
             echo "Inspect manually with:" >&2
             echo "  dpkg -l | grep -i nvidia-l4t-kernel" >&2
             echo "  dpkg -l | grep -i nvidia-l4t | grep -iE 'kernel|boot|init|firmware'" >&2
             echo "Then adjust PKG_REGEX in this script if the names differ." >&2
             exit 1
          fi
       }

       hold_packages() {
          require_root
          discover_packages
          echo "Holding NVIDIA L4T kernel packages at their current versions..."
          echo
          local held=0
          for pkg in "${PACKAGES[@]}"; do
             local ver
             ver=$(dpkg-query -W -f='${Version}' "$pkg" 2>/dev/null || echo "unknown")
             apt-mark hold "$pkg" >/dev/null
             printf "  [HELD]    %-45s (version: %s)\n" "$pkg" "$ver"
             held=$((held + 1))
          done
          echo
          echo "Done. Held: $held"
          echo
          echo "These packages will now be ignored by 'apt upgrade'."
          echo "Use 'apt-mark showhold' to verify, or run this script with 'status'."
       }

       unhold_packages() {
          require_root
          discover_packages
          echo "Releasing hold on NVIDIA L4T kernel packages..."
          echo
          local released=0
          local all_holds
          all_holds=$(apt-mark showhold)
          for pkg in "${PACKAGES[@]}"; do
             if echo "$all_holds" | grep -qxF "$pkg"; then
                   apt-mark unhold "$pkg" >/dev/null
                   printf "  [UNHELD]  %s\n" "$pkg"
                   released=$((released + 1))
             else
                   printf "  [SKIPPED] %s (was not held)\n" "$pkg"
             fi
          done
          echo
          echo "Done. Released: $released"
          echo
          echo "WARNING: these packages may now be upgraded by 'apt upgrade',"
          echo "which can break stereolabs-zedbox-mini if an incompatible kernel"
          echo "version is installed."
       }

       show_status() {
          discover_packages
          echo "Current hold status for NVIDIA L4T kernel packages:"
          echo
          local all_holds
          all_holds=$(apt-mark showhold)
          for pkg in "${PACKAGES[@]}"; do
             local ver
             ver=$(dpkg-query -W -f='${Version}' "$pkg" 2>/dev/null)
             if echo "$all_holds" | grep -qxF "$pkg"; then
                   printf "  [HELD]      %-45s (version: %s)\n" "$pkg" "$ver"
             else
                   printf "  [NOT HELD]  %-45s (version: %s)\n" "$pkg" "$ver"
             fi
          done
          echo
          echo "stereolabs-zedbox-mini status:"
          if is_installed "stereolabs-zedbox-mini"; then
             local zedver
             zedver=$(dpkg-query -W -f='${Version}' "stereolabs-zedbox-mini" 2>/dev/null)
             echo "  Installed (version: $zedver)"
          else
             echo "  Not installed"
          fi
       }

       usage() {
          cat <<EOF
       Usage: sudo $0 [hold|unhold|status]

       hold     Hold NVIDIA L4T kernel packages at their current versions (default)
       unhold   Release the hold so packages can be upgraded again
       status   Show whether each package is currently held

       Why this is needed:
       stereolabs-zedbox-mini depends on nvidia-l4t-kernel within a specific
       version range. Newer kernels from NVIDIA's apt repo fall outside this
       range and break the package. Holding the kernel keeps 'apt upgrade'
       from touching it.

       Note:
       The package list is discovered dynamically from dpkg using PKG_REGEX,
       so version-suffixed or renamed kernel packages are matched automatically.
       Holding only prevents FUTURE upgrades; it cannot roll back a kernel that
       has already been installed outside the compatible range.
       EOF
       }

       # --- main ------------------------------------------------------------------

       cmd="${1:-hold}"
       case "$cmd" in
          hold)    hold_packages ;;
          unhold)  unhold_packages ;;
          status)  show_status ;;
          -h|--help|help) usage ;;
          *)
             echo "Error: unknown command '$cmd'" >&2
             echo
             usage
             exit 1
             ;;
       esac
       ```

   * Make the script executable:

     `chmod +x hold-zedbox-kernel.sh`

   * Run the script:

     `sudo ./hold-zedbox-kernel.sh`

   * Verify the result:

     `sudo ./hold-zedbox-kernel.sh status`

     All the listed `nvidia-l4t-*` kernel packages should be reported as `[HELD]      nvidia-l4t-* (version: xx.y.z-dddddddddddddd)`.

9. **Download and install the ZED SDK:**

   * Visit the [StereoLabs website and download the ZED SDK for Jetson](https://www.stereolabs.com/developers/release#nvidia-jetson-504616ef8d38) that matches your installed JetPack/L4T version.

   * Navigate to your Downloads directory and run the installer:

     ```bash
     cd ~/Downloads
     chmod +x ZED_SDK_Tegra_L4T<l4t_version>_v<x.y.z>.zstd.run
     ./ZED_SDK_Tegra_L4T<l4t_version>_v<x.y.z>.zstd.run
     ```

10. **Reboot:**

    Restart your device to apply all changes:

    ```bash
    sudo reboot
    ```

11. **Enjoy Your Device:**

    Your device is now ready for use with the ZED cameras.