Ralph Ronnquist
2023-09-08 07:00:01 UTC
Package: syslinux-efi
Version: 6.04~git20190206.bf6db5b4+dfsg1
The use case of a hybrid ISO where an EFI partition with syslinux.efi
is set up as El Torrito boot option, all duly equipped. works fine
when the media is provided as disk drive, but not when the same media
is provided as cdrom drive.
The cause seems to be in a mixup between the actual and assumed media
sector sizes; a cdrom has 2048 byte sectors while a disk has 256 byte
sectors. (In particular the partition table on the ISO has sector
indexes based on 256 byte sectors)
As an attempt to resolve that, I made teh attached patch for
efi/diskio.c. It resolves the sector size "mixup" by means of a
wrapper function for disk reading/writing that translates between
(hardcoded) "wanted" sectors of 256 byte size, and "actual"
(bio->Media->BlockSize) when different from that. The implementation
lacks some in efficiency but works well enough for boot loading.
I also attch the patch for efi/efi.h I needed in order to build the
package.
Hopefully this patching can be applied to the syslinux-efi package, to
allow for isohybrid ISO that has only isolinux/syslinux as boot setup.
Ralph.
Version: 6.04~git20190206.bf6db5b4+dfsg1
The use case of a hybrid ISO where an EFI partition with syslinux.efi
is set up as El Torrito boot option, all duly equipped. works fine
when the media is provided as disk drive, but not when the same media
is provided as cdrom drive.
The cause seems to be in a mixup between the actual and assumed media
sector sizes; a cdrom has 2048 byte sectors while a disk has 256 byte
sectors. (In particular the partition table on the ISO has sector
indexes based on 256 byte sectors)
As an attempt to resolve that, I made teh attached patch for
efi/diskio.c. It resolves the sector size "mixup" by means of a
wrapper function for disk reading/writing that translates between
(hardcoded) "wanted" sectors of 256 byte size, and "actual"
(bio->Media->BlockSize) when different from that. The implementation
lacks some in efficiency but works well enough for boot loading.
I also attch the patch for efi/efi.h I needed in order to build the
package.
Hopefully this patching can be applied to the syslinux-efi package, to
allow for isohybrid ISO that has only isolinux/syslinux as boot setup.
Ralph.