Sponsored Links
Note: This installation is not really appropriate for Linux newbies, try YDL first.

Installing Gentoo on a PS3?

Given the hardware inside the PS3, the preferred method for installing Gentoo on a PS3 is to start with a stage4 tarball. The stage4 tarball will contain more precompiled binary packages and therefore can be setup faster.

The rest of this document describes the setup procedure. It assumes a certain level of experience with both Gentoo and Linux. If you have questions, ask and clarification can be made.

Obtain the Install media? To complete the install, you can either:

Install CD? While you can install Gentoo from the kboot prompt, it is far more convenient to do so using a minimal Install CD. The install CD is available from the Gentoo mirrors under the experimental directory as an ISO image. For example: [Register or Login to view links]

Stage 4 tarball? On a PS3, you can either run a 32bit-userland or a 64bit-userland. Both run 64bit kernels. The choice of which userland to use depends on what you intend to use the PS3 for. Many people find the 32bit-userland more desktop-friendly. You can find the tarball on the Gentoo mirrors under the experimental directory. To find a mirror near you, use this URL: [Register or Login to view links].

You can download the stage4 now and store it somewhere locally or download it later during the install. The tarball contains a normal stage3 install plus several required applications which are already compiled for you, like X, vim, eject, the kernel, and even the fluxbox window manager. It also contains a kboot.conf example and a working xorg.conf file.

Optional? The following items are optional and not required. The author finds having these make the setup faster:

You may find it more convienent or perhaps faster to use a portage snapshot. Snapshots of portage can be found on your favorite Gentoo mirror under the snapshots directory. Put the stage4 and a portage snapshot on a USB memory stick in a vfat or ext3 filesystem.

Prepare your PS3 to boot another OS? Before you can install Linux on your PS3, you must prepare it to run another operating system (hereafter referred to as otheros). This is done through the PS3 operating system (hereafter referred to as game-os) and requires that you also download the Sony Installer (otheros.self) and an otheros image (otheros.bld), which is also available from Sony or Gentoo PS3-capable Install media. To complete this task, follow the instructions here: [Register or Login to view links]

Boot the Install CD? The Install CD contains a PS3 kernel and the required applications to complete a Gentoo install.

Insert the Install CD into the PS3 and power-on the PS3. The PS3 will load the kboot kernel and you will soon see a "kboot:" prompt (hereafter referred to as the kboot prompt). If you have not installed Linux on the hard disk before, you should be able to hit "tab" to scroll through the list of kernel labels until you find a label that has a resolution that most closely matches your TV or monitor.

Note: If you have installed Linux on your hard-drive before, the prior kboot.conf configuration file may interfere with the kboot configuration file on the Install CD. You can avert this by renaming or deleting the configuration file on the hard-drive, copying the kboot.conf from the Install CD to the kboot ramdisk, or by using e2label to rename the disk partition (i.e. e2label /dev/sda1 "") that contains it.

Hit 'Enter' to boot the kernel. The LiveCD will boot and automatically configure itself for the PS3 including network settings if you have a DHCP server on your network.

The rest of this procedure is very similar to a regular Gentoo install. The steps are grouped logically and little explanation will be given about them, unless it's a PS3 specific task

Prepare the hard disk for installation? You must partition your hard drive for an install. You should make at least two disk partitions: one for the root filesystem and one for swap. At the time of this writing, the PS3 can only dedicate 10GB to another os. An example of partitioning looks like:

[Register or Login to view code]

The number of cylinders for this disk is set to 10239.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK)

[Register or Login to view code]

Now you should format the root filesystem and swap, and then enable swap.

[Register or Login to view code]

Lastly, mount the root filesystem so you can begin installing the software.

[Register or Login to view code]

Install the base system? The next series of steps will install the stage4 software on to your PS3 hard drive.

[Register or Login to view code]

From here, select the stage4 of your choice and download it. It should then be in /mnt/gentoo. Now extract the tarball.

[Register or Login to view code]

You now need to mount procfs and /dev for our chroot. Also, copy resolv.conf into the chroot so name resolution will work.

[Register or Login to view code]

You can now begin the chroot portion of the install.

[Register or Login to view code]

At this point, you need to add the portage tree onto your hard drive. This can be done with a portage snapshot or over the network. The author chooses to get portage over the network with:

[Register or Login to view code]

Alternatively, you can use a snapshot of portage. This can be an advantage when dealing with GRP packages later. First obtain the snapshot from a mirror:

[Register or Login to view code]

Then unpack the snapshot and update the cache:

[Register or Login to view code]

Final configuration of your system? The following steps are the minimum number of changes you need to make to have a bootable, working Gentoo install on your PS3.

Set the timezone? You first need to select your timezone so that your system knows where it is located. Look for your timezone in /usr/share/zoneinfo, then copy it to /etc/localtime. Please avoid the /usr/share/zoneinfo/Etc/GMT* timezones as their names do not indicate the expected zones. For instance, GMT-8 is in fact GMT+8.

[Register or Login to view code]

Configure the kboot bootloader? In many cases, the otheros images depend on a label being set on the root filesystem partition. Usually it is set to "/". You can set the label using e2label. Using the disk partitioning scheme, you would set the label like:

[Register or Login to view code]

Kboot's configuration comes from the file /etc/kboot.conf. An example kboot configuration has been provided in /etc/ of the stage4 tarball. Use it as a starting point for your configuration file.

[Register or Login to view code]

Note: For systems where 64 bit user space will be installed, make sure to change the kernel and initrd to kernel-genkernel-ppc64-2.6.16-ps3 and initramfs-genkernel-ppc64-2.6.16-ps3. (Notice the added '64')

An example kboot.conf file for the stage4 and 720p resolution could look like:

[Register or Login to view code]

Given the prior disk partitioning scheme, you need to make sure /etc/fstab reflects the proper device naming. Here is an fstab entry with that assumption in mind:

[Register or Login to view code]

Set root password? You must set the root password using the 'passwd' utility.

Add a default non-root user? You should now add a default user, in this case John, and set his password.

[Register or Login to view code]

Exit the chroot, unmount filesystems, and reboot? You can now exit the chroot in order to reboot. Be sure to unmount the filesystems prior to rebooting.

[Register or Login to view code]

Eject the Install CD when the PS3 power-cycles. You now have a working install on your PS3. Remember this already has X, a working xorg.conf, and fluxbox on it so you can begin using it immediately.

Installing GRP packages?

Note: Due to a number of bugs in the current stable version of portage, you must use at least portage-2.1.2-rc4-8 to install GRP over the network. If you do not have this version of portage, you should add 'sys-apps/portage ~ppc' or 'sys-apps/portage ~ppc64' to your /etc/portage/package.keywords file and then 'emerge -u portage'. In the release of 2.1.2-r1, there will also be at least one fix in the dependency resolution of binary packages.

Our GRP packages are currently hosted on three sites:

[Register or Login to view links]

[Register or Login to view links]

[Register or Login to view links]

Edit /etc/make.conf? To begin using GRP packages, you must tell portage about the repository by adding a reference to it in your /etc/make.conf file. Depending on your location and whether you are 32 or 64-userland, you would add something like this to your make.conf:

[Register or Login to view code]

Installing packages? To install a GRP file, you simply pass the -g flag to emerge. For example, to install xfce4 you would:

[Register or Login to view code]

With GRP installs, you might differences in the dependency resolution of the -G and -g switches. Consider trying both before performing the20jonstall the see the differences.