How to install Ubuntu 12.04 on PowerPC in QEMU

From Computernewb Wiki
Jump to navigation Jump to search

Notice: Ubuntu 12.04 is no longer supported by Canonical.

Ubuntu 12.04 Desktop

Ubuntu 12.04 is a Debian-based operating system created by Canonical that (formerly) supported the PowerPC architecture. Support for PowerPC was dropped officially in 16.04, but some distributions based on Ubuntu kept support after then.

This article will contain instructions on how to install and boot Ubuntu 12.04 in QEMU's PowerPC emulation.

Prerequisites

QEMU

You need Install QEMU installed.

PowerPC ISO

You'll need an Ubuntu 12.04 PowerPC iso. You can download one from the Ubuntu repos here. (You may need to right click on the link and click "Save link as...")

Starting up

Installation

Open a terminal and execute something similar to the following command:

qemu-img create -f qcow2 ubuntuppc.img 20G

20G can be replaced with however big you want the hard drive to be (with G standing for Gigabytes). Since Ubuntu 12.04 is on the older side, it doesn't take up a ton of space, but if you're installing a bunch of programs, you can change it to 40G.

When that's done, start up QEMU with a command like the following:

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.

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!

When the installation is finished downloading and installing the packages, you will receive a message that no boot loader was installed, which is normal. Hit "Continue" and finish 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.

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

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 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.

Troubleshooting

I get an error saying openbios-ppc wasn't found!

You can download openbios-ppc here.

The performance is bad!

Since this runs on pure software emulation, it isn't going to be lightning fast. Nonetheless, there's some things you can do to make it faster:

  • Switch to another, more lightweight DE, such as LXDE
  • Ditch the desktop entirely and use TTY