Table of Contents

A short guide how to install Gentoo Linux on the Playstation 3

This guide is based on this article.

Prerequisites

Hardware

  • Playstation 3 with wired internet connection (tested on 60 GB version, should work on 20 GB version, too)
  • screen (tested on TV, like in the original article, works with HDMI, too)
  • USB keyboard
  • computer with internet connection for downloading the software to memory stick
  • CD writer and a blank CD
  • optional: USB memory stick (32 MB), can be replaces with a CD

software

  • otheros.self: The “other OS" installer from Sony

Open http://www.playstation.com/ps3-openplatform/terms.html and download otheros.self, if you agree with the terms and conditions.

  • livecd-ppc64-beta.iso: A live CD for the PS3

Choose a Gentoo mirror near you and look in experimental/ppc64/livecd, e.g. http://gentoo.osuosl.org/experimental/ppc64/livecd/

Installation

Note: if you have an other OS already installed, delete it first, e.g. with Gentoo by executing fdisk and deleting the partitions.

  • burn livecd-ppc64-beta.iso to the blank CD
  • partionize and format the harddisk: “Settings → System Settings → Format Utility → Hard Disk”. You’ll need at least 10 GB for “other OS"
  • on the memory stick, make a directory called PS3, and in that directory another directory called otheros. Copy otheros.self and /ps3_otheros_images/otheros.default from the CD to the otheros directory, renamed as otheros.bld:
PS3/otheros/otheros.self
PS3/otheros/otheros.bld
  • connect the keyboard and mouse to the PS3
  • insert the memory stick into the PS3
  • go to the “Settings → System Settings → Install Other OS" and follow the instructions. If there is an error, check the folder structure on the stick.
  • after installation go to “Settings → System Settings → Default System” and choose “Other OS"
  • insert the live CD into the PS3
  • restart the PS3

At the kboot prompt choose the right resolution by pressing tab. X will start. Now you can play with Linux. To install it on your hard disc, follow the rest of this guide.

Start a terminal with Applications→Accessories→Terminal. Switch to root user with

sudo su

Then partition your Linux disk with fdisk. Do this for two partions: one partition for Linux and 512 MB swap. You can choose different layouts, if you want. For the 2 partitions enter these commands. After every line press “enter”. Comments are in parantheses.

fdisk /dev/sda
n (new partition)
p (primary)
1 (first partition number)
1 (first cylinder)
512 (last cylinder)
t (change the type)
82 (Linux swap)
n (new partition)
p (primary)
2 (second partition number)
(press enter twice for the first and last cylinder to allocate the rest of the harddisk for this partition)
a (toggle bootable flag)
2 (second partition)
w (write changes to disk)

Create the filesystems and install the rest:

mkfs.ext3 -j /dev/sda2 
mkswap /dev/sda1
swapon /dev/sda1
mkdir /mnt/gentoo
mount /dev/sda2 /mnt/gentoo
cd /mnt/gentoo
wget http://gentoo.chem.wisc.edu/gentoo/experimental/ppc64/stages/stage4-ppc64-ps3_64ul.tar.bz2
### choose a Gentoo mirror near you instead of above address, or copy over from memory stick
tar -xjvf stage4-ppc64-ps3_64ul.tar.bz2
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
cp /etc/resolv.conf /mnt/gentoo/etc
chroot /mnt/gentoo/ /bin/bash
env-update
source /etc/profile
emerge --sync
### above command needs many hours
cp /usr/share/zoneinfo/GMT /etc/localtime
### use your timezone instead of GMT
e2label /dev/sda2 /
cp /etc/kboot.conf.example /etc/kboot.conf
vim /etc/kboot.conf  ###see below
vim /etc/fstab  ###see below
passwd
exit
cd /mnt
mkdir ms
mkdir sd
mkdir cf
umount gentoo/proc gentoo/dev gentoo
reboot

kboot.conf:

default=gentoo
timeout=20
gentoo='sda2:/boot/kernel initrd=sda2:/boot/initrd root=/dev/ram0 real_root=/dev/sda2 init=/linuxrc video=ps3fb:mode:1 rhgb'

fstab:

/dev/sda1        none           swap           sw                        0 0
/dev/sda2        /              ext3           noatime                   0 1
/dev/sdc1        /mnt/ms        auto           noauto                    0 0
/dev/sdd1        /mnt/sd        auto           noauto                    0 0
/dev/sde1        /mnt/cf        auto           noauto                    0 0
/dev/sr0         /mnt/cdrom     iso9660        noauto,ro                 0 0
proc             /proc          proc           defaults                  0 0
shm              /dev/shm       tmpfs          nodev,nosuid,noexec       0 0
none             /spu           spufs          defaults                  0 0

If the last reboot command doesn’t work, hold down the power key on the PS3 until it powers down. Then power on again and eject the CD before booting. After some time you can login with root and your password.

Now you can continue to install other things, like on every Gentoo system, e.g. KDE:

emerge kde

You can start it with startx.

If you have a 1080p display, you can change the mode by executing this command:

ps3videomode -v 5

See http://forums.ps2dev.org/viewtopic.php?t=7209 for a sample application and how to compile it.

If you are using Windows as your development platform, you may want to install Samba.

emerge samba
/etc/init.d/samba start
/etc/init.d/samba restart
cd /etc
cd samba
wget http://www.luaplayer.org/ps3/smb.conf -O smb.conf
smbpasswd -a root
/etc/init.d/samba restart
rc-update add samba default

This installs samba (needs some hours for compiling), downloads a configuration file and installs it as a service. From Windows you can connect a network drive. Login with your root account (for security reasons you may want to create a normal user on the PS3 and login with this account). Enter “ifconfig eth0” to see which address your Playstation 3 has and use this for connecting to it from the Windows Explorer, e.g. “\\192.168.1.123\root”.

Another useful tool for Windows is PuTTY. You can open a terminal session to your PS3 from your Windows computer, which makes it easier to develop graphical applications, because you have the terminal access, even if the display is overwritten by your application.

If you are tired of playing with Linux, you can type “boot-game-os” at the “kboot:” prompt before it starts booting Gentoo, or from a shell after booting, to boot the Playstation 3 Game OS. In the settings menu you can change it to Linux again.

 
ps3/linux/installing_gentoo.txt · Last modified: 2008/05/15 00:07
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki