View Single Post

How to Install Fedora Core 8
  #1 (permalink)  
Old 01-29-2008, 06:02 PM
haxen's Avatar
haxen is offline
I shredded my PS3
PS3Hax Leader
 
Join Date: Dec 2006
Posts: 239
Default How to Install Fedora Core 8

Howto: Install Fedora 8 on a Sony PS3

This manual describes the steps to take to get Fedora 8 running on a PS3.
It will describe every basic step to perform, so that even non-Linux acquainted users, can install Linux on a PS3.

Author: Remy Bohmer



Requisites:
  • A Sony PS3 (duh) Note: This procedure is based on Firmware 2.10, 60GB European PAL Version
  • Monitor/Flat screen-TV connected through HDMI.
  • USB keyboard/Mouse connected to the PS3.
  • A Fedora Compatible [Please register to see this link. ] (bootloader)
  • [Please register to see this link. ]
  • Internet connection to your PS3.
  • A wired Ethernet connection is required. Wifi is more complex to get operational.
Installation procedure: The installation procedure of Fedora 8 takes 3 steps:
  • Prepare the harddisk of the Sony PS3.
  • Installation of bootloader (otheros) in the Game-OS.
  • Installation of Fedora 8 in the 'Other OS'.
1. Prepare the PS3 harddisk

Originally the harddisk of the PS3 has one big partition for the Game-OS. If we want to run Linux on it, we need to create a separate partition for Linux. this chapter describes the steps to take:
WARNING: These steps will destroy ALL data that is currently installed on the harddisk and that is used by the Game-OS, such as downloaded games and personal game-save data. So, backup everything first on an external flashdisk/harddrive before continuing here!
(Note: this procedure has been copied from [Please register to see this link. ], that site is also a great resource for PS3-Linux enthusiasts)
  • Turn on the PS3. After initializing, you can see GameOS menu. You select "Settings -> System Settings".
    After selecting "Format Utility" from sub menu, following messages are displayed.
    • Format Memory Stick
    • Format SD Memory Card
    • Format CompactFlash
    • Format Hard Disk
  • To allocate a Linux partition on the Hard Disk, select "Format Hard Disk".
  • After following message is displayed. you select 'Yes'.
    Do you want to format the hard disk?
  • You can see following message.
    Select a partition setting for the hard disk.
    * Use All for the PS3 System
    * Custom
    To allocate a Linux partition on the Hard Disk, select "Custom".
  • After selecting "Custom", following messages are displayed.
    Select a partition setting for the hard disk.
    Use All for the PS3 System
    Allot 10GB to the Other OS
    Allot 10GB to the PS3 System
    To allocate a Linux partition on the Hard Disk, select one of following items.
    Allot 10GB to the Other OS
    Allot 10GB to the PS3 System
    If your hard disk size is 20GB, you have to select 'Allot 10GB to the Other OS'. (Notice that a default Linux
    install takes about 5GB, so if you do not plan to store lots of data on the Linux partition, 10 GB should be enough. Later the Linux partition can be extended by means of a USB drive, or connecting to a fileserver)
  • After selecting the item, following messages are displayed.
    Select the hard disk format method.
    Quick Format
    Full Format
    You can select either 'Full Format' or 'Quick Format'.
  • After following message is displayed. you select 'Yes'.
    If you format, all data will be deleted.
    This data cannot be restored.
    Are you sure you want to continue?
  • After selecting 'Yes', format process is started.
  • After creating a Linux partition, following messages are displayed.
    Format Complete.
    Press the X button to restart the system.
    After pressing the X button, restart the system software and you can see GameOS menu.
2. Installation of the Linux bootloader on the PS3.

To be able to install Linux on the PS3, we need to install a bootloader first. This bootloader can be anything that is capable of booting a Linux kernel, but we choose to use a Fedora compatible version of Kboot here. There are different versions of Kboot floating around, some are destined for other Linux flavors, and are incompatible with Fedora.

Kboot is in fact a very small Linux kernel and busybox userland that can be loaded from a RAM-drive. This Kboot bootloader will provide a simple boot-prompt after installation. Later, when everything is up and running the KBoot bootloader can be replaced by a Graphical bootloader like [Please register to see this link. ]
But first, for Fedora we need to have a command prompt, so we use Kboot.

Errata: Since PS3 firmware version 2.10 there is a problem with screen blanking in both Kboot as well as in the Fedora 8 kernels. The screen will go black from time to time (or sometimes even all the time), which can be very annoying. This version of [Please register to see this link. ] (20071220) has this problem fixed.

