[Top][All Lists]

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

Re: [Bug-xorriso] ISO installer image: GPT versus MBR partitions

From: Thomas Schmitt
Subject: Re: [Bug-xorriso] ISO installer image: GPT versus MBR partitions
Date: Sun, 21 Apr 2019 11:35:49 +0200


i wrote:
> > with the Guix EFI partition image in
> > partition 2 of the USB stick and
> >    dd if=/dev/zero bs=1 count=16 seek=446 of=/dev/sdc2

Florian Pelz wrote:
> Yes, this fixes the issue.

I really had a good feeling with that theory. :))


Ok, now for the last experiment. Just for curiosity, as i believe it
is not a good solution (and mformat -k isn't either):
Does start LBA 1 of partition 1 prevent the endless loop, too ?

So please write to byte 446 (dec) to 461 (dec) of the FAT image:

  80  00  02  00  01  01  12  4f  01  00  00  00  3f  0b  00  00

In the FAT image treated by the "dd" above, these bytes are all 00.
In the original FAT image they are:

  80  00  01  00  01  01  12  4f  00  00  00  00  40  0b  00  00
          ==                      ==              ==  ==

If this works, then we can blame a bug in the Macbook's EFI which is
too stupid to avoid endless recursion when exploring a potential
tree of partition tables.
(If it does not work, then we only have a heuristic indication that
 a partition table entry in the EFI partition is bad for the Macbook.)

Nevertheless, start LBA 1 is less desirable than no partition table
entry at all, because LBA 1 causes a partition that is not mountable.
So an option for mformat would be of interest, which writes an MBR
(other than with -k) but does not create a partition entry.

Alternatively, the Guix ISO production could apply above zeroizing dd
run to the EFI image by help of a pseudo-xorriso wrapper under
grub-mkrescue. This wrapper would learn the EFI image file address from
the xorriso options, patch that file, and then run xorriso with the
arguments given by grub-mkrescue.

(I will give my grub-mkrescue-sed.sh wrapper such a feature as addon-on
 to its other manipulation offers.)


Reading UEFI 2.4, 12.3.1 "System Partition" i do not find statements
about partition tables inside that partition, but only:

  "A System Partition supports backward compatibility with legacy systems
   by reserving the first block (sector) of the partition for compatibility
   code. On legacy systems, the first block (sector) of a partition is
   loaded into memory and execution is transferred to this code.
   EFI firmware does not execute the code in the MBR. The EFI firmware
   contains knowledge about the partition structure of various devices,
   and can understand legacy MBR, GPT, and “El Torito.”

So an MBR-like start block of the partition is explicitely encouraged.
"understand"ing partitioning offers a wide range of interpretation.
So the behavior of the Macbook is not totally against specs.
It is just not overly stable and helpful.

"I am not crazy. Don't call me crazy. I...I'm just not user friendly."
Roberto, Futurama.

Have a nice day :)


reply via email to

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