Ubuntu 7 on a G5
Install
At the install prompt make sure to type "install-powerpc64".
Set up the system however you want.
Once the system is installed it'll automatically eject the CD tray, just leave the CD in the drive and reboot.
Post Install
Boot from the CD again. At the install prompt type "rescue-powerpc64". Let it run through the same setup options as before, no network is necessary and the default hostname is fine.
When you finally get to the "Enter Rescue Mode" screen select your root partition (usually "/dev/sda03"). Don't worry if you select the wrong one, it'll tell you and let you select again.
After you select your root partition, select "Execute a shell on /dev/sda3".
At the prompt type:
$] cp /etc/yaboot.conf /etc/yaboot.old
$] vi /etc/yaboot.conf
NOTE: vi in this mode won't redraw like you might expect, so when you add new lines it'll look like it's overwriting the line below. Don't worry. It isn't. Just do what it says here, save the file, then cat it back out to make sure everything is fine
NOTE THE SECOND: Your arrow keys will most likely not work in vi. You can navigate the file in command mode by using:
- h = Left
- j = Down
- k = Up
- l = Right (lowercase "L")
Comment out the following line with hash (#) mark.
device=/disk@0:
Then add the following above it:
device=hd:
ofboot=sd0:2
Save the file and quit. Then cat yaboot.conf to make sure it's set up correctly.
$] cat /etc/yaboot.conf
The first few lines should look similar to the following:
device=hd:
ofboot=sd0:2
#device=/disk@0:
Once you are sure the config is good, install it and exit the shell.
$] ybin
$] exit
Ok, you should be back at the rescue screen, but every time I exit the shell the computer hangs. In any case, you're done here so reboot (hold the power button if you have to).
The system should boot fine now. If it tries to boot from the CD again, make sure to select "l" (lowercase "L") at the first stage boot prompt.
At this point you should be sold, but if you're a fan, like me, if compiling Apache and PHP from the source and need MySQL support, read on.
MySQL
You'll need to compile MySQL form the source here, because there doesn't appear to be a PPC64 version of the precompiled binaries. First you'll need the ncurses library.
$] sudo apt-get install libncurses-dev
Download the MySQL Community Edition source tarball from dev.mysql.com, then unpack:
$] tar -xvzf mysql-x.x.x.tgz
$] cd mysql-x.x.x.tgz
Configure, compile and install:
$] CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static
$] make
$] make install
Now you should have the necessary client files to install the PHP MySQL/MySQLi/PDO-MySQL support.
One note on installing Apache 1.3.x
If you're installing Apache 1.3 (this isn't needed for Apache 2), you'll need to relink bash to sh in order to fix the broken echo command.
$] sudo mv /bin/sh /bin/sh_broken
$] sudo ln -s /bin/bash /bin/sh