4 ms·
Very cool hack. But, as okanat says, if the goal is to run legacy operating systems, then modern hardware is going to be challenging in other ways too. IME th
by LukeShu 1y ago
Very cool hack.
But, as okanat says, if the goal is to run legacy operating systems, then modern hardware is going to be challenging in other ways too. IME the biggest thing I want PC BIOS back for is the ability to use non-GPT disk layouts, which this doesn't accomplish as, as to use it you put it on the EFI partition on your GPT disk.
- skissane 1y agoMBR and GPT can coexist on the same disk - MBR goes in sector 0, GPT starts in sector 1. Normally the MBR in sector 0 is “protective” (it just marks the whole disk as in use), but in theory you can create a “hybrid” disk in which the MBR and GPT both describe the same partitions. I suppose you could even reserve most of the disk as one big GPT partition and then split that up into multiple MBR partitions. You’d have to be very careful editing the partition table on such a disk because standard tools might break it.
- rjst01 1y agoIn practice, whether or not this actually works can be very hit-or-miss. We've found several UEFI implementations will not consider a disk bootable if the pMBR doesn't exactly match the spec, which specifies that the 'protective' partition shouldn't be marked as bootable in the MBR partition table. Meanwhile, other implementations will not consider the disk bootable in BIOS mode if the partition in the pMBR is not marked bootable.
- mintsuki 1y agoIndeed! Which is why the only portable solution is to not do this. For stuff that needs to be bootable by both BIOS and UEFI the only portable solution is to use MBR, not GPT. That means all legacy BIOS systems will boot it, and so will all UEFI systems since UEFI must support MBR. For ISOs that need to additionally be booted off of optical media (aka ISOHYBRIDs) the story gets more complicated, but ultimately what you need to take away from that is the same: avoid GPT at all cost.
- skissane 1y agoI wonder… does the UEFI spec mandate any particular behaviour in these cases? Does the UEFI SCT test for it? Seems like an inconsistency which could be addressed by adding it to the spec and/or test suite. I guess the other thing I don’t know, is whether there is any actual real world pressure on firmware vendors to pass the test suite.
- mintsuki 1y agoBy spec, UEFI is required to support both MBR and GPT, so there is literally nothing stopping you from using MBR.
- LukeShu 1y agoToo late to edit: non-GPT, non-MBR For instance, whole-disk btrfs. Or old BSD partition schemes.
- mintsuki 1y agoThat is a very niche use case, and also won't really work on most real BIOS machines as they actually check for a proper MBR and/or BPB (and no GPT), which is also why GPT on BIOS support is very spotty, since a lot of BIOSes will detect the GPT and refuse to boot, or refuse to boot in legacy (CSM) mode. In any case that is far beyond the original scope of booting old PC OSes, which MBR support alone serves really well (99.9% of the way there, really), which is why I assumed by default you were thinking of MBR, not some other weird scheme.
- superkuh 1y agoGPT is not UEFI. It's just the format of the storage device. I have many computers with GPT formatted disks with actual master boot records at the start of the disk that boot MBR on both original BIOS machines and CSM BIOS machines. MBR is two things with the same name. It is both the format of the storage device and describes a booting mode using a master boot record and up to 4 partitions. GPT is one thing. It is a format for a storage device. It is the alternative to the MBR format for storage devices. It has nothing to do with (U)EFI. BIOS or BIOS/csm are not types of formats for storage devices. They are types of boot processes. (U)EFI is another type of boot process. You can easily mix and match boot types (BIOS/csm vs UEFI) and storage device format types (GPT vs MBR). As others have said, there may be some slight incompatibilities on some rare hardware/software configs, but mostly it just works.
- mintsuki 1y agoI know every word of what I said in the message you're replying to. While what you said is mostly accurate, as in MBR != BIOS and GPT != UEFI, never in my original message have I stated that that is the case. And the rest of what you said is incorrect, as per my original message. I invite you to read what I said again.