[GTALUG] MBR and GTP Drives

D. Hugh Redelmeier hugh at mimosa.com
Sun Oct 8 12:47:41 EDT 2017


| From: Howard Gibson via talk <talk at gtalug.org>

It is "GUID Partition Table" -- GPT, not GTP.  Nit picky, I know, but it 
might affect your success googling.

| Motherboard:  Gigabyte GA-990FXA-UD3 Version~1.1. (Version 3.0 supports GTP)

The right way of thinking aout it is: does the motherboard have UEFI
firmware.  GPT is a consequence.

There are two ways of booting a PC.

- old-style Master Boot Record: the BIOS loads the first sector of the
  drive and then jumps to it, in 8086 mode.  Everything that happens
  from there depends on the contents of the disk, not the firmware.
  (Except that the BIOS supports 8086-mode calls into the BIOS
  routines.)

- new-style UEFI booting.  The firmware *does* understand the
  partitioning and certain filesystems, enabling it to load and run
  64-bit programs, and those programs can use the UEFI-defined
  routines provided by the firmware.  Those programs reside in an EFI
  System Partition

Most motherboards sold as components (as opposed to coming within a
computer) support both these days.

So: I conclude that your MB, being Version 1.1, does NOT have UEFI.
Perhaps Versions and Revisions are different things and I've got it
wrong.

I would have thought that a firmware update could have fixed this, but
apparently not.

| New drive:    Western Digital 2000GB SATA WD2003FZEX-0.
| Newer drive:  Seagate ``Desktop HDD'' 2TB SATA. ST2000DM001-1ER1

(You had problems with the WD drive but not the Seagate.)

If I remember correctly, MBR tops out at 2T.  So GPT is a good choice,
but not required.

Then there is the issue of sector size.  As drives got to this size,
they started making sectors larger than 512 bytes.  Or rather they
made these sector sizes visible to some extent.  There were a lot of
games with how much they were willing to fake 512 byte sectors for the
sake of old BIOSes and old OSes.

The ST2000DM001-1ER1 has 4K sectors but that it will emulate 512-byte
sectors.
<http://www.seagate.com/staticfiles/support/docs/manual/desktop/Barracuda%207200.14/100686584.pdf>

It is not as clear what the WD drive does about sector size.
<http://products.wdc.com/library/SpecSheet/ENG/2879-771434.pdf>
<https://superuser.com/questions/1021574/difference-between-wd2003fzex-and-wd2003fyps-wd-desktop-hdds>
That says "Advanced Format (AF): Yes".
"Advanced Format" is Western Digital's term for 4K sectors.

I don't know how to get the WD to emulate 512-byte sectors so that a
BIOS could boot from it.  I would expect it to be able to work
somehow.

If you are booting from an MBR-based system, I'm pretty sure you need
that 512-byte emulation.

The transition to 4k sectors was a mess.  The disk manufacturers tried
to paper it over and just created more complexity.  And they explained
little, leaving us to learn from experimentation just what was going
on.  I've forgotten much of what I did learn.

|    I am now completing my most difficult Linux install ever.  My old 
| hard drive with / and /home and /usr/local on it has died.  My new 2TB 
| drive was formatted for GTP.  The Fedora installer warned me that GTP 
| drives requre a /boot/efi partition.

I don't think that that is the case.

If you are booting using UEFI, you surely need a /boot/efi (an EFI
System Partition).  But your motherboard is incapable of booting with
UEFI.

Fedora, as far as I can tell, will only install correctly a system to
boot in the same mode as the installation disk was booted.  In other
words, if you booted the installation disk in UEFI, it will only
install a UEFI-based system.  If your booted using MBR, it will only
install an MBR-based system.

But there are some fine points.

There is a good chance that it is possible to fool the installer into
doing things that are stupid.  For example, I've managed to get the
installer to create a second EFI System Partition on a drive,
something that is technically legal but probably a big mistake
(Windows does not support this and most firmware handles it badly).

Fedora (and likely other distros) create GPT disks with just
enough vestigial MBR bits so that they can be booted with any MBR BIOS.
This is very useful since disks bigger that 2T could not otherwise be
useful as boot disks on such systems.  Note: these systems will not
use an EFI System Partition and should not have one.

Perhaps the Fedora installer knows that an MBR system cannot handle
booting from 4k-sectors-only disks and flipped into a UEFI install.
That would be a bug, so it is unlikely.  But there are so many cases
that a bug isn't impossible.

Hint: don't accept the factory partitioning.  Let the Fedora installer
do the partitioning from scratch.  GPT is quite reasonable and might
well be higher-performance.

Linux partitions seem to be aligned on 1MiB boundaries.  This may be
slightly wasteful but it assures that any alignment requirement will
be met.  It will leave some gaps that can be filled with
second-or-later stage boot loaders (I'm being vague here so as not to
be wrong).

|  Regardless of how I partitioned, 
| the system would not boot.  I converted the drive to MBR format.  The 
| best I could get was to see the available kernels.  It would not boot.  

Do you know whether the sectors looked to be 512 bytes to the BIOS?
To the Fedora installer?

| I got fed up and I bought another new drive, and everything installed 
| and booted effortlessly.
| 
| Motherboard:  Gigabyte GA-990FXA-UD3 Version~1.1. (Version 3.0 supports GTP)
| New drive:    Western Digital 2000GB SATA WD2003FZEX-0.
| Newer drive:  Seagate ``Desktop HDD'' 2TB SATA. ST2000DM001-1ER1
| 
|    From fdisk, I could see that the Western Digital drive was GTP.  The 
| new Seagate drive identified itself as "dos", which means it is MBR.  
| Best Buy offered me a newer Seagate at a slightly lower price but one is 
| claimed explicity to support Linux, and it supports some older 
| protocols.  When I told the people at the store I wanted MBR, not GTP, 
| they just stared at me.

Don't accept the partitioning done by the factory.  It's just one more
unknown in the mix.

Personally, I'd choose GPT these days.

|    The Western Digital drive works.  It just does not work as a boot 
| drive.  I now have an /archive file system.

Sounds like a sector size problem.

|    I put my install instructions up on my website in the hopes that I am 
| helping newbies.  I am trying to make sense of all this.  Right now, I 
| figure if you have an old computer with an old hard drive that works, 
| you should be able to install Linux.  If you have a new (GTP) system 
| that works, you should be able to intall Linux on it.  If you have an 
| old clunker and the hard drive dies, look out!
| 
|    Is this a Seagate versus Western Digital issue, or is my WD drive 
| flakey?  Can anybody make sense of all this?  I would like to write this 
| up as a useful document.

Writing this up accurately requires a lot of testing of a diverse
collection of systems.

Since your current setup works, I imagine you have no desire to go
back and start again.

Luckily this set of problems will go away as the old hardware retires.
But new problems will replace them!


More information about the talk mailing list