How to install Ubuntu 12.04 on PowerPC in QEMU

Notice: Ubuntu 12.04 is no longer supported by Canonical.

Ubuntu 12.04 is a Debian-based operating system created by Canonical that supports the PowerPC architecture. There are also PowerPC builds around for 14.04 and 16.04. This article will contain instructions on how to install and boot Ubuntu 12.04 on QEMU's PowerPC emulation.

Instructions

  • Step 1: Install QEMU by either downloading it from your local software repository or by compiling it from source manually. Then grab an Ubuntu 12.04 PowerPC image by clicking here.
  • Step 2: Once it has been installed or compiled, create a disk image. For more details on this process, click here. The following command can be used to do this:
qemu-img create -f qcow2 ubuntuppc.img 10G

You can modify "10G" to whatever you want for more space - for example, if you want 40 gigabytes instead of just 10, replace "10G" with "40G".

  • Step 3: Start QEMU with the following command. (If you get a message stating "openbios-ppc was not found, download it here
qemu-system-ppc -m 1024 -hda ubuntuppc.img -cdrom ubuntu-12.04-desktop-powerpc.iso -boot d

If all went well you will land on the following screen:

 

As it suggests, type "install" to begin the installation.

  • Step 4: Begin installing Ubuntu. It is a text-based installation but it's pretty simple to use - use the keyboard to navigate through the various menu options. Note: It is likely going to take a large amount of time to install. This is normal - we are running pure PowerPC emulation after all.
  • Step 5: When the installation is finished downloading and installing the packages, you will receive a message that no boot loader was installed. This is normal. Hit "Continue" and finish in the installation. It will ask to reboot the system, you can do so if you want but it will just freeze after requesting the system reboot. When it does, close out of QEMU.
  • Step 6: Make sure that libguestfs-tools is installed, and then type the following commands into your terminal to generate a vmlinux and initrd image:
guestfish --ro -a ubuntuppc.img -m /dev/sda2 \
    download /vmlinux vmlinux : \
    download /initrd.img initrd.img
  • Step 7: Now boot into QEMU with the following command:
qemu-system-ppc -m 1024 -hda ubuntuppc.img -kernel vmlinux -initrd initrd.img -append "ro root=/dev/sda3"

It might take a few minutes to boot - be patient. If all goes well, you will now be at the Ubuntu (graphical!) login prompt. Enjoy your PowerPC Ubuntu installation! From here on out you can compile things, test apps, or just have fun with a non-x86 Linux environment.

Tips to enhance performance

  • You may want to use another DE - Unity is very slow since it is running on pure hardware emulation. Unless you're making/testing graphical applications, for the most part, you can just stay on the terminal. If you really want to use Unity, then you may want to go with Unity 2D instead of Unity 3D (selectable by clicking on the Ubuntu logo on the login screen and picking "Ubuntu 2D".