Linux – Trying to understand linux support for 4TB hard disk drive on legacy BIOS

biosgptlinuxpartitioninguefi

I want to add a 4TB hard disk drive for data storage only. My current configuration:

Questions:

  1. Because the size is greater than 2TB am I really forced to use GPT partition?
  2. If yes, GPT partition required UEFI or legacy BIOS is supported?
  3. if legacy bios is supported, Arch Linux will see 4TB or 2TB only?

This new hard disk drive is for data only and I will not install OS on it or boot from it.

Best Answer

I'm the author of the GPT fdisk partitioning software, so I know this subject pretty well. Previous answers have promoted some misconceptions that I'd like to address....

If you want a partition size greater than 2TB, you must use GPT instead of MBR.

Probably. The catch is that that MBR maxes out at 2^32 sectors. This translates to 2 TiB (not 2 TB; see here for an explanation of the difference) if the logical sector size is 512 bytes. Many external disks and a few internal disks now use 4 KiB (4096-byte) logical sectors, though, which raises the MBR limit to 16 TiB.

Note that this is referring to the logical sector size. Most modern hard disks use 4096-byte physical sectors, but this detail is unimportant for determining the limits of the partition table.

MBR only supports 2TB partition sizes. If you wanted multiple partitions (less than 2TB each), you should be able to access all of your disk as different partitions.

Up to a 4 TiB limit (assuming 512-byte sectors) and if you're willing to play with fire, yes. MBR stores partition data as a start point and a size, so you can stretch the MBR limits out to 4 TiB, but not further. The trouble is that this is unreliable. I ran some tests on this several years ago (see here), and the upshot was that the OSes that could handle this stretching of the MBR limits were pretty much the same ones that could handle GPT, so there's not much benefit to it. More importantly, there's a chance that some random disk utility would flake out because it uses a 32-bit value for a sector pointer, even if the OS itself can manage it. Thus, I personally would not trust a disk with this configuration -- it might work fine for a while, but if you happen to run a 32-bit-unclean disk utility, it could cause serious data corruption.

BIOS doesn't know about GPT so it can't boot off of disks formatted GPT.

This statement is incorrect, or at best, it applies to only some OSes and BIOSes. The BIOS boot process involves the BIOS reading the first sector of the disk (aka the MBR) and executing the code there. Importantly, a traditional BIOS knows nothing about the partition table. It's the boot loader code in the MBR that (often) begins interpreting the partition table. Thus, restrictions preventing BIOS-mode booting from GPT are embedded in boot loaders and OSes, not in the BIOS. Most GPT-aware OSes (for instance, Linux, FreeBSD, and even OS X using a Hackintosh boot loader) can boot fine from GPT disks on BIOS-only computers. The major exception to this rule is Windows, which (AFAIK) cannot be booted from GPT disks in BIOS mode.

There is one major caveat to this: Some BIOSes are too smart. Some are in fact EFIs, which do understand partition tables. Such firmware may throw up obstacles that complicate or prevent booting in BIOS mode from GPT disks. I've studied this issue pretty carefully and have comments on it here. Such problems can usually be overcome, although the solutions are often non-obvious.

Despite these caveats, the vast majority of PCs with BIOS-mode boot capability (either "real" BIOSes or EFIs with CSMs) can boot in BIOS mode from GPT disks, provided the OS has a suitable boot loader. As BufferUnderRun says the OS in question is Arch Linux, there should be no problem; GRUB 2, SYSLINUX, and even old LILO can do the job. I've done it myself on several computers.

All that said, since the new disk is a non-boot disk, you needn't really be concerned with these issues. You can boot Linux in BIOS mode from an MBR-partitioned SSD and use the GPT-partitioned 4 TiB hard disk for data storage without problems. If your needs change in the future, you might need to re-evaluate the configuration, but I wouldn't worry about it now.