Date: Sat, 13 Dec 2025 16:09:21 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 236786] FreeBSD -.iso files not support written to USB drive Message-ID: <bug-236786-227-HkY7Dq9FtU@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-236786-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236786 --- Comment #8 from ykla <yklaxds@gmail.com> --- According to https://reviews.freebsd.org/D15051, FreeBSD introduced hybrid boot support eight years ago. However, based on testing conducted at various times using different FreeBSD images, computers and USB drives — including Dell, Xiaomi and Lenovo laptops, as well as an i7-1260p small desktop with an AMI BIOS — none were able to recognise the bootable USB. I used various tools to write the ISO to USB, including UltraISO, dd, Rufus and Win32 Disk Imager. The current result is that no boot entries can be found in UEFI/BIOS. This does not affect ISO UEFI recognition in VMware/ESXi, but it still cannot be recognised in PVE without manually specifying the EFI path. Some users in Chinese communities have reported that their devices worked, but I have never been able to reproduce this. Even with Ventoy, some devices still show potential mounting issues. When mounting the ISO with software, the EFI partition in the FreeBSD ISO disappears and the only EFI-related item is an empty folder called /BOOT/EFI. Since the `/BOOT/EFI` folder is empty and `/EFI` does not exist (no `/EFI/BOOT/BOOTX64.EFI`) when the ISO is actually mounted, it is understandable why UEFI/BIOS cannot find any USB boot entries. In Ubuntu ISOs, the EFI appears as /EFI/. It appears that there are issues with the El Torito EFI in the FreeBSD ISO. Notably, the IMG images do not have this problem. Note: Since I do not have a CD/DVD drive or discs, I have not actually tested whether this ISO image can boot properly under UEFI on a DVD device. It seems clear that this ISO may violate multiple UEFI specifications. >For removable media devices there must be only one UEFI-compliant system partition, and that partition must contain an UEFI-defined directory in the root directory. The directory will be named EFI. All OS loaders and applications will be stored in a subdirectory below EFI called BOOT. There must only be one executable EFI image for each supported processor architecture in the BOOT directory. For removable media to be bootable under EFI, it must be built in accordance with the rules laid out in Removable Media Boot Behavior. This guarantees that there is only one image that can be automatically loaded from a removable media device by the EFI Boot Manager. Any additional EFI executables must be in directories other than BOOT. The following is a sample directory structure for an EFI system partition present on a removable media device. (https://uefi.org/specs/UEFI/2.11/13_Protocols_Media_Access.html 13.3.1.3. Directory Structure) ``` \EFI \BOOT BOOT{machine type short name}.EFI ``` >IS0-9660 is the industry standard low level format used on CD-ROM and DVD-ROM. The CD-ROM format is completely described by the “El Torito” Bootable CD-ROM Format Specification Version 1.0. To boot from a CD-ROM or DVD-ROM in the boot services environment, an EFI System partition is stored in a “no emulation” mode as defined by the “El Torito” specification. A Platform ID of 0xEF indicates an EFI System Partition. The Platform ID is in either the Section Header Entry or the Validation Entry of the Booting Catalog as defined by the “El Torito” specification. EFI differs from “El Torito” “no emulation” mode in that it does not load the “no emulation” image into memory and jump to it. EFI interprets the “no emulation” image as an EFI system partition. EFI interprets the Sector Count in the Initial/Default Entry or the Section Header Entry to be the size of the EFI system partition. If the value of Sector Count is set to 0 or 1, EFI will assume the system partition consumes the space from the beginning of the “no emulation” image to the end of the CD-ROM.(https://uefi.org/specs/UEFI/2.11/13_Protocols_Media_Access.html 13.3.2.1. ISO-9660 and El Torito) This bug has existed for almost as long as I have been using FreeBSD. I have largely ignored it over the years, but today I believe it is indeed a bug. ``` ykla@ykla-VMware20-1:~$ xorriso -indev ubuntu-24.04.2-desktop-amd64.iso -report_el_torito plain xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project. xorriso : NOTE : Loading ISO image tree from LBA 0 xorriso : UPDATE : 1235 nodes read in 1 seconds libisofs: NOTE : Found hidden El-Torito image for EFI. libisofs: NOTE : EFI image start and size: 3094573 * 2048 , 10144 * 512 xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded Drive current: -indev 'ubuntu-24.04.2-desktop-amd64.iso' Media current: stdio file, overwriteable Media status : is written , is appendable Boot record : El Torito , MBR protective-msdos-label grub2-mbr cyl-align-off GPT Media summary: 1 session, 3097275 data blocks, 6049m data, 249g free Volume id : 'Ubuntu 24.04.2 LTS amd64' El Torito catalog : 1020 1 El Torito cat path : /boot.catalog El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA El Torito boot img : 1 BIOS y none 0x0000 0x00 4 1021 El Torito boot img : 2 UEFI y none 0x0000 0x00 10144 3094573 El Torito img path : 1 /boot/grub/i386-pc/eltorito.img El Torito img opts : 1 boot-info-table grub2-boot-info El Torito img blks : 2 2536 ``` ``` ykla@ykla-VMware20-1:~$ xorriso -indev FreeBSD-15.0-RELEASE-amd64-disc1.iso -report_el_torito plain xorriso 1.5.6 : RockRidge filesystem manipulator, libburnia project. xorriso : NOTE : Loading ISO image tree from LBA 0 xorriso : UPDATE : 29199 nodes read in 1 seconds libisofs: WARNING : Found hidden El-Torito image. Its size could not be figured out, so image modify or boot image patching may lead to bad results. libisofs: NOTE : Found hidden El-Torito image for EFI. libisofs: NOTE : EFI image start and size: 20 * 2048 , 4096 * 512 xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded Drive current: -indev 'FreeBSD-15.0-RELEASE-amd64-disc1.iso' Media current: stdio file, overwriteable Media status : is written , is appendable Boot record : El Torito , MBR protective-msdos-label cyl-align-off GPT Media summary: 1 session, 663864 data blocks, 1297m data, 249g free Volume id : '15_0_RELEASE_AMD64_CD' El Torito catalog : 19 1 El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA El Torito boot img : 1 BIOS y none 0x0000 0x00 4 1044 El Torito boot img : 2 UEFI y none 0x0000 0x00 4096 20 El Torito img blks : 1 3076 El Torito img blks : 2 1024 ``` ``` ykla@ykla-VMware20-1:~$ sgdisk -p ubuntu-24.04.2-desktop-amd64.iso Disk ubuntu-24.04.2-desktop-amd64.iso: 12389100 sectors, 5.9 GiB Sector size (logical): 512 bytes Disk identifier (GUID): B0EF6CA3-60D1-4A21-98D9-17C385A8B6F8 Partition table holds up to 248 entries Main partition table begins at sector 2 and ends at sector 63 First usable sector is 64, last usable sector is 12389036 Partitions will be aligned on 4-sector boundaries Total free space is 1 sectors (512 bytes) Number Start (sector) End (sector) Size Code Name 1 64 12378291 5.9 GiB 0700 ISO9660 2 12378292 12388435 5.0 MiB EF00 Appended2 3 12388436 12389035 300.0 KiB 0700 Gap1 ``` ``` ykla@ykla-VMware20-1:~$ sgdisk -p FreeBSD-15.0-RELEASE-amd64-disc1.iso Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header. Warning! Main and backup partition tables differ! Use the 'c' and 'e' options on the recovery & transformation menu to examine the two tables. Warning! One or more CRCs don't match. You should repair the disk! Main header: OK Backup header: ERROR Main partition table: OK Backup partition table: ERROR **************************************************************************** Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recovery are STRONGLY recommended. **************************************************************************** Disk FreeBSD-15.0-RELEASE-amd64-disc1.iso: 2656056 sectors, 1.3 GiB Sector size (logical): 512 bytes Disk identifier (GUID): B67560FA-CC19-11F0-17A5-D14FFF7C5968 Partition table holds up to 128 entries Main partition table begins at sector 2 and ends at sector 33 First usable sector is 34, last usable sector is 2656022 Partitions will be aligned on 2-sector boundaries Total free space is 2651868 sectors (1.3 GiB) Number Start (sector) End (sector) Size Code Name 1 34 58 12.5 KiB A501 2 80 4175 2.0 MiB EF00 ``` -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236786-227-HkY7Dq9FtU>
