[Eisfair] eisfair-64 auf interne SSD

Thomas Bork tom at eisfair.org
Mo Mär 30 19:26:36 CEST 2020


Am 30.03.2020 um 13:58 schrieb Stefan Puschek:

> Command (m for help): M
> Entering protective/hybrid MBR disklabel.

Ach der protective MBR...

> Device     Boot Start       End   Sectors   Size Id Type
> /dev/sda1  *        1 234441647 234441647 111.8G ee GPT
> und meine beiden Intel-Atom-Boards brauchen das auch...
> Aber das hatten wir schon mal - vor (geschätzt) einem Jahr

Ich erinnere mich. Und jetzt weiss ich auch wieder, warum ich das nicht 
eingebaut habe:

Weil es der Spezifikation widerspricht:

Some old BIOSes (from before year 2010) attempt to parse the boot sector 
and refuse to boot it if it does not contain a bootable MBR partition. 
This is a problem if one wants to use GPT on this disk, because, from 
the BIOS viewpoint, it contains only one, non-bootable, MBR partition of 
type ee (i.e., the protective MBR partition). One can mark the 
protective MBR entry as bootable using fdisk -t mbr /dev/sda, and it 
will work on some BIOSes. However, the UEFI specification prohibits the 
protective MBR partition entry from being bootable, and UEFI-based 
boards do care about this, even in the legacy boot mode.

Also würde das wohl auf Deinem - aber eben wieder nicht auf anderen 
Boards funktionieren.

Hattest Du die 2 Variante mal probiert?

So, this matters if one wants to create a GPT-based USB flash drive that 
is supposed to boot both on modern UEFI-based boards and also on old 
BIOSes that insist on finding a bootable MBR partition. It is not 
possible to solve this problem using traditional tools such as fdisk or 
gdisk, but it is possible to create a fake MBR partition entry suitable 
for both kinds of BIOSes manually as a sequence of bytes.

The command below will overwrite the second MBR partition slot and add a 
bootable partition there of type 0 (i.e. unused), covering only the 
first sector of the device. It will not interfere with the GPT or with 
the first MBR partition entry which normally contains a protective MBR 
partition.

# printf '\200\0\0\0\0\0\0\0\0\0\0\0\001\0\0\0' | dd of=/dev/sda bs=1 
seek=462

The end result will look like this:

# fdisk -t mbr -l /dev/sda

Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Disk model: ST3250820AS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start       End   Sectors   Size Id Type
/dev/sda1           1 488397167 488397167 232.9G ee GPT
/dev/sda2  *        0         0         1   512B  0 Empty

Partition table entries are not in disk order.


Davon abgesehen habe ich im Installer nur sfdisk und sgdisk zur 
Verfügung und beide erlauben meiner Meinung nach nicht, den protective 
MBR als bootbar zu markieren.

Ansonsten habe ich für den nächsten Installer die Möglichkeit 
vorgesehen, die GPT-Partitionierung (nach einer Neu-Partitionierung) in 
MBR zu wandeln:

https://web.nettworks.org/repo/changelog/eisfair?cs=73623

-- 
der tom
[eisfair-team]


Mehr Informationen über die Mailingliste Eisfair