2

Let's assume a reasonably modern BIOS (2005-), with no bugs/quirks, 512 sector size, LBA48 addressing, and Enhanced Disk Drive support.

The reason for asking is that by a naïve reading of INT 13h Extended Read call, offset sector is an 8-byte value; at 8 ZiB larger than any disk available and beyond the reach of LBA48 addressing. Yet I only find reference to smaller limits, so what is GRUB actually able to support?

What size fields is the blocklist comprised of, used by boot.img / diskboot.img?

1
  • I remember years ago when 1 or 2TB drives were new, grub had issues with some configurations where boot files were over about 650GB into drive. Sometimes install worked, but an update put grub or kernel beyond limit if very large / (root) & then boot failed. Limit now seems to be 2TB. bugs.launchpad.net/ubuntu/+source/grub2/+bug/1666853 Also with UEFI, it has limits on how far into drive the ESP can be. ESP is recommended to be first or near beginning of drive. – oldfred Jan 12 at 3:52
3

GNU GRUB's (also known as grub2) blocklist entries have a 64-bit (uint64_t) field for LBA numbers, so they can store 8-byte values. But the limiting factor will in most cases be what the BIOS INT13h Extended Read routines will accept: if the underlying hardware limit is LBA48, then the limit will be 2^48 blocks, which on 512-byte block size works out to 128 PiB, or about 144 PB.

If we're talking about GRUB Legacy (GRUB 0.9x), its blocklists can only hold 32-bit (uint32_t) LBA values.

On a UEFI system, the firmware disk access API limit is at 9.4 zettabytes, and as grubx64.efi can just tell the firmware to load a particularly-named file from a GPT partition identified by an UUID, GRUB's limits might not be applicable at all. Of course, if you use a filesystem type that is not supported by the firmware, you'll need to rely on GRUB's filesystem drivers, which may not (yet?) support filesystems of that size :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.