[syslinux] isolinux: Generate GPT and Mac bootable images

H. Peter Anvin hpa at zytor.com
Fri Aug 5 14:48:00 PDT 2011


On 08/05/2011 01:35 PM, Matthew Garrett wrote:
> EFI systems typically don't support booting off ISO 9660 filesystems, 
> even if written to USB sticks. This patch adds support for generating a 
> GPT that covers the stick as well, with an additional partition entry 
> pointing purely at the secondary El Torito image. When burned to CD the 
> secondary El Torito will be used as an EFI boot image, and when written 
> to a USB stick the GPT partition will be found and may be booted from.
> 
> However, some earlier EFI Macs don't support booting from El Torito 
> images via EFI. To cater for them this also supports generating an Apple 
> partition table, allowing a third El Torito image in HFS+ format to be 
> made available to the firmware. This requires padding the MBR images 
> slightly in order to leave space for the Apple header, but should have 
> no functional impact.
> 
> Signed-off-by: Matthew Garrett <mjg at redhat.com>

Hmmm... as I recall, you can't put a bunch of padding before the xorw
%bp, %bp... some broken BIOS requires that at offset 0... presumably
some specific M$ MBR had that instruction first, and someone decided to
use it as a magic signature.  Sigh.

That's also why it's encoded with .byte ... that's a nonstandard
encoding which I believe is produced by Microsoft's assembler but not by
most others.

	-hpa


> 
> diff --git a/mbr/isohdpfx.S b/mbr/isohdpfx.S
> index 2784fb8..65ab75a 100644
> --- a/mbr/isohdpfx.S
> +++ b/mbr/isohdpfx.S
> @@ -65,6 +65,38 @@ bootsec:
>  	.text
>  	.globl	_start
>  _start:
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
> +	nop
>  	.byte	0x33, 0xed	/* xorw	%bp, %bp */
>  	cli
>  	movw	%bp, %ss




More information about the Syslinux mailing list