OK. So I broke my Ubuntu installation on my PS3, again. Happens all too regularly, I’m afraid. And, I’m not smart enough to fix it once it is borked. So, here’s how I start from scratch to get a Ubuntu 10.04 installation working on my PS3, from nothing.
So, starting from the firmware 3.15 on PS3 Phat. Anything later and sorry, Sony has stolen the OtherOS feature from you. Too bad, you loose. Sony has screwed you.
First thing, you need to visit PSUbuntu to get some hints. Many on them are dated (in terms of the Ubuntu release described), but still a fountain of knowledge.
Step 1. Installing the OtherOS Bootloader. There are a number of them mentioned, but only one that I’ve found handles the ext4 file system, required / desired by later Ubuntu installation systems. The petitboot bootloader is available in different versions, but this one is the one I use It needs to be stored in a USB dongle in a /ps3/otheros/ directory so that the PS3 system can find it to install.
Step 2. Have the Ubuntu 10.04 LTS CD available and have it inserted when you reboot to OtherOS loader from the PS3 OS. The latest version can be obtained from here. I generally use the alternate version, but i guess the desktop version works just as well.
Step 3. Install the Ubuntu 10.04 system, following all the relevant prompts. Blah. Blah.
Step 4. First thing is to get some more swap. There is a full instruction here
Ripping off the instructions from PSUbuntu:
sudo gedit /etc/modules
add “ps3vram” at the end of the file
save the file and get back to the terminal
sudo gedit /etc/rc.local
scroll until you see these lines of code:
exit 0
Before add the following:
mkswap /dev/ps3vram
swapon -p 1 /dev/ps3vram
Step 5. Make the monitor work properly. The instruction here is a little outdated. The introduction of upstart into Ubuntu has made the older instructions obsolete.
First thing is to install the fbset tool.
sudo apt-get install fbset
And then use it according to the instructions here to find out the right amount of cropping necessary to make the screen fit. Once you have the right size (dependent on your monitor) then create a file like this in /etc/init/
# fbset – set system frame buffer
#
# This task is run on startup to set the system frame buffer for Pioneer 720p
# First you need to sudo apt-get install fbset
# then this file gets put in /etc/init/
description “set system framebuffer”
start on startup
task
exec fbset -a -xres 1216 -yres 680 -vxres 1216 -vyres 680
Once this file is created, with the fbset characteristics appropriate to the monitor you’re using, then also create a soft link in /etc/init.d/ to the standard upstart script. Look at other soft links in the same /etc/init.d/ directory to get the idea.
sudo ln -s /lib/init/upstart-job /etc/init.d/fbset
This makes sure that the fbset command gets properly executed.
Last thing is to modify the file in /etc/kboot.conf to use the overscan mode which means adding 128 to the resolution you’ve selected. For 720p I am using the following line:
linux=’/boot/vmlinux initrd=/boot/initrd.img root=/dev/ps3da2 video=ps3fb:mode:131′
This should get the screen resolution set correctly.
Step 6. Compile a new kernel, for the Cell Broadband Engine. There are some instructions on generic Ubuntu Kernels here, which are accurate and simple (even for me).
I found that I only need to ask for these packages, and everything else is brought in too.
sudo apt-get install fakeroot build-essential qt3-dev-tools libqt3-mt-dev
Don’t forget to set the concurrency to make best use of dual-core PowerPC CBE.
export CONCURRENCY_LEVEL=3
When using the xconfig tool, there are two options that should be selected compile for POWER4 and optimise for Cell Broadband Engine. Also, the kernel tick can be set to 300Hz or 1000Hz to get a bit better responsiveness.
fakeroot make-kpkg –initrd –append-to-version=”your-version-identifier” kernel-image kernel-headers modules_image
Following the instructions, there are two additional steps that need to be completed to get the kernel to work properly.
Check you have the tools to build a initrd image
sudo apt-get install initramfs-tools
Build the initrd image following command for building the initrd image
sudo update-initramfs -c –k 2.6.3x.xx.custom
Version 2.6.3x.xx.custom is the directory name which appears in /lib/modules/ after installing modules)
The initrd image will be generated /boot/ directory
I create some soft links in the /boot directory, to save me having to modify the /etc/kboot.conf file
sudo ln -s vmlinux.2.6.3x.xx.custom vmlinux.custom
sudo ln -s initrd.2.6.3x.xx.custom.img initrd.custom.img
Then, create linkages in the /etc/kboot.conf file so that you can refer to the new kernel and initrd image from the boot command line. For example.
linux.custom=’/boot/vmlinux.custom initrd=/boot/initrd.custom.img root=/dev/ps3da2 video=ps3fb:mode:131′
Ok now I’ve found that I need to rebuild the initramfs on the original and old linux versions, otherwise they won’t boot. Costs nothing except a few seconds to do this anyway.
sudo update-initramfs -c –k all
Step 7. Ok. Now go to town. Everything else works perfectly on my machine. Update it. Add multimedia. Whatever.