Install Arch Linux PPC

From ArchWiki

Jump to: navigation, search


Contents

[edit] Install Arch Linux PPC

This is a tutorial on how to install Arch Linux PPC on Apple powerpc "newworld" machines (ie. all PowerMacs able to boot from CD). Arch Linux PPC is a project to port Arch Linux to the PowerPC architecture.

NOTE: There is a new iso available (see link below where to get it), so you are not 
forced to use the quickinst-script anymore (as described below).

[edit] Download iso

The latest ISO snapshots are available for download from:

ftp://ftp.archlinuxppc.org/iso/snapshots

[edit] Booting the install- CD

To boot a CD in most PowerMacs simply hold down C while switching on the machine. If it starts to access the CD drive all went well and you can start with the install procedure.

If it doesn't work that way, please check the version of OpenFirmware by booting into it. It should output a version when it comes up. To get in, do the same as for booting from CD but hold down: command + option + O + F

Generally it should at least be version 3.0 or higher.

You may also want to try to boot from the OpenFirmware prompt instead of doing it directly by typing: boot cd:,\\yaboot on the command prompt.

If none of the above works or if you do not own an apple-keyboard, there is an alternative way to make the cd boot. Please note that a existing installation of OS X is required for this method:

Boot into OS X and insert the Archlinux PPC Boot CD into the drive. Now open a terminal window and wait 
until the CD has been auto-mounted. Run "mount" and search the output for a line similar to
"/dev/disk1s1s2 on /Volumes/arch-boot". In this example the CD-ROM device is "/dev/disk1s1s2".
Now run: "sudo bless -device /dev/disk1s1s2 -setBoot" to change the Open Firmware boot device.
You can now reboot the machine and install Archlinux PPC. Once yaboot has been installed, the primary
boot device should have been reset to your harddisk automatically.

[edit] Configure the network

If your machine is e.g. a powerbook 5,6 with an airport extreme wifi card (bcm43xx), you won't be able to install over a wireless lan unless you've got the firmware ready on disk or on a separate cd/dvd/usb memory stick, see Wireless Setup for details. If your machine has an older "airport" wifi card built in (titanium; older iBooks), you can simply run

modprobe airport

to get wireless working. If you use the ethernet port, the required kernel module should have been auto-loaded. Usually this is one of "sungem" or "bmac". If the module hasn't been auto-loaded, you'll have to do it by hand (e.g. sungem):

modprobe sungem


Once you've choosen the networking device to use, run

dhcpcd <your interface>

to connect your machine to a network. To list all available interfaces execute

ifconfig -a

If dhcp is unavailable, you have to manually configure your network connection:

ifconfig <interface> <IP>
route add default gw <GATEWAY>

and edit /etc/resolv.conf with vi(m)/nano to add your DNS:

nameserver <IP.OF.NAMESERVER1>
nameserver <IP.OF.NAMESERVER2>

[edit] Creating and formatting partitions

[edit] Partition

run mac-fdisc:

mac-fdisk /dev/hda

[edit] Initialize the partition scheme

