Skip to main content.

Installing ppc64 Fedora Core 8 on PASemi "Electra" Board


This Application Note describes how to install the ppc64 version of Fedora Core 8 (Werewolf) Linux distribution on the PASemi "Electra" Board.

The installation process is a two stage operation. First stage involves booting target board with the ELDK root file system mounted over the NFS and installing a copy of the ELDK root file system to the local hard disk.

Second stage starts from booting installed ELDK root file system from the local hard disk and installing from there Fedora Core 8 on another partition of the same local hard disk.


This document was written by Marian Balakowicz (m8 {at} semihalf {dot} com).

Installation Requirements

In order to install Fedora Core 8 on the Electra board you need the following hardware and software components:

Step 1 - Build linux kernel and boot with the ELDK root fs over NFS

CFE> setenv -p nfs-eldk "ifconfig eth1 -auto; setenv bootargs 'debug root=nfs rw 
nfsroot= ip=';
boot -elf"
CFE> nfs-eldk

Note 1: If no RTC support is present, set correct date manually

Step 2 - Install the ELDK copy on the local hard disk

For detailed instructions see:

Harddisk partition layout used in this howto:

# fdisk -l /dev/sda

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
   /dev/sda1               1         250     2008093+  83  Linux
   /dev/sda2             251        3986    30009420   83  Linux
   /dev/sda3            3987        7722    30009420   83  Linux
   /dev/sda4            7723       14593    55191307+   5  Extended
   /dev/sda5            7723        7972     2008093+  82  Linux swap / Solaris
   /dev/sda6            7973       10405    19543041   83  Linux
   /dev/sda7           10406       14593    33640078+  83  Linux

Partition use in both install stages:

/       ext3    /dev/sda2
        swap    /dev/sda5

/       ext3    /dev/sda3
/boot   ext2    /dev/sda1
        swap    /dev/sda5

