Jetson ISO Customization

Hi

I followed this guide Jetson ISO Customization Guide — NVIDIA Jetson Linux Developer Guide to generate our ISO.

it said that

Target rootfs: The OS layers only, such as ubuntu-server-minimal.squashfs and ubuntu-server-minimal.ubuntu-server.squashfs. The NVIDIA overlay is not included. Anything that must be present on the installed system must be added to an OS squashfs.

what I do:

  • I build a squashfs image with my own rootfs.
  • replace the ubuntu-server-minimal.squashfs with my squashfs and update md5files
  • use xorriso to repack the ISO
  • use balena-etcher to burn the ISO to a USB storage

Then I use the bootable usb device to bootup my Thor devkit, it successfully enter the install procedure. but failed at"
the full log also attached. it seems the ubuntu-server-minimal.squashfs also is a part of the Live Installer Rootfs

Can’t add my own squashfs image, but only can add my files into ubuntu-server-minimal.squashfs?

start: subiquity/Filesystem/apply_autoinstall_config:
finish: subiquity/Filesystem/_probe/probe_once: [Errno 2] No such file or directory: ‘pvscan’
start: subiquity/ErrorReporter/1770544676.687096834.block_probe_fail/add_info:
start: subiquity/Filesystem/_probe/probe_once: restricted=True
start: subiquity/Network/_send_update: CHANGE wlP1p1s0
finish: subiquity/Network/_send_update: CHANGE wlP1p1s0
finish: subiquity/Filesystem/_probe/probe_once: restricted=True
finish: subiquity/Filesystem/_probe:
finish: subiquity/Filesystem/apply_autoinstall_config: [Errno 2] No such file or directory: ‘pvscan’
finish: subiquity/apply_autoinstall_config: [Errno 2] No such file or directory: ‘pvscan’
finish: subiquity/ErrorReporter/1770544676.687096834.block_probe_fail/add_info: written to /var/crash/1770544676.687096834.block_probe_fail.crash
An error occurred. Press enter to start a shell
log.txt (146.4 KB)

If these files are missing, install lvm2 into rootfs then rebuild squashfs. The jetsoninstaller-r39.2.1*.iso contains these files

