QEMU/Guests/Ubuntu 12.04 (PowerPC): Difference between revisions

no edit summary
m (Add desktop image)
No edit summary
 
'''Notice:''' Ubuntu 12.04 is no longer supported by Canonical.
[[File:Ubuntu 12.04 Desktop.png|thumb|Ubuntu 12.04 Desktop]]
'''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.
 
'''Ubuntu 12.04''' is a Debian-based operating system created by Canonical that supports(formerly) supported the PowerPC architecture. ThereSupport are alsofor PowerPC buildswas arounddropped forofficially 14.04 andin 16.04., Thisbut articlesome willdistributions contain instructionsbased on how to install and boot Ubuntu 12.04kept onsupport QEMU's PowerPCafter emulationthen.
==Instructions==
*Step 1: [[QEMU/Installation|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 [http://old-releases.ubuntu.com/releases/12.04.1/ubuntu-12.04-desktop-powerpc.iso clicking here].
 
This article will contain instructions on how to install and boot Ubuntu 12.04 in QEMU's PowerPC emulation.
*Step 2: Once it has been installed or compiled, create a disk image. For more details on this process, [[How to create a disk image in QEMU|click here]]. The following command can be used to do this:
<pre>qemu-img create -f qcow2 ubuntuppc.img 10G</pre>
 
==Prerequisites==
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".
===QEMU===
You need [[QEMU/Installation|Install QEMU]] installed.
 
===PowerPC ISO===
*Step 3: Start QEMU with the following command. (If you get a message stating "openbios-ppc was not found, download it [https://github.com/qemu/qemu/blob/master/pc-bios/openbios-ppc?raw=true here]
You'll need an Ubuntu 12.04 PowerPC iso. You can download one from the Ubuntu repos [http://old-releases.ubuntu.com/releases/12.04.1/ubuntu-12.04-desktop-powerpc.iso 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:
<pre>qemu-img create -f qcow2 ubuntuppc.img 10G20G</pre>
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:
<pre>qemu-system-ppc -m 1024 -hda ubuntuppc.img -cdrom ubuntu-12.04-desktop-powerpc.iso -boot d</pre>
 
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., Thiswhich 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:
 
<pre>guestfish --ro -a ubuntuppc.img -m /dev/sda2 \
</pre>
 
*Step 7: Now boot into QEMU with the following command:
<pre>qemu-system-ppc -m 1024 -hda ubuntuppc.img -kernel vmlinux -initrd initrd.img -append "ro root=/dev/sda3"</pre>
 
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.
 
==Troubleshooting==
===I get an error saying openbios-ppc wasn't found!===
*StepYou 3:can Start QEMU with the following command. (If you get a message statingdownload "openbios-ppc was not found, download it [https://github.com/qemu/qemu/blob/master/pc-bios/openbios-ppc?raw=true 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
==Tips to enhance performance==
*Ditch the desktop entirely and use TTY
*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".
 
[[Category:Linux installation guides]]