Erase all existing partitions (don't forget to backup if necessary): type "i" in mac-fdisc

[edit] Create Apple Boot partition

Type "p" to display the the starting sector, then "b" and input this number.

[edit] Create partitions

Create a partition scheme like

/ -> 15G
swap -> 1,5G
/home -> 55 G

Type "c", to create a partition. "p" to list current partitions and sectors to see where you can add new partitons. For the swap partition use the name "swap".


Example result:

        #                    type name                  length   base
( size )  system
/dev/hda1     Apple_partition_map Apple                     63 @ 1
( 31.5k)  Partition map
/dev/hda2         Apple_Bootstrap bootstrap               1600 @ 64
(800.0k)  NewWorld bootblock
/dev/hda3         Apple_UNIX_SVR2 root                31457280 @ 1664
( 15.0G)  Linux native
/dev/hda4         Apple_UNIX_SVR2 swap                 3072000 @
31458944  (  1.5G)  Linux swap
/dev/hda5         Apple_UNIX_SVR2 home               121770544 @
34530944  ( 58.1G)  Linux native

Block size=512, Number of Blocks=156301488
DeviceType=0x0, DeviceId=0x0

[edit] Format partitions

ext3 is recommended on powerpc. Format your partitions:

mke2fs -j /dev/hda3
mke2fs -j /dev/hda5

(Note: reiserfs was said to be unstable, but all bugs should have been fixed nowadays, I've been using it for almost a year and haven't experienced any problems - Armin)

[edit] Format swap

mkswap /dev/hda4

[edit] Create chroot

You can both install using the Arch-Setup script (/arch/setup) or quickinstall (be warned there's a bug: no wget on the iso, so you need to correct to snarf manually)

[edit] Mount partitions

partitions are mounted on /mnt

mount -t ext3 /dev/hda3 /mnt
mkdir /mnt/home
mount -t ext3 /dev/hda5 /mnt/home

[edit] Install base

Base is installed on /mnt

cd /tmp
/arch/quickinst ftp /mnt ftp://ftp.archlinuxppc.org/core/os/ppc

[edit] Mount chroot

cp /etc/resolv.conf /mnt/etc/resolv.conf
sed -e 's/mnt//g' < /etc/mtab > /mnt/etc/mtab
mount -t proc none /mnt/proc
mount -t sysfs none /mnt/sys
chroot /mnt /bin/bash
source /etc/profile
makedevs


Nb: makedevs create devices in /dev

[edit] Edit configurations files

(See the official install guide for more information)

/etc/fstab; /etc/rc.conf, /etc/yaboot.conf, /etc/hosts files

[edit] Example of /etc/fstab with previous partition schema

none                   /dev/pts      devpts    defaults            0
0
none                   /dev/shm      tmpfs     defaults            0
0
tmpfs                  /tmp          tmpfs     defaults            0
0

#/dev/cdrom             /mnt/cd   iso9660   ro,user,noauto,unhide   0
0
#/dev/cdrom             /mnt/dvd  udf       ro,user,noauto,unhide   0
0

/dev/hda3		/	     ext3      defaults		    0      0  
/dev/hda4               swap         swap      defaults             0
0
/dev/hda5               /home        ext3      defaults             1
1

[edit] Example of /etc/yaboot.conf

boot=/dev/hda2
device=/pci@f4000000/ata-6@d/disk@0:
partition=3
delay=10
timeout=40
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
image=/boot/vmlinux26
	label=Linux
	root=/dev/hda3
	initrd=/boot/kernel26.img
	read-only

Note: To find the device path run this in the shell:

ofpath /dev/hda

[edit] Example of /etc/rc.conf

LOCALE=en_US.utf8
HARDWARECLOCK="localtime"
TIMEZONE=Europe/Paris
KEYMAP=mac-fr-ext_new
CONSOLEFONT=lat9w-16
CONSOLEMAP=
USECOLOR="yes"
MOD_AUTOLOAD="yes"
MOD_BLACKLIST=()


MODULES=(sungem !usbserial)
USELVM="no"
HOSTNAME="enlil.metavers.net"
lo="lo 127.0.0.1"
eth0="eth0 192.168.0.4 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo eth0)
gateway="default gw 192.168.0.254"
ROUTES=(gateway)
DAEMONS=(syslog-ng !hotplug !pcmcia network netfs crond sshd)


Note : If you want to use airport, add airport to modules.

[edit] Install kernel and openssh

pacman -Sy kernel26-pmac openssh

[edit] Install yboot on boot

yaboot is instaled on boot partirion. Don't forget to edit /etc/yaboot.conf.

mkofboot
ybin -v

You can also use yabootconfig to generate an /etc/yaboot.conf for you.

yabootconfig

When it asks for your kernel image, input /boot/vmlinux26 and for the initrd /boot/kernel26.img

[edit] Change root password

passwd root

[edit] Add a user

useradd <your username>

[edit] Reboot

Exit chroot:

exit

Umount partitions :

umount /mnt/proc /mnt/sys /mnt/home /mnt

Execute the command :

reboot

VoilĂ , Arch Linux PPC is installed. You only need to install X, ... like in Arch Linux :)

Personal tools