[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-xorriso] grub-mkrescue does not boot on older Macs as USB stick

From: Alexander E. Patrakov
Subject: Re: [Bug-xorriso] grub-mkrescue does not boot on older Macs as USB stick
Date: Thu, 24 Dec 2015 00:37:39 +0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0

23.12.2015 23:44, Andrei Borzenkov пишет:
OK, it turned out to be not related to xorriso, but for the record ...

Mac does not like FAT created by mformat. I can reproduce it easily by
creating single MSDOS partition on USB stick of type 0xef size 2880K,
formatting it with same options as grub-mkrescue:

sudo mformat -C -f 2880 -L 16 -i /dev/sdb1 ::

and copying bootx64.efi into \EFI\BOOT on it.

The same partition formatted with mkfs -t fat works like a charm.

Both Porteus and openSUSE CD (which correctly boot) have ESP created by

TBH I think that precreating FAT once and shipping image with GRUB is
the most simple solution. It can be empty, we can dd files later.


I have byte-compared the boot sectors (because that's the only different things in the filesystems).

So, here are the differences:

Bytes 0x03 .. 0x0a represent the OEM ID (software that created the filesystem). mformat: "MTOO4018", mkfs.vfat: "mkfs.fat". Should not be significant.

Bytes 0x11 .. 0x12: a WORD that represents the number of root directory entries. mformat: 240, mkfs.vfat: 224. This is settable via the -r parameter of mformat.

Bytes 0x27 .. 0x2a: a DWORD with the serial number of the filesystem. Should not be significant.

Bytes 0x3e .. 0x1fe: x86 bootstrap code, which is not executed and thus is likely not significant.

If you make the number of root directory entries match (using -r 14), then there appears a difference in bytes 0x16 .. 0x17, which form a WORD that means the number of sectors per FAT. mformat -r 14: 16, mkfs.vfat: 9. But this is settable with -L.

So, could you please run this?

sudo mformat -C -f 2880 -L 9 -r 14 -i /dev/sdb1 ::

If this fails, try giving mformat a known-good x86 boot sector using the -B option.

Alexander E. Patrakov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]