Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Upgrade Mac Mini 1,1 to Mac Mini 2,1

Upgrade Mac Mini 1,1 to Mac Mini 2,1

Hardware Upgrade

Disclaimer: You are going to mess with your hardware and the lowest levels of your device. You should be somewhat savvy with the command line. I'm not responsible for any damage.

  • Make sure you have the latest version of Mac OS X Snow Leopard 10.6.8 intalled. Simply use the Software Updates tab in the System Preferences until no updates are available.
  • Upgrade CPU to an Intel Core 2 Duo. I recommend the T7200, I think it's the best bang for the bug. But a T7400 or T7600 should also work. A guide about how to upgrade the CPU can be found on iFixit.
  • Download the specially modified EFI files from Mediafile.
  • Open /System/Library/CoreServices/Firmware Updates and copy both files from the downloaded archive in this directory.
  • Relax the file permissions, so the files can be read at boot-time: chmod -R 777 "/System/Library/CoreServices/Firmware Updates/*"
  • You now have to tell the OS to upgrade the firmware. This is done with the bless command:
sudo bless -mount / -firmware /System/Library/CoreServices/Firmware\ Updates/EFIUpdaterApp.efi -payload /System/Library/CoreServices/Firmware\ Updates/LOCKED_MM11_0055_08B.fd -options "-x efi-apple-payload0-data" --verbose

The successful output will something look like this:

EFI found at IODeviceTree:/efi
Aggregate boot path is IODeviceTree:/PCI0@0/SATA@1F,2/PRT2@2/PMP@0/@0:2
GPT detected
Booter partition required at index 3
System partition found
Booter partition found
Returning booter information dictionary:
<CFBasicHash 0x102d1b3a0 [0x7fff7688afa0]>{type = mutable dict, count = 3,
entries =>
	0 : <CFString 0x102c3bfb0 [0x7fff7688afa0]>{contents = "System Partitions"} = (
    disk1s1
)
	1 : <CFString 0x102c3bf70 [0x7fff7688afa0]>{contents = "Data Partitions"} = (
    disk1s2
)
	2 : <CFString 0x102c3bf50 [0x7fff7688afa0]>{contents = "Auxiliary Partitions"} = (
    disk1s3
)
}

Substituting ESP disk1s1
Mounting at /Volumes/bless.ncNG
Executing "/sbin/mount"
Returned 0
Creating /Volumes/bless.ncNG//EFI/APPLE/FIRMWARE if needed
Deleting previous contents of /Volumes/bless.ncNG//EFI/APPLE/FIRMWARE
Opened dest at /Volumes/bless.ncNG//EFI/APPLE/FIRMWARE//EFIUpdaterApp.efi for writing
preallocation not supported on this filesystem for /Volumes/bless.ncNG//EFI/APPLE/FIRMWARE//EFIUpdaterApp.efi

/Volumes/bless.ncNG//EFI/APPLE/FIRMWARE//EFIUpdaterApp.efi created successfully
Relative path of /Volumes/bless.ncNG//EFI/APPLE/FIRMWARE//EFIUpdaterApp.efi is \EFI\APPLE\FIRMWARE\EFIUpdaterApp.efi
IOMedia disk1s1 has UUID F5CCE164-3EFF-40E8-86C8-0697C03012E3
Opened dest at /Volumes/bless.ncNG//EFI/APPLE/FIRMWARE//LOCKED_MM11_0055_08B.fd for writing
preallocation not supported on this filesystem for /Volumes/bless.ncNG//EFI/APPLE/FIRMWARE//LOCKED_MM11_0055_08B.fd

/Volumes/bless.ncNG//EFI/APPLE/FIRMWARE//LOCKED_MM11_0055_08B.fd created successfully
Relative path of /Volumes/bless.ncNG//EFI/APPLE/FIRMWARE//LOCKED_MM11_0055_08B.fd is \EFI\APPLE\FIRMWARE\LOCKED_MM11_0055_08B.fd
IOMedia disk1s1 has UUID F5CCE164-3EFF-40E8-86C8-0697C03012E3
Setting EFI NVRAM:
<CFBasicHash 0x7fe980502410 [0x7fff7688afa0]>{type = mutable dict, count = 2,
entries =>
	1 : <CFString 0x102c3bfd0 [0x7fff7688afa0]>{contents = "efi-boot-next"} = <CFString 0x102d1b5f0 [0x7fff7688afa0]>{contents = "<array><dict><key>IOMatch</key><dict><key>IOProviderClass</key><string>IOMedia</string><key>IOPropertyMatch</key><dict><key>UUID</key><string>F5CCE164-3EFF-40E8-86C8-0697C03012E3</string></dict></dict><key>BLLastBSDName</key><string>disk1s1</string></dict><dict><key>IOEFIDevicePathType</key><string>MediaFilePath</string><key>Path</key><string>\EFI\APPLE\FIRMWARE\EFIUpdaterApp.efi</string></dict><dict><key>IOEFIBootOption</key><string>-x efi-apple-payload0-data</string></dict></array>"}
	2 : <CFString 0x102d1b150 [0x7fff7688afa0]>{contents = "efi-apple-payload0"} = <CFString 0x7fe980502e10 [0x7fff7688afa0]>{contents = "<array><dict><key>IOMatch</key><dict><key>IOProviderClass</key><string>IOMedia</string><key>IOPropertyMatch</key><dict><key>UUID</key><string>F5CCE164-3EFF-40E8-86C8-0697C03012E3</string></dict></dict><key>BLLastBSDName</key><string>disk1s1</string></dict><dict><key>IOEFIDevicePathType</key><string>MediaFilePath</string><key>Path</key><string>\EFI\APPLE\FIRMWARE\LOCKED_MM11_0055_08B.fd</string></dict></array>"}
}

