Debian GNU/Linux on the PlayStation 3 ===================================== Monday 11 January 2010 17:21 I still had some original fat 60GB PlayStation 3 standing around and after some end-of-the-year diskspace inventory I decided that for some serious media storage a 1TB external drive or a NAS with a couple of TB space is more future-proof than trying to keep everything on that 60GB disk (I mean, there are USB sticks that are larger than that). So I moved and removed a couple of 10's of gigabytes from the system to create some free space for Linux. What was left could be backed up on my 16GB USB stick, so I was ready to mess things up. Messing things up started with a dead live cd. Usually a live cd means you can burn the ISO to a cd, put it in the system and boot some kind of Linux from it. This is not how it works with the PlayStation 3, because it doesn't just boot from something that isn't it's own internal harddisk. The trick is that the "Install Other OS" option in the System Settings menu of the PlayStation also doesn't really do what it says. What that option does is copy a bootloader from a predetermined folder on a USB stick to a special place on it's internal harddisk. The bootloader might be some kind of very small Operating System, but it's not the motherload. With the "Other OS" installed, the PlayStation 3 can then be set to boot that "Other OS". Only after you have done that the PlayStation can boot a bootloader that can give you the option to switch to booting the real operating system that is on the cd-rom or on a USB stick. A user friendly bootloader should also give you the option to boot the original PlayStation OS, but if it doesn't do that you can always boot that by first holding the on/off "button" untill the system goes down after the second beep. Then hold that "button" on the quiet system again until it beeps for the second time while the system switches on again. The chance of actually ruining the PlayStation 3 in the process is much lower than when you're working with other dual boot attempts because the Other OS you're installing is still running under the PlayStation's hypervisor, which is some kind of virtual machine that won't even let you see the disks or partitions where Sony's own stuff is hidden. So while doing the partitioning you will only see the 10GB that's allocated to you, and not some PlayStation system stuff that would brick your system should you erase it by accident. With an otheros.bld that provided kboot I was able to boot the live cd and install debian on the 10GB partition made for it by the PlayStation system. Just don't go all expert, because a lot of the options the expert mode gives you don't work anyway. The normal install worked fine with my Bravia connected through HDMI, wired network with DHCP, Apple USB keyboard and Logitech USB mouse. And since that all was fine the next thing to do is update everything to the latest state of lenny. Jumping from some live cd from 2007 straight to today's lenny will get you into some issues. Issues that no longer boot linux. But you can always go back to the PlayStation OS and give up, or start all over again. I didn't give up and found out the main issue is that you have to have both the kernel and the system make the switch to udev at the same time, and maybe also the bootloader needs to know about udev. So maybe three parts of the system need to be in sync to keep linux bootable, and that is easy to mess up. What I ended up with was a bootloader that didn't boot any of my kernels, or a bootloader that could load a kernel that didn't fit the system that was already switched over to udev. The solution was to look at the messages on the screen and notice that after some experiments using petitboot /dev/sda pointed to my 16MB MemoryStick, and not to the 10GB partition it pointed to previously when working with the live cd and kboot. Somehow now that partition was called /dev/ps3da1. So in the kboot shell I mounted that partition to edit /etc/kboot.conf and replaced every occurance of sda with ps3da. And after that it boots again. It even boots the latest kernel from kernel.org I compiled on the PlayStation 3. The other stupid thing I encountered was getting the wireless to work. The problem is that there is nothing wrong with the wireless. You can use /sbin/iwlist to scan for networks, use /sbin/ifconfig to see the interface wlan0_rename_re is there and up, but it's unusable because it doesn't have an ipv4 address. Combined with the curiosity that the wired and the wireless interface have the same MAC address it was old fashioned debugging without an internet connection. Everything seems to work, but dhclient doesn't see the interface. The solution is to drop the buggy dhclient and install dhcpcd instead. Apparently it provides the same functionality, but in a way that can handle the funky way the wireless hardware is set up through the PlayStation 3's hypervisor. Using dhcpcd the wireless is up and running. The system isn't perfect yet, but after those big issues I'm happy to see things like bluetooth just work without any hassle and I can install Opera 10 without any problems. So now I'm running Windows 95 in qemu on it and playing Solitaire on my PlayStation 3. by Roland van Ipenburg http://www.xs4all.nl/~ipenburg/blog/posts/dull/2010/01/11/debian-gnu-linux-on-the-playstation-3/