Friday, August 7, 2015

Mac is NOT always easy

My laptop computer is a MacBook Pro (8,2 - early 2011 - high resolution display).
With a lot of effort I had managed to get it set up for triple boot: I goot choose to run Mac OS, Windows or Linux (Ubuntu at the time because that was the only one that had drivers for the chips in this model).

I was very happy with it for years. I would mostly use the Mac personality, but occasionally on field service visits I would need to use Windows in order to run the utility programs to talk to the radios that my company makes. Sometimes at the office I would use it to run the Windows-based programs to talk to our Panasonic telephone switch. And sometimes I would use the Linux to duplicate problems that some customers had with using the Linux version of our utility programs in Ubuntu (since most of our Linux systems at the office are Fedora Linux).

But one day I was seduced by Apple to update the operating system to their latest version, "Yosemite". It was after all a free upgrade, and some of the older versions of Apple's programs did not support all of the latest features. Unfortunately, the installation procedure for the Yosemite upgrade broke my triple-boot system, and it has taken me about 3 months to get back to a working system again.

First, I could not find the Snow Leopard install disk that came with the computer. No big problem, for $20, Apple would send me a Snow Leopard install DVD.

Only one problem: As soon as I tried to install Mac OS X from that DVD, it would stop with a simple white screen with a grey apple and issue a sequence of 3 beeps every 5 seconds. The online pages that mentioned such signals said that indicated a memory error. Except the memory test on my Linux DVD said my memory was good. So I concluded this must be a problem with the partition tables.

Partition tables are one of those "magic" things under the hood of the computer system. Most personal computers have a single hard drive, and all the space is available as one large warehouse to all the software on the machine. By dividing the drive into separate spaces called partitions, we can pretend that we have several smaller hard drives (called partitions) instead of one large one, and each of them can be organized in a different way (called formatting) which is important when you try to run different operating systems, because each OS wants its system disk formatted in it preferred style. Mac OS X uses a format called HFS, Windows needs to use NTFS and Linux prefers ext3fs although it can use others (but not NTFS or HFS). In order for the part of the system that loads the operating system to find out where on the disk to start loading from, there is a table of which partitions exist - generally called a "partition table". And now the fun begins: Different systems use different formats for the partition table. For many years, all personal computers with intel CPUs used a built-in bootloader called a BIOS, and there was a partition table defined for that. But then Intel came up with a new bootloader called EFI (Extensible Firmware Interface), and while it could use the BIOS partition table and pretend to be a BIOS so that Windows would still work, EFI had a different preferred partition table layout called GPT (General Partition Table). When Apple changed from Motorola CPUs to Intel CPUs, they decided to use EFI and GPT from the outset. It took several years before first Linux and the Intel updated their systems to be able to work with EFI and GPT, so in order to run all three on the same machine, you needed to create both a BIOS and a GPT partition table that described the same partitions. This turned out to be a very fragile setup. Any time an operating system update touched anything related to partition setup, it could render the system unable to boot. For this reason, both Apple and Microsoft (and most computer stores and "helpdesk consultants") refused to support any setup with multiple operating systems installed except for two very limited combinations of Mac OS and Windows, called "BootCamp" and "Parallels".

So I needed to get the Mac back to its factory settings. I took it down to the Apple store, and had them load Yosemite on it from the server in the store. Done in 20 minutes.

After I got it home, I successfully installed Windows on a second partition. Windows ran fine. I did notice that both Mac and Windows had slightly different variations on their setup of EFI - they had each allocated their own partition for the EFI support files. Which turned out to be a problem: After I was done with Windows, I discovered that the Mac side would no longer boot. And I could still not use the Snow leopard install disk to wipe the hard drive and get back to something that worked.

I went back to the Apple store. This time I had them install Snow Leopard.

After I got it home again, I reduced the Mac partition to a modest 100 GB and installed Fedora Linux in the unused part of the hard drive, letting Fedora figure out how to partition it. Again, Fedora ran fine, but when I went back to Mac, it would not boot.

I spent many hours trying to erase the mangled GPT so that the Snow Leopard disk would believe that the hard drive was blank, but it always refused to install.

Finally, someone suggested that I go to the independent Mac Superstore in town. Where the technician explained that not all Snow Leopard disks were created equal, and the one had bought from Apple was a few months older than my machine and was guaranteed not to work for that reason. He said he could load the operating system for me over the Internet, and then "clone" the system to a USB stick that I could then use to recover on my own as I probed my way through various setups until I found one that worked.

I am now in the middle of running Windows update after installing Windows 7 on the machine. I am anxiously waiting for 203 updates to be installed so I can try booting Mac and then Windows again.

I am hopeful!