Hack Your PS3 with PS3HEN – All models – 4.91 or lower
25th August 2024Hack your PlayStation 3 and play ALL the games – EvilNat / BGToolset custom firmware jailbreak
29th September 2024MBR & GPT hard drives, BIOS and UEFI. What does it mean and which to choose?
I’ve been playing around with some hard drives recently creating backup drives and portable retro gaming systems. But I kept coming up against a range of drive options that I didn’t really know what they meant. So in this video I’ll show you what I’ve learnt about BIOS and UEFI motherboards and how that relates to MBR and GPR drive setups.
What Are We Talking About?
To start with lets first find out in general terms what this is all about.
Today’s computers have gotten very complex with endless options and specifications for almost every aspect and every component inside your machine. But fundamentally they are still the same as the home computers of the 80’s.
You have a microprocessor which uses memory in the form of RAM and ROM to store data and code (I know there’s a whole raft memory technologies but let’s keep it simple). The microprocessor is also connected to some peripheral input output devices to control the display, keyboard, mouse, etc. and it’s also connected to some sort of storage media to save and load data to and from for more permanent storage.
The Boot Sequence
When you first turn the computer on the microprocessor springs into action but needs some sort of code to tell it what to do. This code is usually stored on a memory chip on the motherboard. This firmware code has enough information to connect the processor to the main peripherals such as the hard drive, keyboard and screen so that it can then start to load other code to complete the boot sequence and load your operating system.
How this startup process is organised is where the options we’re discussing come into play.
BIOS
Right back in the first days of the IBM PC a Basic Input Output System software or BIOS was used to start the computer. It was usually stored on a reprogrammable ROM chip on the motherboard so that the manufacturer could update the code from time to time through BIOS updates.
The BIOS had very limited capabilities and actually ran in a special 16 bit mode on the processor which only allowed it to run text based screen output and to connect to some of the major inputs and outputs. If you pressed a special key when you first powered on the computer the BIOS would stop the boot sequence and drop you into a user interface where you could test and set up parts of the system. You could turn on or off various devices, specify which drives to boot from, etc.
If you let the BIOS continue with the boot sequence it would initialise any hard drives attached to the PC and then start scanning them in order, looking for bootloader code that it could load to give it more information on how to start the computer. This bootloader code had to be stored in the very first sector on a hard disk in what is called the Master Boot Record or MBR. So to make a disk drive readable in a BIOS based system it had to be formatted to include this MBR.
UEFI
BIOS was king up until the mid 1990’s. At that time processor manufacturers, well Intel basically, felt the old BIOS set up was too limiting for the increasingly more powerful PCs and servers. They developed the Extensible Firmware Interface or EFI to replace BIOS with a more modern alternative. This was developed by Intel over the next few years until they joined with other manufacturers to create the open source Unified EFI project so that they could standardise how the system would work. This gave us UEFI around 2006.
UEFI does the same job as BIOS but in a different way that allows it to run in a more powerful environment. It still uses a very basic firmware startup code (I guess you could even call this a BIOS) that gives it access to the hard disks. It then looks on these disks for a special .efi file stored on a special disk partition called the EFI System Partition (ESP). This ESP contains the actual code to run the UEFI boot sequence, but as it’s now being loaded from the hard drive with the processor running in either 32 or 64 bit mode it can be a much more complex piece of software with full access to USB devices, graphics, the mouse and so on. It also allowed the hardware manufacturers to build in firmware based security such as secure boot. This uses security keys to authorise boot software to run on your machine. As the system boots any code that is not officially signed and authorised can’t run. Rootkits and other malware use this technique to hack your computer, but secure boot prevents them from gaining access.
As with BIOS, UEFI requires your hard drive to be set up in a specific way to give the firmware access to the files it needs. To use all the features of the modern UEFI system you need to create a GPT or GUID Partition Table drive. The GUID part stands for the Globally Unique ID which is assigned to every partition or section of your hard drive. This Id number is so random that it’s regarded as unique for every hard drive on the planet.
GPT drives also have a range of other benefits.
On an MBR drive the boot sector can become corrupted. If this happens you have to rebuild the drive. On a GPT drive it stores multiple copies of the boot information so it can recover itself if something goes wrong, or identify malicious code if it gets injected.
GPT drives also remove many of the limitations of MBR. MBR was created when a 1GB hard drive was deemed massive, so the upper limit of 2TB didn’t seem limiting. This of course is far too little space for our current data needs. GPT effectively removes this limit, or at least sets it into the Zetabyte range. Please don’t ask me what a Zetabyte is as I suspect it’s just a made up word to impress non techie people.
So, with this and other enhancements the UEFI / GPT setup is definitely the way forward, and indeed pretty much every computer being made at the moment either enforces or has UEFI as an option.
But!
What about compatibility issues?
If you need your hard drive to work and boot on any device MBR is the best route to go. UEFI machines are generally backwards compatible with MBR drives, but not all BIOS based machines can read GPT drives, especially older consoles such as the PS3 and Xbox / Xbox 360.
If your hard drive is larger than 2TB then your hands are tied and you’ll have to use GPT so do take this into consideration as well when you choose your hardware for various projects. Going for a massive hard disk could mean it simply doesn’t work on the device you want it to.
So hopefully that has given you some insight into the various firmware and hard drive set ups that you’ll need to choose from when playing around with your projects.