Kboot Installation steps:
  1. Burn this [Please register to see this link. ] image to a CD, with your favorite burning software.
  2. Put the CD in the drive on the PS3.
  3. Start up your PS3 (in the Game-OS) and go to the (System Settings) in the home menu.
    If you select [Install Other OS] under (Settings), the system will search for the kboot/otheros/bld file saved on the CD. Follow the on-screen instructions to complete the installation.
Now you can start KBoot by adjusting the [Default System] setting under (Settings) -> (System Settings) on the PS3 system.
Notice that you can always boot the Game-OS by entering the command 'boot-game-os' at the kboot prompt, or by holding down the power-button during power-on.
3. Installation of Fedora 8

The installation of Fedora 8 has some small problems. The easiest way to install Linux on the PS3 is by using Yellow Dog Linux, but this distro is derived from Fedora Core 5, and is therefor rather old.
It also still contains the screen-blanking bug, so it will not run properly on the Firmware 2.10.

For Fedora 8 to install correctly we have to do several steps manually when the installation is completed from the installation Wizard. We also will compile a new kernel later on that is much smaller than the original Fedora kernel, which is good because memory is a sparse resource on a PS3.

The installation procedure:
  • Insert the Fedora DVD in the PS3
  • Switch on the PS3, and wait for the KBoot prompt.
  • At the kboot: prompt type 'linux64 text xdriver=fbdev'
  • The installation wizard is starting... you get these questions:
    • Media check -> Choose: 'Skip' or 'OK', as you wish.
    • Welcome to Fedora -> Choose OK
    • Language Selection -> Choose your Language (e.g. English)
    • Keyboard Selection -> Choose your keyboard layout (e.g. us)
    • Partitioning Type -> Select 'Create custom layout. (select ps3da, 44940MB)
  • Now, create 3 partitions of the following sizes:
    Mount point: Filesystem Type: Size:
    /boot ext3 196MB

    swap 512MB
    / ext3 'Fill all available space
  • Review the layout, and proceed with OK
  • Question about low memory, and enable swap? Choose 'Yes'
  • Ethernet configuration:
    • Configure eth0 ? -> yes
    • Activate on boot -> yes
    • Settings: (just as an example, depends on your local network)
      • Enable IPv4 support -> e.g. yes
      • IPv4 configuration -> DHCP
      • Hostname configuration -> manually -> ps3
  • Time zone selection -> System clock uses UTC
  • Zone Selection -> e.g. Europe/Amsterdam
  • Root password ->
  • Package selection -> leave default, we customize later.
  • Installation to begin -> Press 'ok'
The actual installation will take about 65 minutes...
  • After installation you can reboot the system...
After reboot you should get this error message: see [Please register to see this link. ]
  • Put back the Installation CD in the PS3 and press CTRL-ALT-DEL to reboot.
  • At the Kboot prompt type: linux rescue
  • On these questions:
    • Language Selection -> Choose your Language (e.g. English)
    • Keyboard Selection -> Choose your keyboard layout (e.g. us)
    • Network Configuration -> not necessary.
    • Rescue screen -> Choose Continue...
  • On the command prompt, perform these actions:
    • sed s@'append="rhgb quiet root=LABEL=/"'@'append="video=ps3fb:mode:138 rhgb quiet root=/dev/ps3da3"'@ /mnt/sysimage/boot/yaboot/yaboot.conf > /mnt/sysimage/boot/yaboot/yaboot.conf.new
      The videomode value to select depends on the type of screen you are using. See table below for more options:
      YUV 60Hz 1:480i 2:480p 3:720p 4:1080i 5:1080p
      YUV 50Hz 6:576i 7:576p 8:720p 9:1080i 10:1080p
      RGB 60Hz 33:480i 34:480p 35:720p 36:1080i 37:1080p
      RGB 50Hz 38:576i 39:576p 40:720p 41:1080i 42:1080p
      VESA
      11:WXGA 12:SXGA 13:WUXGA
      0:auto mode, full screen mode:
    • mv -f /mnt/sysimage/boot/yaboot/yaboot.conf{.new,}
    • cp /mnt/sysimage/boot/yaboot/yaboot.conf /mnt/sysimage/boot/etc/yaboot.conf
  • Remove the Fedora DVD, Type 'exit', and the system reboots...(if the system hangs on shutdown, just do a hard poweroff/on)
System is now booting from harddisk...

After a while, we get a text installation menu, configure here what is needed.

