I introduced an experimental project to replace a fleet of PC laptops with MacBooks in Do MacBooks Make Business Sense as PC Laptops? It turns out that MacBooks do make pretty decent Windows laptops at a good price. The fatal flaw I ran into wasn't a limitation in the MacBook however; it related to the partition map used in Intel's new EFI firmware.
 
The following information applies to all of Apple's Intel based Macs, and is important in understanding the issues involved with using BootCamp, or in moving drives between PCs and Intel Macs. It also helps to explain why Apple beat all the other PC makers in widely releasing EFI based computers.
 
What is a Partition Table?
Partitions allow a single hard drive to appear as more than one logical drive. A partition table is the most basic setup information written to a new hard drive; it maps out a directory of partitions for the drive, even if the drive only appears to have one partition.  A single drive can be partitioned for a number of different reasons.
 
For example, since each drive partition gets its own format, if one partition is corrupted, the others will likely be unaffected. Most UNIX systems, such as Linux or Solaris, use multiple partitions for this reason: root, boot, home, tmp, usr, var, opt and swap all usually live on separate disk partitions.
 
That's why Linux users expect something similar on Mac OS X. However, Apple chose a much simpler system layout that only uses one partition. Trying to set up different partitions for swap space, System, Library, Users, and Applications is actually problematic in Mac OS X.
 
Mac users do commonly set up partitions for other reasons, such as keeping large media files on their own partition to isolate file fragmentation and maximize performance.
 
Apple’s BootCamp creates two partitions, one with the existing Mac HFS+ format, and the second used to boot Windows. After starting the Windows install from BootCamp, Windows XP creates a FAT or NTFS format on the secondary partition.
 
Different hardware systems use different partition maps. Here's a look at how the PC's Master Boot Record, Mac's Apple Partition Map, and the new Intel Macs’ EFI GUID Partition Table work, and how they differ.
 
Master Boot Record
In the PC world, the BIOS startup firmware only knows how to launch the master boot record, an archaic and limited partition map dating from the original IBM PC. The MBR is a small bit of code with a list of four possible active partitions. All the MBR really does is act like a directory for those partitions.
 
Here's how a PC starts up:
 
  1. BIOS kickstarts the basic hardware and finds a configured startup disk;
  2. BIOS starts executing code written to that drive's MBR;
  3. that MBR scans the four primary partitions it knows about for an active flag;
  4. MBR starts executing that partitions' Volume Boot Record, which then boots the OS on its partition.
 
This system lacks in both flexibility and security. The firmware (BIOS) knows nothing about the partitions on drives, or if they contain a bootable OS; it just blindly hands over control to the MBR, which similarly hands control to the VBRs it knows about. That enables boot sector viruses, and also makes it impossible for PC makers to offer the simple Startup Disk function that Macs have used for decades. PC BIOS is just too simple to know what’s really going on.
 
Microsoft built a secondary system of partitions on top of the creeky old MBR using Extended MBR, which is just a secondary partition map that can point to additional logical volumes called extended partitions. BIOS can only boot one of the four primary partitions in the MBR however; extended partitions are not bootable, nor can DOS utilities access them.
 
Apple Partition Map
Apple had no need to emulate the startup sequence of the IBM PC, so they created a more sophisticated and functional system to boot up the Mac. The APM is not limited to four records, so there's no concept of primary and extended partitions. Macs can boot from any partition, and have no problems booting from external devices, such as firewire hard drives, without any extra configuration or setup hassle.
 
The Mac OS allows users to select a boot disk, and then saves that preference to PR-RAM, which the firmware then consults on the next startup. The user can interrupt the set startup disk by holding down a key during boot:
 
  1. T    starts up the machine in Firewire Target Mode, where the Mac's drives can be accessed like an external Firewire drive. PCs can't do this.
  2. C    boots the machine from the internal optical drive. On a PC, you have to reconfigure the BIOS to boot from the CD, and then hit a key on startup.
  3. Option    scans the computer for bootable devices with an operating system, and presents a startup disk chooser. PCs can't do this either.
  4. PR+Option+Apple    clears the PR-RAM to reset booting from the first drive found. PCs have nothing to clear.
 
Apple's combination of ATM, Open Firmware, and PR-RAM have offered a lot of innovative features that PCs have been conspicuously missing for years. Intel designed a new firmware architecture to replace BIOS and provide Mac-like features for PCs called EFI, but PC makers never really took any advantage of it. Why not?
 
Why EFI went nowhere
There were two catch-22s preventing EFI adoption in the PC world. First, Microsoft would need to add EFI support to Windows before PC makers could build it into their hardware, but Microsoft sees no need to do all the work to build support for a hardware feature that no PCs are yet using.
 
The second catch-22: customers didn't know to ask for the functionality EFI provides, because they don't realize what crap PCs are, and the Wintel world is giving customers crap because their consumers are not asking for anything better. The PC world is not driven by innovation, but by low prices.
 
EFI was built into the design of the Itanium 64-bit server platform, and so Microsoft's 64-bit version of Windows obviously has to support EFI. That version of Windows is very different than the legacy 32-bit Windows that PC users run however.
 
The standard 32-bit Windows XP has to provide support for games and vast array of legacy software titles, funky peripheral hardware, and otherwise maintain compatibility with the millions of PCs out there, which the 64-bit Windows doesn’t attempt to support.  
 
That means Microsoft and the PC builders have lots of work to do to move their common PC platform to EFI. Gateway introduced a PC with EFI years ago, but without an EFI version of Windows, it didn't matter. It ran in legacy BIOS mode anyway, so it didn’t benefit from the promised features of EFI.
 
Apple Pioneers EFI Adoption
Of course, Apple shares none of those WinTel legacy problems. Just as Apple pioneered USB a decade ago, they have decisively moved to EFI on their new Intel Macs.
 
EFI is a lot like Open Firmware, and EFI's GUID Partition Table isn't too much of a leap from APM either. While a significant amount of work was needed to make Macs work seamlessly under EFI, it wasn't a huge conceptual leap, just a difference in details and semantics. To end users, it all just works.
 
Considered alone, there is no problem with PowerPC and Intel Macs using different styles of partition maps. The real tricky bits happen when you try to mix and match drives from PCs and the two Mac platforms, and use them in combination or in overlapping ways. I'll consider these issues in my next article on cross platform disk imaging and dual booting. Stay tuned!
 
I really like to hear from readers. What do you think? Leave a comment or email me with your ideas.
 
 
| | Comment Preview

Send | Subscribe | Del.icio.us | Digg | Furl | Reddit | Technorati

Read more about:
Click one of the links above to display related articles on this page.
 
 
Imaging MacBooks: Understanding MBR, APM, & GPT
Saturday, July 8, 2006

Apple iTunes

Apple iTunes

Apple iTunes

 
Apple iTunes

Urban | Moto | Tech | Journal | Podcast