Linux Index‎ > ‎



Link Info

Gentoo Install CD (minimal) Burn on CD at slow speed.

Gentoo Stage 4 tarball

 (optional) Download it in advance if your net speed is slow. You can download it during

installation too. For remote installations, download this in advance and keep it handy on a memory


otheros.bld for Gentoo otheros.default extracted from the Minimal ISO. Use this with the otheros installer.

Prepare your PS3 for otheros using the instructions here

Now turn on your PS3 with the Gentoo Install CD in the drive.

Press Enter to boot the Gentoo kernel - It will boot and configure networking and other settings

automatically. Make sure you have a DHCP server on your network (Router or another PC which is

sharing the internet connection)

Installation starts now, with the livecd ~ # prompt

Partitioning Disks

(Assuming you gave your Linux partition 10GB. If you gave the linux partition 50GB, change

the "+10000M" to "+40000M")

livecd / # fdisk /dev/sda

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


Command (m for help): n

Command action

e extended

p primary partition (1-4)


Partition number (1-4): 1

First cylinder (1-10239, default 1): Press Enter

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-10239, default 10239): +10000M

Command (m for help): n

Command action

e extended

p primary partition (1-4)


Partition number (1-4): 2

First cylinder (8585-10239, default 8585): Press Enter

Using default value 8585

Last cylinder or +size or +sizeM or +sizeK (8585-10239, default 10239): Press Enter

Using default value 10239

Command (m for help): t

Partition number (1-4): 2

Hex code (type L to list codes): 82

Changed system type of partition 2 to 82 (Linux swap / Solaris)

Command (m for help): p

Disk /dev/sda: 10.7 GB, 10737414144 bytes

64 heads, 32 sectors/track, 10239 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System

/dev/sda1 1 8584 8790000 83 Linux

/dev/sda2 8585 10239 1694720 82 Linux swap / Solaris

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

livecd / # /sbin/reboot

This will reboot your PS3. What it will do is force the installer to re-read the partition table. After it

reboots, you will be back at the kboot prompt and you can continue your installation from the next step.

Formatting root file system and swap + Enabling swap

and mounting root

livecd / # mkfs.ext3 -j /dev/sda1

mke2fs 1.3x (29-May-2006)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

1098880 inodes, 2197500 blocks

109875 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=2252341248

68 block groups

32768 blocks per group, 32768 fragments per group

16160 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 25 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

livecd ~ # mkswap /dev/sda2

Setting up swapspace version 1, size = 1735389 kB

no label, UUID=56270620-3485-4396-b65b-269517a5451c

livecd / # swapon /dev/sda2

livecd / # mount /dev/sda1 /mnt/gentoo/

Installing base system, mounting procfs and /dev + Readying

for chroot

livecd / # cd /mnt/gentoo

livecd gentoo / # wget


(If already downloaded in advance, copy the file to /mnt/gentoo now)

livecd gentoo / # tar -xjpf stage4-970-ps3_32ul.tar.bz2

livecd gentoo / # mount -t proc none /mnt/gentoo/proc

livecd gentoo / # mount -o bind /dev /mnt/gentoo/dev

livecd gentoo / # cp /etc/resolv.conf /mnt/gentoo/etc

Chrooting into the base system

livecd gentoo / # chroot /mnt/gentoo/ /bin/bash

livecd / # export PS1="(chroot) $PS1"

(chroot) livecd / # env-update && source /etc/profile

--- 'profiles/arch.list' is empty or not available. Empty portage tree?

>>> Regenerating /etc/

(chroot) livecd / # emerge --sync (Skip this step if your PS3 is not connected

to the internet.)

This will take some time. Go and make yourself a cup of coffee :)

livecd / # export PS1="(chroot) $PS1"

Final configuration steps

Setting timezone:

(chroot) livecd / ls /usr/share/zoneinfo

(Suppose you want to use GMT)

(chroot) livecd / cp /usr/share/zoneinfo/GMT /etc/localtime

Configuring kboot:

(chroot) livecd / # e2label /dev/sda1 /

(chroot) livecd / # cd /etc

(chroot) livecd etc / # cp kboot.conf.example kboot.conf

(chroot) livecd etc / # nano -w kboot.conf


# The following is an example kboot configuration file. Edit it

# to suit your needs before attempting to reboot your system or

# you may be unable to boot the new install.

# default: the default kernel label to boot should the user not make

# a selection. Uncomment the following line and set a default kernel label.


# timeout: number of seconds to wait for user input before the default

# kernel label is booted. Uncomment the following line and set timeout.


# The format from this point on is within a kernel label. At a minimum,

# you must pass the kernel and root device. The syntax is as follows:


# label='device:<path_to_kernel> initrd=device:<path_to_initrd> kernel_options'


# You should also pass the video options as well. An example of video

# options are as follows:


# 480i = ps3fb:mode:1

# 576i = ps3fb:mode:6

# 720p = ps3fb:mode:3

# 1080i = ps3fb:mode:4

# 1080p = ps3fb:mode:5


# You can review all possible video modes using the ps3videomode application

# provided by the ps3pfutils package. i.e. ps3videomode -v will display

# possibilities.

# The following is an example kernel label. Uncomment and edit as needed.


initrd=sda1:/boot/initramfs-genkernel-ppc-2.6.16-ps3 root=/dev/ram0

real_root=/dev/sda1 init=/linuxrc video=ps3fb:mode:8 rhgb'

(replace video=ps3fb:mode:<required mode id>

Now press Ctrl + X. Then Y to save and exit editor.

Creating mount points for Memory Stick and SD Card (60GB version only):

(chroot) livecd etc / # cd ~

(chroot) livecd / # mkdir /mnt/memstick

(chroot) livecd / # mkdir /mnt/sd


(chroot) / # nano -w /etc/fstab

# .......

# The root filesystem should have a pass number of either 0 or 1.

# All other filesystems should have a pass number of 0 or greater than 1.


# See the manpage fstab(5) for more information.


# <fs> <mountpoint> <type> <opts> <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/sda1 / ext3 noatime 0 1

/dev/sda2 none swap sw 0 0

/dev/sr0 /mnt/cdrom iso9660 noauto,ro 0 0

/dev/sdc1 /mnt/memstick auto noauto 0 0

(60GB version only!)

/dev/sdd1 /mnt/sd auto noauto 0 0

(60GB version only!)

#/dev/fd0 /mnt/floppy auto noauto 0 0

# NOTE: The next line is critical for boot!

proc /proc proc defaults 0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

# use almost no memory if not populated with files)

shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

none /spu spufs default 0 0

Again, Ctrl + X, then Y to save and exit.

Setting root password:

(chroot) livecd / # passwd


(chroot) livecd / # nano -w /etc/rc.conf

# /etc/rc.conf: Global startup script configuration settings

# .....

# XSESSION is a new variable to control what window manager to start

# default with X if run with xdm, startx or xinit. The default behavior

# is to look in /etc/X11/Sessions/ and run the script in matching the

# value that XSESSION is set to. The support scripts are smart enough to

# look in all bin directories if it cant find a match in /etc/X11/Sessions/,

# so setting it to "enlightenment" can also work. This is basically used

# as a way for the system admin to configure a default system wide WM,

# allthough it will work if the user export XSESSION in his .bash_profile, etc.


# NOTE: 1) this behaviour is overridden when a ~/.xinitrc exists, and startx

# is called.

# 2) even if ~/.xsession exists, if XSESSION can be resolved, it will

# be executed rather than ~/.xsession, else KDM breaks ...


# Defaults depending on what you install currently include:


# Gnome - will start gnome-session

# kde-<version> - will start startkde (look in /etc/X11/Sessions/)

# Xsession - will start a terminal and a few other nice apps


Adding xdm to default run-level:

(chroot) livecd / # rc-update add xdm default

Unmount filesystems and rebooting PS3!

(chroot) livecd / # exit

livecd / # cd /mnt

livecd mnt / # umount gentoo/proc/ gentoo/dev/ gentoo/

livecd mnt / # umount /mnt/usb/ (optional)

livecd mnt / # reboot

Remove the Gentoo CD from the PS3 when it is restarting. On the next boot, it will automatically boot

into the installed Gentoo.

Where to go from here


OK, so you've just finished on your PS3 and you're wondering what you can do with it. Firstly, here are a

few things you should do to make your Gentoo experience worthwhile.

What you should do after installation:

Change the root password!

# passwd

Install applications, or enjoy Gentoo.

Edit /etc/make.conf to add GRP package repository

# nano -w /etc/make.conf

Edit the make.conf file and add the last line. Do not touch the rest of the sections above!

# These settings were set by the catalyst build script that automatically

# built this stage.

# Please consult /etc/make.conf.example for a more detailed example.

CFLAGS="-O2 -pipe -mtune=970 -mcpu=970 -mabi=altivec"

CXXFLAGS="-O2 -pipe -mtune=970 -mcpu=970 -mabi=altivec"

# This should not be changed unless you know exactly what you are doing. You

# should probably be using a different stage, instead.




Press Ctrl + X, then Y.

Updating Portage

Since there are a few bugs in the current version of Portage, it is recommended that you use at least

portage-2.1.2-rc4-8 if you want to download pre-compiled binaries of applications (GRP Packages).

echo "sys-apps/portage ~ppc" >> /etc/portage/package.keywords

emerge -u portage

You can now emerge GRP packages using the -G / -g switch while installing them.

Note that if you did not use emerge --sync in the fist part of the tutorial, you should do it now.

Changing Desktop Environment/Window manager

The main difference between a Desktop Environment (DE) and a Window Manager (WM) is that while

DEs are a totally integrated environment with integrated applications, WMs are just a basic shell

which provide a dock to switch between different applications and an optional launcher to launch

already-installed applications.

This is something which varies from person to person. While some prefer minimal WMs, others would

rather have a full blown DE. It's just a matter of taste, and thankfully, with Gentoo, you can easily switch

to whatever you prefer. Here's a small list of the popular DEs/WMs: Desktop Environments:

KDE - K Desktop Environment

GNOME - GNU Object Model Environment

Window Managers:

Fluxbox (Installed by default)



While it would be possible to write how-tos for each of those and maybe more, I'm constrained by time

right now, so you'll have to install them on your own if you wish.

Installing applications

The magic word to install any application in Gentoo is emerge. Gentoo's package manager, known as

Portage, stores information for over 25,000 applications. At any point of time, if you want to install

an application, all you have to do is:

emerge <name of application>

So for example, if you want to install mplayer, all you have to type is

emerge mplayer

While this will install mplayer and all of its dependencies automatically, there are a few things which

you should do before actually installing it.

emerge -p <app>

What this will do is pretend to install the application. What it means is that it will show you the list

of dependencies it will install when you install that specific application. Go ahead, try emerge -p mplayer.

It will show you a list of dependencies for mplayer. Similarly, emerge -p openoffice will show you the list

of dependencies which it will install before installing OpenOffice itself.

emerge -v <app>

Verbose output.

emerge -G/g <app>

One of the most useful switches for emerging applications on the PS3 is -G. What it does is look for

pre-compiled binaries of applications in the BINHOST which we specified in the /etc/make.conf file.

Since these binaries are compiled by others running Gentoo on the PS3, you can be sure that they will run

on the PS3. Last check of the BINHOST shows hundreds of pre-compiled applications.

emerge -pvG mplayer


emerge -pvg mplayer

This will a) pretend to install mplayer, b) show verbose output, c) check in the BINHOST if an mplayer