for sq in path-to/casper/*.squashfs; do
    echo "$(basename "$sq")"
    unsquashfs -ll "$sq" 2>/dev/null |
        grep -E '(pvscan|vgscan|vgchange|subiquity.*\.snap)'
done

ubuntu-server-minimal.squashfs
lrwxrwxrwx root/root                 3 2024-11-27 11:06 squashfs-root/usr/sbin/pvscan -> lvm
lrwxrwxrwx root/root                 3 2024-11-27 11:06 squashfs-root/usr/sbin/vgchange -> lvm
lrwxrwxrwx root/root                 3 2024-11-27 11:06 squashfs-root/usr/sbin/vgscan -> lvm

Hi @whitesscott

Thanks for your reply. I suspected that but now confirmed by you.

can you also help clarifying below question:

  1. I tried the official JetsonISO, It can install the system and the THOR devkit can boot normally, but when I powered down the devkit, insert the USB installer again and power on, seems it can’t boot from the same USB installer, I checked the boot option, there is no USB boot option. Seems the USB installer just can use once.

Does that caused by this in jetsoniso_thor-ai.yaml? how to solve that? just remove those lines?

Clean up “ubuntu” boot entry

  • /bin/bash -c ‘for x in $(efibootmgr | grep -i “Boot…* ubuntu” | cut -d" " -f1); do
    y=${x:4:4};
    efibootmgr -b ${y} -B;
    done’

# Move the BootCurrent (USB) to the last position in the BootOrder.

  • efibootmgr --bootorder $(echo $(efibootmgr | grep BootOrder | cut -d’ ’ -f2) | sed s/\\\($(efibootmgr | grep BootCurrent | cut -d’ ’ -f 2)\\\)[,]\\\(.*\\\)/\\\2,\\\1/)
  1. there are two target rootfsubuntu-server-minimal.squashfs and ubuntu-server-minimal.ubuntu-server.squashfs. I want to pack my rootfs into one squashfs(replace ubuntu-server-minimal.squashfs), so I tried to remove ubuntu-server-minimal.ubuntu-server.squashfs and changed the grub.cfg, just remove below text to remove that. but the USB installer even can’t enter the grub menu. nothing happened when I mannually select booting from this USB device. it just back to the UEFI boot option again. are there any other changes needed.
  • default: true
    description:
    en: The default install contains a curated set of packages that provide a comfortable
    experience for operating your server.
    id: ubuntu-server
    locale_support: locale-only
    name:
    en: Ubuntu Server
    path: ubuntu-server-minimal.ubuntu-server.squashfs
    size: 1318465536
    type: fsimage-layered
    variant: server

Hi,
Is it possible to replicate it on developer kit? We would need to reproduce it first and check.

Hi @DaneLLL

Yes, it is repruceable.

I just re-build the bootable USB devide as Quick Start Guide — Jetson AGX Thor Developer Kit - User Guide with balena-etcher with the official jetsoninstaller-r39.2.1-2026-08-07-18-30-47-arm64.iso

The UEFI can recognized it as a boot option, but when I select it, the screen will be black and then back to the menu. you can see the vedio attached.

and there is another scenario, that the USB device can’t be recognized in UEFI.

my solution for the two scenario is to fully flash the dev kit. that works. but that made me crazy to custom my ISO, because I need to rebuild the USB device and re-flash the dev kit time and time.

the UEFI is v38.4.0

and how about this one? How to only pack my rootfs into one squashfs? how to remove the layered squashfs?

there are two target rootfsubuntu-server-minimal.squashfs and ubuntu-server-minimal.ubuntu-server.squashfs. I want to pack my rootfs into one squashfs(replace ubuntu-server-minimal.squashfs),

Hi,
Looks like your UEFI is at old version. Could you upgrade UEFI to r39.2.1 and try? ISO customization is enabled from r39.2.1.

I want to know, if failed to boot from USB installer(for example, press reset button when the updating ongoing several times) does that will make the UEFI mark this USB device and not show it as a boot option?

Review the-workaround-interim-solution on this nvidia document

I saw that, it is set as ·Auto·

I can Install that, just sometime it will not recognize the USB installer. in that case I need to reflash the dev kit. then it work again, then after several failed installation, it will not recognize it again, then re-flash dev kit again..etc

Hi @DaneLLL and @whitesscott

The USB installer recognization issues solved, that is caused by balena-etcher. don’t know why, not seeing any fail info. BUT with same ISO, balena-etcher re-make the USB installer is OK in second or third time.

now the only question is:

we have customize rootfs, we don;t want to use the ubuntu rootfs. can I remove ubuntu-server-minimal.squashfs and ubuntu-server-minimal.ubuntu-server.squashfs then add our own rootfs? how to do that? can you give some guides?

I remove them (only have my own ubuntu-server-minimal.squashfs), and I got below log.

BusyBox v1.36.1 (Ubuntu 1:1.36.1-6ubuntu3.1) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

(initramfs) File system layers are missing:\n ‘/cdrom/casper/ubuntu-server-minimal.ubuntu-server.squashfs’ doesn’t exist.)
[ 21.982002] tegra-mc 8108020000.memory-controller: sync_state() pending due to 8181200000.host1x

I’ve not tested this but have worked with the iso before github.com/whitesscott/jetson-live-iso and believe it could work.

  1. path: /cdrom/casper/install-sources.yaml
  2. type: fsimage (not fsimage-layered) tells subiquity the image is a complete rootfs. It won’t stack it on top of ubuntu-server-minimal.squashfs.
  3. size: is the uncompressed size in bytes, which subiquity uses for its disk-space check. The NVIDIA values above are uncompressed (683900928 bytes for a 153 MB squashfs). Replace size 4294967296 below with the actual number: from sudo du -sb /path/to/rootfs | cut -f1
  4. Keep all five squashfs layers, including ubuntu-server-minimal.squashfs and ubuntu-server-minimal.ubuntu-server.squashfs. The installer itself boots from that chain, even though it no longer installs from it.
  5. Update md5sum.txt for both changed files, using the same sed pattern as the nvidia guide:
  for f in casper/install-sources.yaml casper/custom.squashfs; do
      H=$(md5sum "$WORKDIR/$f" | awk '{print $1}')
      grep -q "  \./$f$" "$WORKDIR/md5sum.txt" \
        && sed -i "s|^[0-9a-f]\+  \./$f$|$H  ./$f|" "$WORKDIR/md5sum.txt" \
        || echo "$H  ./$f" >> "$WORKDIR/md5sum.txt"
  done

Example casper/install-sources.yaml

- default: true
  description:
    en: Custom root filesystem.
  id: custom
  locale_support: none
  name:
    en: Custom rootfs
  path: custom.squashfs
  size: 4294967296
  type: fsimage
  variant: server
- description:
    en: This version has been customized to have a small runtime footprint in environments
      where humans are not expected to log in.
  id: ubuntu-server-minimal
  locale_support: none
  name:
    en: Ubuntu Server (minimized)
  path: ubuntu-server-minimal.squashfs
  size: 683900928
  type: fsimage
  variant: server
- description:
    en: The default install contains a curated set of packages that provide a comfortable
      experience for operating your server.
  id: ubuntu-server
  locale_support: locale-only
  name:
    en: Ubuntu Server
  path: ubuntu-server-minimal.ubuntu-server.squashfs
  size: 1318465536
  type: fsimage-layered
  variant: server

Thanks @whitesscott

I already done that. but diff with yours.

I empty the ubuntu-server-minimal.ubuntu-server.squashfs but keep it there.
replace ubuntu-server-minimal.squashfs with my rootfs.squashfs

not change the casper/install-sources.yaml.

seems that work also.