Recently I bought this beautiful iMac G5 iSight 20 inch. I swapped the custom HDD with a 500 Gb Samsung 850 EVO SSD mounted on a NewerTech AdapaDrive. I also replaced the faulty SuperDrive (thank you ifixit.com for your excellent guides). My idea was to have MintPPC running on this machine together with OSX Leopard, the last MacOS that will run on this machine. So how do we get this accomplished?
Most people will install MintPPC on a Mac which had OSX or OS9 installed on it. In that case, the hard drive has an Apple partitioning scheme, which is visible because the hard disk has the distinct 31.5 kb Apple partition map as the first partition. Gentoo has a nice page explaining all of this. Without this partitioning scheme, Apple New World machines would not be able to boot. So, if you would like to install MintPPC on a hard disk that did not yet have Apple MacOS on it before, you will have to create a partition table on the disk with an Apple partitioning scheme. You can do this from a MacOS installation DVD. Just before installation of MacOS, the installer gives the opportunity to launch Disk Utility. With this program, it is possible to get an Apple partition map on the disk. You can leave the whole disk empty as the MintPPC installer will later on partition the whole drive like you need to.
First install MintPPC according to the Installation Instructions. It is important to leave free space of at least 10Gb for OSX when you are at the partitioning stage. In my case, as it is a G5 iMac, I followed the instructions to partition the drive into seven partitions. I will go into detail as to what they are.
The first partition is the Apple Partition Map, we don’t need to make this one. We now create 6 more partitions.
The first partition which you have to create is a 1Mb NewWorld boot block, flagged as bootable. This partition has a hfs file system and will later be used to install yaboot, a bootloader for PowerPC machines like Macs.
The second partition we will create is a 1Gb ext2 partition mounted at /boot (note that you don’t need this one on G3, G4, see installation instructions). On this partition will reside the kernels and init ram disks.
The third partition we are going to create is a 10 or 20Gb ext4 partition mounted at / (root). This partition will contain all the system files to run Linux.
The fourth partition we will create is the swap partition. This one should be the amount of installed RAM memory and 500 Mb. So in my case, I have 2 Gb RAM, the swap will be 2.5 Gb.
The fifth partition we are going to make is 10 or 20 Gb or anything you like really, as home partition, mounted at /home with an ext4 file system. This partition will be used to host all user files.
The sixth partition that is left should be at least 10 Gb and we will leave it without a file system (empty). Later on, after MintPPC is installed, we will create a hfs+ (journaled hfs) file system on this partition for OSX.
It will look like this:
# type name length base ( size ) system
/dev/sda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/sda2 Apple_Bootstrap bootstrap 1954 @ 64 (977.0k) NewWorld bootblock
/dev/sda3 Apple_UNIX_SVR2 boot 1953126 @ 2018 (953.7M) Linux native
/dev/sda4 Apple_UNIX_SVR2 root 39062501 @ 1955144 ( 18.6G) Linux native
/dev/sda5 Apple_UNIX_SVR2 swap 5859376 @ 41017645 ( 2.8G) Linux swap
/dev/sda6 Apple_UNIX_SVR2 home 39062501 @ 46877021 ( 18.6G) Linux native
/dev/sda7 Apple_HFS untitled 204800000 @ 85940224 ( 97.7G) HFS
Just follow the instructions for installing MintPPC. Now that we have MintPPC installed and booted into it, we need to install some programs:
sudo apt install gparted hfsplus hfsprogs
Now launch gparted from the menu. Be careful with gparted, it can ruin everything on the disk!
In gparted scan the disk. You will see all the partitions. In the empty partition you can now create a hfs+ file system. It will look similar to what I have (I have an extra 8th ext4 partition for mirroring Debian ports).
Now it is time to get the OSX installation DVD. Reboot into the OSX installer and install OSX in the partition you just formatted. After the installation is finished your Mac will boot into OSX and will not ‘see’ Linux anymore. The OSX installer has reconfigured open firmware to boot directly into OSX. We will have to restore yaboot and make yaboot dual boot OSX and Linux.
Boot again from your MintPPC image and go back to rescue mode (see Installation Instructions for more details). We will do the following again in a shell:
yabootconfig -b /dev/sda2 ybin -v exit
Now reboot and let the Mac boot from the hard disk. You will have the option now to boot MintPPC, do that. In MintPPC we will now adapt yaboot so it will also give the possibility to boot OSX. For that you need to edit /etc/yaboot.conf and make sure you have the following lines added:
You may also set your default operating system to macosx. We will now have to copy these settings into open firmware:
Now reboot one last time and you will see the option to boot into OSX in the yaboot menu. You will now be able to boot in MintPPC as well as OSX. Enjoy !