Created attachment 203137 [details] Error output by DiskGenius FreeBSD Official Handbook said that FreeBSD can be written to USB drive by command "dd". But -.iso files can't boot in UEFI. I just tested two files : FreeBSD-12.0-RELEASE-amd64-disc1.iso FreeBSD-12.0-RELEASE-amd64-dvd1.iso and I Used "Rufus" to write it to my USB drive. But it cannot boot on my notebook.Only -.img files writing USB drive can boot. I had checked files sha236 is ok. And DiskGenius says that my USB deive : GPT primary database error CRC REEOR GPT ERROR WINDOWS 10 LTSC 2019 Rufus 3.3 xiaomi air 12.5 6Y30
Created attachment 203138 [details] It cannot boot on my notebook
Created attachment 203139 [details] rufus
Created attachment 203140 [details] a iso file
CC'ing benno@, as the driver of hybrid ISO
Re: comment 0, I can't guess what was wrong in that case. Secure boot enabled, maybe? I do frequently boot from hybrid image files – with EFI enabled (and secure boot disabled) – in VirtualBox, without difficulty. The first screenshot at <https://www.reddit.com/r/freebsd/comments/1lmg9n5/freebsd_installer/> was of: FreeBSD-15.0-CURRENT-amd64-20250626-dca2ab32e831-278235-disc1.iso Similarly, never a problem for me with disc-oriented .iso files written to USB memory sticks and used with real hardware (OT: I can no longer use USB devices with VirtualBox), although I might never have tested the two that were mentioned in comment 0. See also: <https://codeberg.org/grahamperrin/freebsd-doc/issues/54> > FreeBSD Handbook: installation: misdirection to use optical media (AMD64) > Generate hybrid ISO images for amd64. … (2018-04-17) was on the > release/12.0.0 branch.
In fact, for virtual machines, UEFI booting from an ISO usually works fine. The same goes for some physical computers. However, many branded computers—such as Xiaomi laptops—are unable to recognize this kind of ISO. If you use Rufus to write the ISO to a USB drive, you will receive a warning like the one below. ------------------------------ The image you have selected is an lSOHybrid, but its creators have notmade it compatible with ISO/File copy mode. As a result, DD image writing mode will be enforced.
A further note: my Hasee laptop also fails to recognize these ISOs — the USB boot option simply doesn't appear in the boot menu.
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 ```
Created attachment 266162 [details] ISO in diskgenius
Did you check if secure boot is disabled? Installed this week FreeBSD from USB using FreeBSD-15.0-RELEASE-amd64-dvd1.iso Works normally.
I'd like to specify that I installed in both desktop AMD ryzen 7 5700x with nvidia graphics as well as a thinkpad i7 12gen with intel xe graphics. Both worked normally, dd and balena etcher