binary is available. Since it is available, just remove the -p switch to install the mplayer binary.

Unfortunately, not all applications have pre-compiled binaries. For those, you will have to do the

regular emerge -v <app> to install it.

For more emerge switches, just do man emerge in the command line, or here.

Changing the WM/DE

Alright, so now you guys know how to install applications. What if you want to install KDE, since you

prefer it above the minimalistic fluxbox. The process is just a couple of steps, and after a restart, you will

be looking at your new KDE desktop.

emerge -pvG kdebase

Since it is available as a binary,

emerge -vG kdebase

This will install the base of KDE 3.5. In Gentoo, KDE has been divided into small meta packages which

allow you to keep KDE lean and mean without installing all the useless bloat. You can check for more

info here.

Now that kdebase is installed, we must change the /etc/rc.conf file to make it start KDE instead of fluxbox.


# nano -w /etc/rc.conf

At the end of the file, you will see the variable:


Just change it to:


Then save and exit nano by pressing Ctrl + X -> Y. The next time you start your PS3 or restart xdm, you

will boot into KDE. Same goes for GNOME, or any other WM you would like to try. If you get confused

by what you're supposed to replace in the XSESSION variable, just check the contents of /etc/X11/Sessions

# ls /etc/X11/Sessions

Xsession fluxbox kde-3.5

Here, you can see that I can either put kde-3.5 or fluxbox as the XSESSION variable. Depending on

what WM/DE you install, you will see more sessions.

Until next time, have fun with Gentoo! :)