3 ms·
Unmovable files! I remember that DOS boot sector did not understand FAT, so some files had to be in exact locations. TBH I'm a bit uncertain on how today's GRU
by praptak 5y ago
Unmovable files! I remember that DOS boot sector did not understand FAT, so some files had to be in exact locations.
TBH I'm a bit uncertain on how today's GRUB goes from the boot sector, which is too small to understand filesystems, to a beast that can load the kernel from practically any filesystem.
I think that GRUB 1 used the 32kB DOS compatibility region to store whatever didn't fit in the MBR. The 32kB was enough for it to boot itself to a state where it understands filesystems.
- Dylan16807 5y agoFor BIOS boot, these days basically all partitions are aligned to a multiple of a megabyte, leaving basically the same gap after the MBR but bigger, so GRUB puts its core in the same place. For UEFI boot, it's the firmware's job to understand the partition table and FAT32 so that it can open up the boot partition and make a list of bootable files. Then it can run one or give the user a menu. So GRUB just has to put a single file in the right directory.