Once we have a login prompt, we can login either locally, or remote through SSH. Because of the screen blanking bug, I prefer to login through SSH from another Linux-box (or if you are on M$-Windoze: use for example: [Please register to see this link. ]).
  • login as 'root'
  • First update the system to the latest updates
    • yum -y upgrade
This step will take a few hours to complete...
  • If you like to start in GUI mode instead of text mode, the following line in /etc/inittab file has to be modified:
    • sed s@'id:3:initdefault:'@'id:5:initdefault:'@ /etc/inittab > /etc/inittab.new
    • mv -f /etc/inittab{.new,}
  • After changing this line, do another reboot, and the firstboot procedure is automatically started.
  • To get rid of the screen blanking bug, you have to recompile the kernel. See chapter 4b of this howto.
4. Optimizing the Fedora installation

The Fedora distribution is a universal distro. It has therefor things enabled in the kernel and userland that uses memory, but which are not needed on a PS3. Here is a short manual that describes several things to make Fedora less heavy for the PS3.
4a. Optimize Userland

If we assume a trusted environment, and security is not important, and we do not plan to use the PS3 Linux box as a Desktop system, we can have a limited set of services running. The following services can be disabled:
  • chkconfig ip6tables off (if you not have IPv6 enabled)
  • chkconfig iprdump off
  • chkconfig iprinit off
  • chkconfig iprupdate off
  • chkconfig isdn off
  • chkconfig mdmonitor off
  • chkconfig auditd off
  • chkconfig cups off
  • (once firstboot is executed once) chkconfig firstboot off
  • chkconfig sendmail off
  • chkconfig yum-updatesd off
If selinux is disabled, the following services are also not needed:
  • chkconfig restorecond off
  • chkconfig setroubleshoot off
Install a lightweight desktop:
  • yum groupinstall XFCE (during login you can set xfce as default desktop)
Remove some applications: (if they are not used)
  • yum grouperase "Office/Productivity"
  • yum grouperase "Games and Entertainment"
  • yum grouperase "Graphics"
  • yum grouperase "Printing Support"
  • yum grouperase "Mail Server"
4b. Building a smaller kernel

The original Fedora 8 kernel is quite big and, due to Fedora nature, universal.
The stock Fedora 8 kernel also has a bug in it so that the screen is blanking from time to time.
So, we build an updated kernel with a minimal set of elements.

The following steps need to be taken to build a new, smaller, kernel for Fedora 8:
  • Install the GCC compiler toolchain and other development tools with
    • yum groupinstall "Development Tools"
  • Install git tooling and another required package with:
    • yum install git ncurses-devel
  • Make as normal user a build directory on the target, and change the current directory to it.
    • mkdir -p ~/ps3_build && cd ~/ps3_build
  • Download, compile and install the dtc tool (Device Tree Compiler)
    • git clone git://www.jdl.com/software/dtc.git dtc
    • cd dtc
    • make
    • su (Switch to root user)
    • cp dtc /usr/bin/
    • exit
  • Download and extract the kernel sources at the proper location
    • cd ~/ps3_build/
    • wget http://www.kernel.org/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_20071220-ADDON/src/linux-2.6.23-20071219.tar.bz2
    • tar xjf linux-2.6.23-20071219.tar.bz2
    • cd linux-2.6.23-20071219
    • wget [Please register to see this link. ] -O ./.config
    • sed s@'EXTRAVERSION ='@'EXTRAVERSION = -20071219'@ Makefile > Makefile.new
    • mv -f Makefile{.new,}
    • make oldconfig
    • make menuconfig(only if you need to do some special changes for your own needs)
    • make -j2
    • su (Switch to root user)
    • make modules_install && make install
    • cp .config /boot/config-2.6.23-20071219
    • exit
  • Adapt the bootloader startup files by adding the new installed kernel. Execute all these commands:
    • su (Switch to root user)
    • echo "default=custom" > /boot/etc/yaboot.conf.new
    • cat /boot/etc/yaboot.conf >> /boot/etc/yaboot.conf.new
    • cat >> /boot/etc/yaboot.conf.new << EOF
    • >
    • > image=/vmlinux-2.6.23-20071219
    • > label=custom
    • > read-only
    • > initrd=/initrd-2.6.23-20071219.img
    • > append="video=ps3fb:mode:138 rhgb quiet root=/dev/ps3da3"
    • >
    • > EOF
    • mv -f /boot/etc/yaboot.conf{.new,}
    • cp -f /boot/etc/yaboot.conf /boot/yaboot/yaboot.conf
    • exit
Reboot the system and we are done!


Reply With Quote