Executing "/sbin/umount"
Returned 0
  • Shutdown the Mac normally
  • After the Mac is shut down, press and hold power button until the light on the front starts flashing fastly. You will hear a somewhat loud sound.
  • A progress bar should start on the screen.
  • After the progress is complete, the system should reboot automatically.
  • Now comes a strange part. You should see some weird graphics glitches. This is perfectly fine. Hold the power button until the Mac is shut down.
  • To fix this, you will need to reset the PRAM. Do this by holding the CMD-ALT-P-R keys on your keyboard and turn on the Mac. Hold the keys until you hear the startup chime a second time.
  • Now your system should boot normaly.
  • Check "About this Mac". I will still say "2006 Mac Mini", but the system profiler should report "macmini2,1".

Congratulations. You now have a Mac Mini 2,1. You are now free to upgrade your RAM up to 4 GB and install Mac OS X Lion 10.7.

Ubuntu

To get 64-Bit Ubuntu running on your system is somewhat tricky, but totally doable. I recommend Ubuntu Server 18.04 LTS, but more recent versions should also work. If you want a desktop environment, use the corresponding desktop version. Although, I would not suggest Ubuntu Desktop as the Mac Mini is rather underpowered for modern Dekstops. Use Lubuntu instead.

Prepare USB sticks

  • First, you have to download the Ubunt ISO.
  • Create a bootable Ubuntu USB Stick following Ubuntu's official guide.
  • Additionally, get a second USB stick.
  • Here you have to install rEFInd, as the Apple EFI is not able to boot 64-bit OSes.
  • Download the bootable ISO and install it to the second USB drive.
  • Now download the 32-bit EFI bootloader module and place it in the /EFI/BOOT folder of your Ubuntu USB drive.

Install Ubuntu

  • After this is done, insert both USB sticks into the Mac Mini and start it while holding the alt key.
  • You will see the boot options, where you are going to choose the EFI BOOT option.
  • This will boot rEFInd.
  • Here you are choosing bootia32.efi (shows the Ubuntu logo), which will start the Ubuntu Server installation process.
  • Just follow the instructions as you choose.
  • When it comes to partitioning, choose Guided - use entire disk:
The partition tables of the following devices are changed:
   SCSI (0,0,0) (sda)

The following partitions are going to be formatted:
   partition #1 of SCSI (0,0,0) (sda) as EFIboot
   partition #2 of SCSI (0,0,0) (sda) as ext4
   partition #3 of SCSI (0,0,0) (sda) as swap
  • It is important, that you see a line that says EFIboot. If there is something different like BIOS legacy or similar, you are using the wrong installer.

Repairing Ubuntu

  • After the installtion is done, your system won't boot, which is perfectly fine.
  • Keep both USB sticks in the Mac Mini and repeat the boot process from above (hold alt key, chose EFI boot, chose bootia32.efi)
  • But this time, press c when grub is asking you what you want to do (e.g. start the Ubuntu installer).
  • This will throw you into a grub shell.
  • Now you have to find the correct drive of your Ubuntu installation.
  • Typing ls will show you all available drives and partitions.
  • Go ahead and try all partitions until you find the one with you user's home folder.
  • This will liik something like this:
grub> ls (hd2,gpt2)/home
artur/
  • Replace the (hd2,gpt2) part with the possible options from the first ls step.
  • When we have found the correct drive, you have to find the EFI partition, again with ls.
  • This is usually the first partition of your drive, so keep the hdN part, but try different numbers in the gptM part, until you find your EFI partition, which will look something like this:
grub> ls (hd2,gpt1)/boot/grub
unicode.pf2 [...] grub.cfg
  • Now, as you found your EFI partition, we need the partition's UUID and set some grub variables accordingly so that grub is able to boot your Ubuntu installation.
  • First, set the root variable to your EFI partition (I chose my values from above, yours may be different!)
grub> set root=(hd2,gpt1)
  • As the fstab was set correctly during the installation, we can find the UUID in there:
cat /etc/fstab

Remember the UUID in the line for the /boot/efi line.

  • Now, we have to tell grub where the parts are needed to boot Ubuntu. This is the Linux image, the initrd and the boot partition.
  • Luckily, grub has tab-completion, meaning you don't have to type everything:
grub> linux /boot/vmlinuz<TAB> root=UUID=<the UUID from above>
grub> initrd /boot/initrd<TAB>
  • Note, that you have type the entire UUID from above. Somewhat tedious, be careful here (tripple-check!)
  • Now, it is time to boot your system (fingers crossed):
grub> boot

Fixing the boot process

  • You may have noticed that this process is somewhat tedious. Let's fix that.
  • We need some packages from third-party PPAs:
$ sudo add-apt-repository ppa:detly/mactel-utils
  • Now, install the required packages:
$ sudo apt-get update
$ sudo apt-get install mactel-boot hfsprogs gdisk grub-efi-ia32
  • With all packages ready, we have to reformat the boot partition. The Apple EFI only understands HFS EFI partitions, not FAT. So we have to reformat our boot partition. We do this using gparted, which should be already installed on Ubuntu.
  • First, let's find where your boot partition is mounted (you should probably remove both USB sticks at this point):
  • Issue the mount command and search the line that says /boot/efi.
$ mount
[...]
/dev/sda1 on /boot/efi type vfat (rw)
[...]
  • Unmount the partition and start gparted and start the reformating:
sudo umount /dev/sda1
sudo gdisk /dev/sda
  • Let's find what partitions you have (note, your numbers may differ! Be careful, you may loose all your data!):
Command (? for help): p
[...]
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          194559   94.0 MiB    EF00
   2          194560       968574975   461.8 GiB   8300
   3       968574976       976771071   3.9 GiB     8200
  • We know, that the boot partition is the first one, as the mount command told us (/dev/sda1)
  • So, delete the first partition:
Command (? for help): d
Partition number (1-3): 1
  • Now, we create the new partition. You have to set the exact same numbers for the Start sector and End sector from above. Do not copy my numbers, but yours! Also, you have to set the correct Hex code below (AF00).
Command (? for help): n
Partition number (1-128, default 1): 1
First sector (34-976773134, default = 2048) or {+-}size{KMGTP}: 2048
Last sector (2048-194559, default = 194559) or {+-}size{KMGTP}: 194559
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): AF00
Changed type of partition to 'Apple HFS/HFS+'
  • Finally, write the changes to disk and confirm with Y:
Command (? for help): w
[...]
Do you want to proceed? (Y/N): Y
[...]
The operation has completed successfully.
  • Finally, reformat the new partition with HFS+:
sudo mkfs.hfsplus /dev/sda1 -v Ubuntu
  • Cool, almos done. Now, we are going to repair the fstab file and install grub on the new partition.
  • Start your favorite editor (vim or nano or other) and remove the /boot/efi line from the /etc/fstab file.
  • Now, we need to add the new UUID to fstab and then mount the partition:
$ sudo bash -c 'echo $(blkid -o export -s UUID /dev/sda1 | tail -1) /boot/efi auto defaults 0 0 >> /etc/fstab'
$ sudo mount /boot/efi
  • Finally, we are going to install grub. Again, Apple is somewhat picky how the boot partition has to look like. We are going to recreate Apples requirements. First, we add some files and folders:
$ sudo mkdir -p "/boot/efi/EFI/$(lsb_release -ds)/"
$ sudo bash -c 'echo "This file is required for booting" > "/boot/efi/EFI/$(lsb_release -ds)/mach_kernel"'
$ sudo bash -c 'echo "This file is required for booting" > /boot/efi/mach_kernel'
  • After these preparations, let's install grub:
$ sudo grub-install --target i386-efi --boot-directory=/boot --efi-directory=/boot/efi --bootloader-id="$(lsb_release -ds)"
$ sudo update-grub
  • The final step is to "bless" the boot partition, because Apple:
$ sudo hfs-bless "/boot/efi/EFI/$(lsb_release -ds)/System/Library/CoreServices/boot.efi"
  • Alright. You are done. You now should be able to safely reboot you system.
  • One final remark: You have to repeat all steps in the section Fixing the boot process after every update that alters your initrd, e.g. when you update your Linux kernel. I would recomment these steps after every apt upgrade or apt dist-upgrade to be on the save side.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment