[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Re : Making an ISO that boot in UEFI
From: |
Thomas Schmitt |
Subject: |
Re: Re : Making an ISO that boot in UEFI |
Date: |
Sun, 07 Feb 2021 09:31:31 +0100 |
Hi,
Paul Dufresne wrote:
> It seems possible (to boot from a CDROM in UEFI) with SysLinux:
> https://wiki.syslinux.org/wiki/index.php?title=Isohybrid#UEFI
SYSLINUX is the bootloader which cannot boot via UEFI from optical media.
Its EFI code works from USB stick or hard disk, but not from DVD.
> unclear if it is with GRUB too...
About all GNU/Linux ISOs use GRUB for UEFI booting on x86. Only Knoppix
insists in SYSLINUX EFI from DVD ... and fails at least on real iron.
See for an example of x86 BIOS+EFI:
https://wiki.debian.org/RepackBootableISO#Determine_those_options_which_need_to_be_adapted_on_amd64_or_i386
> ... and GNU Mach is not a Linux...
It seems that the Debian GNU/Hurd ISOs already use GRUB for booting via
legacy BIOS. So using GRUB for EFI would not be as inconvenient as for
Debian amd64, which needs configuration for both SYSLINUX and GRUB.
But afaik, it was not trivial to make the amd64 ISOs ready for EFI.
There was obviously more to do than just creating an EFI partition image
and putting it into the ISO. I guess that initrd and kernel needed
adaptions, too.
> according to man xorriso, that would looks like:
> -boot_image "grub" efi_path=bootefi.fat32 platform_id="0xef"
Each of the parameters gets submitted by its own -boot_image command.
The EFI boot equipment of an amd64 ISO in the native command language of
xorriso:
$ xorriso -indev debian-10.6.0-amd64-netinst.iso -report_el_torito cmd
...
-boot_image any efi_path='/boot/grub/efi.img'
-boot_image any platform_id=0xef
-boot_image any emul_type=no_emulation
-boot_image any load_size=2899968
-boot_image isolinux partition_entry=gpt_basdat
-boot_image isolinux partition_entry=apm_hfsplus
Two of these commands are not really needed.
The size is assessed automatically if not given explicitely by:
-boot_image any load_size=2899968
Having an Apple Partition Map makes only sense if the ISO has HFS or HFS+
as additional filesystem equipment:
-boot_image isolinux partition_entry=apm_hfsplus
But i would expect that Hurd's ISO gets built by the mkisofs emulation
$ xorriso -indev debian-10.6.0-amd64-netinst.iso -report_el_torito as_mkisofs
...
-e '/boot/grub/efi.img'
-no-emul-boot
-boot-load-size 5664
-isohybrid-gpt-basdat
-isohybrid-apm-hfsplus
Again, -boot-load-size is specific to the size of the EFI partition and can
be omitted, and -isohybrid-apm-hfsplus is useless.
> where bootefi.fat32 would be a file in FAT32 containing both:
> /EFI/BOOT/BOOTIA32.EFI
> /EFI/BOOT/BOOTX64.EFI
Yes.
If you want to tinker with GRUB and EFI, consider to build a minimal
grub-mkrescue ISO.
Install (maybe on a GNU/Linuux system) the Debian packages
grub-common grub-pc-bin grub-efi-amd64-bin grub-efi-ia32-bin xorriso
and do
mkdir minimal
touch minimal/empty-file.txt
grub-mkrescue -o output.iso minimal
The result output.iso will bear a partition table with a mountable FAT
partition. There you find GRUB's initial EFI boot stages.
There is a man-in-the-middle script in xorriso's source which can be used
to show and possibly alter the xorriso run of grub-mkrescue.
https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/frontend/grub-mkrescue-sed.sh
See the initial comments in the script, up to "Do the work".
To get shown the xorriso arguments, run:
chmod u+x /...absolute.path.../grub-mkrescue-sed.sh
export MKRESCUE_SED_MODE=original
export MKRESCUE_SED_DEBUG=yes
grub-mkrescue -o output.iso minimal \
--xorriso=/...absolute.path.../grub-mkrescue-sed.sh
My favorite is
MKRESCUE_SED_MODE=mbr_only
Ubuntu recently switched to a layout that resembles much
MKRESCUE_SED_MODE=gpt_appended
because some Lenovo machines did not work with an appended MBR partition.
Have a nice day :)
Thomas
- Does Mach ignore the Multiboot(1 or 2) information data structure?, (continued)
- Re: Can't boot GNU Mach with efi, jbranso, 2021/02/06
- Re: Can't boot GNU Mach with efi, Paul Dufresne, 2021/02/06
- Making an ISO that boot in UEFI, Paul Dufresne, 2021/02/06
- Re: Making an ISO that boot in UEFI, Samuel Thibault, 2021/02/06
- Re: Making an ISO that boot in UEFI, Paul Dufresne, 2021/02/06
- Re: Making an ISO that boot in UEFI, Samuel Thibault, 2021/02/07
- Re: Making an ISO that boot in UEFI, Samuel Thibault, 2021/02/07
- Re : Making an ISO that boot in UEFI, Paul Dufresne, 2021/02/06
- Re: Re : Making an ISO that boot in UEFI,
Thomas Schmitt <=
- Re: Can't boot GNU Mach with efi, jbranso, 2021/02/06