Re: What file system I should implement
Posted: Thu Nov 21, 2019 4:04 am
As far as the FATness of the ESP, it appears to be the case that
1) The concept of the ESP was introduced with EFI, but the filesystem to be used was not specified until UEFI came along.
2) For UEFI, the exact filesystem to be used is specified, and the specified filesystem is basically, but not identically, FAT32 (the specification is maintained independently of the original FAT32 specification).
3) Old Intel Macs used EFI with an HFS ESP. Newer Intel Macs use UEFI, and seem to have a FAT32 ESP, but have their own boot method if no UEFI bootloader is found, and in the normal state of the system the ESP is completely empty, so boot falls through to the alternate method, which loads MacOS directly from its own partition. The system will operate completely normally if the ESP is removed completely, with the exception that firmware updates are staged through the ESP and will fail if it does not exist.
4) Nothing I've found so far indicates that the behavior described in 2) violates the spec, though it probably wasn't what the people that wrote the spec intended, and by definition is not part of the spec.
My own observations:
4) Other situtations with an empty or non-existent ESP that would not be out-of-spec, and would be closer to the spirit of the specification than the Mac case can be imagined, such as when network booting on a system with no local disks, so an operating system running on a fully-compliant UEFI machine cannot necessarily count on having an ESP available.
5) An OS in development that is not self-hosting does not necessarily need to interact with the ESP at all (basically letting the host OS do the ESP-wranglng), so FAT drivers do not necessarily need to be written immediately.
1) The concept of the ESP was introduced with EFI, but the filesystem to be used was not specified until UEFI came along.
2) For UEFI, the exact filesystem to be used is specified, and the specified filesystem is basically, but not identically, FAT32 (the specification is maintained independently of the original FAT32 specification).
3) Old Intel Macs used EFI with an HFS ESP. Newer Intel Macs use UEFI, and seem to have a FAT32 ESP, but have their own boot method if no UEFI bootloader is found, and in the normal state of the system the ESP is completely empty, so boot falls through to the alternate method, which loads MacOS directly from its own partition. The system will operate completely normally if the ESP is removed completely, with the exception that firmware updates are staged through the ESP and will fail if it does not exist.
4) Nothing I've found so far indicates that the behavior described in 2) violates the spec, though it probably wasn't what the people that wrote the spec intended, and by definition is not part of the spec.
My own observations:
4) Other situtations with an empty or non-existent ESP that would not be out-of-spec, and would be closer to the spirit of the specification than the Mac case can be imagined, such as when network booting on a system with no local disks, so an operating system running on a fully-compliant UEFI machine cannot necessarily count on having an ESP available.
5) An OS in development that is not self-hosting does not necessarily need to interact with the ESP at all (basically letting the host OS do the ESP-wranglng), so FAT drivers do not necessarily need to be written immediately.