You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
initrd: add ISO boot detection and USB filesystem validation
Add runtime detection to warn users when their ISO doesn't support
boot from ISO file on USB stick.
Changes:
- Add detect_iso_boot_method() to scan initrd for boot quirks
(findiso, iso-scan, live-media, boot=casper, inst.stage2, nixos)
- Detect USB stick filesystem type (ext4/vfat/exfat) from blkid
- Use strings on initrd binary directly (works when cpio fails)
- Validate ISO initrd supports reading USB filesystem
- Show warning when FS not supported
- Filter out installer initrds from detection
- Show warning dialog when boot may fail
- Add distro-specific kernel params for Ubuntu, Debian, Tails,
Fedora, NixOS, PureOS, Arch
- Detect inst.stage2= as anaconda-specific (Fedora Silverblue)
Tested ISOs (2026-04):
Working:
- Ubuntu Desktop (iso-scan/filename)
- Debian Live kde/xfce (findiso)
- Tails standard (live-media=removable, ext4/vfat)
- Tails exfat-support ISO (exfat)
- Fedora Workstation (boot=casper)
- NixOS (findiso)
- PureOS (boot=casper)
Not working (use dd or alternate):
- Debian DVD (CD-only design)
- Fedora Silverblue (anaconda, inst.stage2=)
References:
- https://a1ive.github.io/grub2_loopback.html
- https://wiki.archlinux.org/title/ISO_Spring_(%27Loop%27_device)
- https://wiki.debian.org/DebianInstaller/CreateUSBMedia
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Copy file name to clipboardExpand all lines: doc/boot-process.md
+42-1Lines changed: 42 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,48 @@ menu, system info, power off.
118
118
119
119
---
120
120
121
-
## Stage 3: kexec-select-boot
121
+
## Stage 2b: USB ISO Boot (`kexec-iso-init.sh`)
122
+
123
+
When booting from an ISO file on USB media, `kexec-iso-init.sh` handles:
124
+
125
+
1.**Signature verification**: Check for `.sig` or `.asc` detached signature
126
+
2.**Mount ISO**: Mount the ISO file as loopback device
127
+
3.**Detect USB filesystem**: Get filesystem type from USB stick (ext4/vfat/exfat)
128
+
4.**Validate initrd support**: Check ISO initrd supports:
129
+
- USB storage drivers
130
+
- Loopback device
131
+
- Filesystem of USB stick
132
+
- Boot quirk script to find ISO on USB (findiso/live-media/boot=casper)
133
+
5.**Warning dialog**: If ISO may not boot, show warning and allow cancel
134
+
135
+
### Known Compatible ISOs (tested 2026-04)
136
+
137
+
| Distribution | Boot Param | USB FS | Status |
138
+
|--------------|------------|--------|--------|
139
+
| Ubuntu Desktop | iso-scan/filename | ext4/vfat/exfat | works |
140
+
| Debian Live kde/xfce | findiso | ext4/vfat/exfat | works |
141
+
| Tails standard | live-media=removable | ext4/vfat | works |
142
+
| Tails exfat-support ISO | live-media=removable | exfat | works |
143
+
| Fedora Workstation | boot=casper | ext4/vfat | works |
144
+
| NixOS | findiso | ext4/vfat/exfat | works |
145
+
| PureOS | boot=casper | ext4/vfat/exfat | works |
146
+
147
+
### Known Incompatible ISOs
148
+
149
+
| Distribution | Reason | Workaround |
150
+
|--------------|--------|------------|
151
+
| Debian DVD | CD-only design, no USB boot |`dd` or use Debian netinst |
152
+
| Fedora Silverblue | Anaconda with `inst.stage2=hd:LABEL=`, not ISO file boot | Use Fedora Media Writer |
153
+
154
+
**Why Fedora Silverblue doesn't work**: Silverblue uses anaconda with `inst.stage2=hd:LABEL=Fedora-SB-...` which expects extracted installer files on USB with exact label, not an ISO file.
155
+
156
+
### References
157
+
158
+
-[GRUB2 loopback ISO boot](https://a1ive.github.io/grub2_loopback.html)
159
+
-[Arch Linux ISO Boot](https://wiki.archlinux.org/title/ISO_Spring_(%27Loop%27_device))
160
+
-[Debian USB creation](https://wiki.debian.org/DebianInstaller/CreateUSBMedia)
161
+
162
+
---
122
163
123
164
Called from the boot menu. Responsible for final verification and OS handoff.
"ISO boot from USB file may not work.\n\nThis ISO does not have iso-scan/findiso/live-media in its initrd - it was designed for CD/DVD or dd-to-USB.\n\nKernel parameters passed externally may not be sufficient.\n\nTry:\n- Use distribution-specific ISO (e.g., Debian hd-media)\n- Write ISO directly to USB with dd\n- Use a live USB image\n\nDo you want to proceed anyway?" \
156
+
0 80;then
157
+
DIE "ISO boot cancelled - unsupported ISO on USB file"
158
+
fi
159
+
else
160
+
NOTE "This ISO does not have iso-scan in initrd"
161
+
NOTE "Try: dd ISO to USB, or use live USB image"
162
+
INPUT "Proceed with boot anyway? (y/N):" -n 1 response
163
+
if [ "$response"!="y" ] && [ "$response"!="Y" ];then
164
+
DIE "ISO boot cancelled - unsupported ISO on USB file"
165
+
fi
166
+
fi
167
+
fi
168
+
fi
169
+
170
+
# Detect USB stick filesystem and validate initrd supports it
0 commit comments