Note 2: If necessary create required hard disk /dev/* entries, e.g.:

# mknod /dev/sda b 8 0
# mknod /dev/sda1 b 8 1
# mknod /dev/sda2 b 8 2

Step 3 - Reboot to CFE firmware and start system with ELDK root fs from hard drive

CFE> setenv -p hd-eldk "ifconfig eth1 -auto; setenv bootargs 'debug root=/dev/sda2 ro ip=';
boot -elf"
CFE> hd-eldk

Note 3: Create /etc/resolv.conf

# cat /etc/resolv.conf

See also Note 1 and Note 2.

Step 4 - Install Fedora yum on top of a ELDK installation

Select Fedora mirror

Choose the nearest mirror from

Install wget package

Select .ppc64.rpm version of wget package as it will work on top of ELDK without any further dependency resolution:

# ftp
ftp> cd /pub/fedora/linux/releases/8/Everything/ppc64/os/Packages/
ftp> bin
ftp> get wget-1.10.2-16.fc8.ppc64.rpm
ftp> bye
# rpm -ivh --nodeps --ignorearch wget-1.10.2-16.fc8.ppc64.rpm

Install yum and its dependencies:

To avoid conflicts with the ELKD package set (ppc64), yum and its dependencies are installed in the form of the ppc binaries:


rpm -ivh libgcc-4.1.2-33.ppc.rpm
rpm -ivh --nodeps glibc-2.7-2.ppc.rpm
rpm -ivh elfutils-libelf-0.130-3.fc8.ppc.rpm
rpm -ivh --nodeps libsepol-2.0.11-1.fc8.ppc.rpm
rpm -ivh --nodeps libselinux-2.0.37-1.fc8.ppc.rpm
rpm -ivh ncurses-5.6-12.20070812.fc8.ppc.rpm
rpm -ivh --nodeps readline-5.2-7.fc8.ppc.rpm
rpm -ivh zlib-1.2.3-14.fc8.ppc.rpm
rpm -ivh bzip2-libs-1.0.4-12.fc8.ppc.rpm
rpm -ivh expat-2.0.1-2.ppc.rpm
rpm -ivh db4-4.6.21-1.fc8.ppc.rpm
rpm -ivh beecrypt-4.1.2-13.ppc.rpm
rpm -ivh sqlite-3.4.2-3.fc8.ppc.rpm
rpm -ivh gdbm-1.8.0-27.fc7.ppc.rpm
rpm -ivh keyutils-libs-1.2-2.fc6.ppc.rpm
rpm -ivh glib2-2.14.2-1.fc8.ppc.rpm
rpm -ivh --nodeps libxml2-2.6.30-1.ppc.rpm
rpm -ivh popt-1.12-3.fc8.ppc.rpm
rpm -ivh --nodeps openssl-0.9.8b-17.fc8.ppc.rpm
rpm -ivh --nodeps krb5-libs-1.6.2-9.fc8.ppc.rpm
rpm -ivh keyutils-libs-devel-1.2-2.fc6.ppc.rpm 
rpm -ivh libsepol-devel-2.0.11-1.fc8.ppc.rpm 
rpm -ivh libselinux-devel-2.0.37-1.fc8.ppc.rpm 
rpm -ivh --nodeps e2fsprogs-libs-1.40.2-10.fc8.ppc.rpm 
rpm -ivh --nodeps e2fsprogs-devel-1.40.2-10.fc8.ppc.rpm 
rpm -ivh --nodeps krb5-devel-1.6.2-9.fc8.ppc.rpm 
rpm -ivh --nodeps python-libs-2.5.1-15.fc8.ppc.rpm python-2.5.1-15.fc8.ppc.rpm
rpm -ivh python-iniparse-0.2.2-1.fc8.noarch.rpm
rpm -ivh python-urlgrabber-3.0.0-3.fc8.noarch.rpm
rpm -ivh libselinux-python-2.0.37-1.fc8.ppc.rpm
rpm -ivh rpm-libs- rpm-
rpm -ivh rpm-python-
rpm -ivh yum-metadata-parser-1.1.2-1.fc8.ppc.rpm
rpm -ivh yum-3.2.7-1.fc8.noarch.rpm

At this point yum should be correctly installed:

# yum --version

Step 5 - Preparations for the proper Fedora Core installation:

Mount install partitions

# mkdir /mnt/fc
# mkefs -j /dev/sda3
# mount /dev/sda3 /mnt/fc
# mkdir /mnt/fc/boot
# mkefs /dev/sda1
# mount /dev/sda1 /mnt/fc/boot

Initialize RPM database on your target file system

# cd /mnt/fc
# mkdir -p var/log var/lib/rpm
# mkdir -p var/lib/yum
# rpm --root=/mnt/fc --initdb

Install the "fedora-release-*" RPMs

wget ${MIRROR}/fedora-release-*.noarch.rpm
rpm --root=/mnt/fc -ivh --nodeps fedora-release-*.noarch.rpm

Edit yum repository configurations

# cd /mnt/fc/etc/yum.repos.d

Edit all .repo files, replace $basearch with ppc64 string to force installation for ppc64 architecture (otherwise $basearch would select tools (yum, etc.) architecture, which is ppc).

Copy kernel image from nfs location to the hard disk

on electra, enable password ftp login

# cd /etc/pam.d
# cp ftp ftp.orig
# cp passwd ftp
on nfs server:
$ cd /path/to/the/kenrel/image/dir/
$ ftp electra
ftp> cd /
ftp> bin
ftp> put vmlinux

Other setup

# mount -t proc none /mnt/fc/proc/
# ln -s /mnt/fc/etc/pki/rpm-gpg/ /etc/pki/

Step 6 - Fedora Core installation

Use the yum tool to perform a full installation of the "Base" system

# yum --installroot=/mnt/fc -y groupinstall Base

Make sure yum selects ppc64 packages:

 Package                 Arch       Version          Repository        Size 
 anacron                 ppc64      2.3-57.fc8       updates            42 k
 attr                    ppc64      2.4.38-2.fc8     updates            63 k
 authconfig              ppc64      5.3.18-1.fc8     fedora            408 k
 autofs                  ppc64      1:5.0.2-24       updates           1.0 M
 bind-utils              ppc64      32:9.5.0-22.b1.fc8  updates           212 k

Step 7 - Minimal post install configuration

The following additional actions are necessary to get a booting system:

Create /dev/* entries

Populate /dev directory in new file system with the minimum of entries (for example, copy /dev from running system; this is a overkill, but simple enough).

# rm -rf /mnt/fc/dev
# cp -a /dev /mnt/fc/

Create /etc/fstab

# cp /etc/fstab /mnt/fc/etc
# vi /mnt/fc/etc/fstab
# cat /mnt/fc/etc/fstab 
/dev/sda3               /               ext3    defaults        1 1
/dev/sda1               /boot           ext2    defaults        1 2
/dev/sda5               swap            swap    defaults        0 0
none                    /proc           proc    defaults        0 0
sysfs                   /sys            sysfs   defaults        0 0

Network setup

# cp /etc/resolv.conf /mnt/fc/etc/
# cp /etc/sysconfig/network /mnt/fc/etc/sysconfig/

Copy kernel image

# cp /vmlinux /mnt/fc/boot/vmlinux

Set root password on a new system

# chroot /mnt '/usr/bin/passwd'

Step 8 - Boot newly installed Fedora Core

CFE> setenv -p hd-fc "setenv bootargs 'debug root=/dev/sda3 ro ip='; boot -fs=ext2 sata0.0:/vmlinux
CFE> hd-fc

-- MarianBalakowicz - 17 Jan 2008