PS3 Debian Install HOWTO
2009.12.04

Copyright (c)  2009 Sony Computer Entertainment Inc.
Copyright  2009 Sony Corporation

Permission is granted to copy, distribute and/or modify this document under the
terms of the GNU Free Documentation License, Version 1.2 published by the Free
Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no
Back-Cover Texts. A copy of the license is included in the section entitled "GNU
Free Documentation License".

DISCLAIMER

THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS
OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE;
THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE
IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE
OR IMPLEMENTATION OF THE CONTENTS THEREOF.

TRADEMARK NOTICE

"PLAYSTATION" and "PS3" are registered trademarks of Sony Computer Entertainment
Inc. "Cell Broadband Engine" is a trademark of
Sony Computer Entertainment Inc. Linux® is the registered trademark of Linus
Torvalds in the U.S. and other countries.
Other company, product and service names may be registered trademarks,
trademarks or service marks of others.

ABOUT THIS DOCUMENT

This note describes how to install Debian on your PS3.

You can always find the latest version of this document, and some other useful
technical documents here:

  http://www.kernel.org/pub/linux/kernel/people/geoff/cell/

Please send comments to <geoffrey.levand@am.sony.com>.

PS3 DEBIAN INSTALL HOWTO

1) Bootloader Preparation

It is recommended to update the bootloader to a recent version of petitboot.
See the 'PS3 Bootloader Install HOWTO' for more info on bootloader install.

2) HDD Format

If not already done, from the Game OS, format the PS3 hard disk for the
Other OS (i.e. assign a piece to OtherOS).

3) Debian Installer Preparation

Currently only the Debian Installer daily builds have sufficient support to boot
on the PS3.  The daily build binaries can be downloaded from here:

    http://d-i.debian.org/daily-images/powerpc/daily/powerpc64/netboot/

Several methods can be used to boot these daily binaries.

3.1) D-I USB storage boot

Copy the files vmlinux, initrd.gz, and yaboot.conf from the d-i.debian.org
server to the top level directory (/) of a USB mass storage device.

3.2) D-I CD-ROM boot

Download and burn the CD ISO image:

    http://d-i.debian.org/daily-images/powerpc/daily/powerpc64/netboot/mini.iso

3.3) D-I HTTP boot using petitboot

To use this method a recent version of the petitboot bootloader must be
installed on the PS3.  See the 'PS3 Bootloader Install HOWTO' for more info on
bootloader install.  Once petitboot is installed, the Debian installer can be
booted either by typing the needed option info into the petitboot option editor:

    image: http://d-i.debian.org/daily-images/powerpc/daily/powerpc64/netboot/vmlinux
    initrd: http://d-i.debian.org/daily-images/powerpc/daily/powerpc64/netboot/initrd.gz
    args: ro video=720p ps3fb=4M

or by adding an entry into the kboot.conf or yaboot.conf file:

    debian_http=http://d-i.debian.org/daily-images/powerpc/daily/powerpc64/netboot/vmlinux initrd=http://d-i.debian.org/daily-images/powerpc/daily/powerpc64/netboot/initrd.gz video=720p ps3fb=4M

4) Start the Debian Installer

With the system powered off insert either the prepared USB device or CD-ROM and
boot into petitboot, or just boot petitboot if using the HTTP method.  Select
an option to start the Debian install.

3) Install Debian

Install Debian onto the PS3 as you would do on any other machine.  The installer
will warn that no suitable kernel image package can be found, and that no
bootloader was installed.  Just select 'yes' or 'continue' to ignore and
continue the installation until finished and the 'Installation Complete'
message is shown.

The proper kernel image package needs to be installed manually after the Debian
install has finished.  The bootloader has already been installed, but a
bootloader config file will need to be created manually.

4) Install Linux Kernel and Create kboot.conf

While the Debian Installer's 'Installation Complete' message is still shown,
open TTY2 using ctrl-alt-F2.  Install the Debian kernel image with commands
similar to these:

  # chroot /target
  # apt-get install linux-image-powerpc-64

When asked about aborting installation of initrd, select 'no' to install the
initrd.

While still in the chroot, create an initial kboot.conf with commands similar to
these:

  # ls -r /boot/{vmlinux*,initrd*} > /etc/kboot.conf

Next, edit /etc/kboot.conf to have an entry similar to the following:

  debian=/boot/vmlinux-2.6.30-2-powerpc64 initrd=/boot/initrd.img-2.6.30-2-powerpc64 root=/dev/ps3da1

Note that the actual file name of the kernel and initrd image will vary
depending on the kernel version installed.  Also, this sample assumes Debian was
installed to the first partition (ps3da1) of the internal hard drive.

Exit the chroot back to the Debian Installer and continue to finish the install
and reboot.

5) Install ps3-utils

After rebooting, install the ps3-util package:

  aptitude install ps3-utils

