[SourceMage_Wiki] [TitleIndex] [WordIndex

Last update : 2004/05/21 by elshaa

I (afrayedknot) dont have much experience installing on ppc's (apple type hardware). In fact I just finished installing onto an ibook this afternoon. Im going to put in a log of my experiences, feel free to make corrections or expand on anything.

Experiences from my g4 ibook install:


0.1. 1.1. Entering the OpenFirmware

It looks as if my g4 ibook doesn't like booting from the iso and moves onward to other boot devices. The solution I found was to boot into OpenFirmware and tell it in more explicit instructions how to boot : hold :

Command(apple)+Option(alt)+o+f as the computer is booting up.

You'll end up in...text...a screen with only text...it seems too anti-apple doesn't it? You are now in the OpenFirmware.

0.2. 1.2. Entering Yaboot

Once you are in the OpenFirmware, you now want to go into Yaboot, a respectively a kind of "grub". type at the OF prompt :

boot cd:\\startup\\yaboot

0.3. 1.3. Launching the kernel

The journey has begun. I got a handy yaboot prompt, beause yaboot couldn't find the kernel. Just type :

cd:0,/startup/vmlinux root=/dev/cdroms/cdrom0


Off we go into the installer. The installer is relatively straightfoward.

0.1. 2.1. Partitioning your disk

We will now partitionning our disk using mac-fdisk BE CAREFUL : You have to create a bootstrap partition with the 'b' command. Without that patition, you'll not be able to boot any OS. (Nothing will be written before you press the 'w' (write) command)

Considering you want to make your disk looking that :

/dev/discs/disc0/part1 : map partition (NEEDED) /dev/discs/disc0/part2 : bootstrap partition (NEEDED) /dev/discs/disc0/part3 : / partition /dev/discs/disc0/part4 : /usr partition /dev/discs/disc0/part5 : /var partition /dev/discs/disc0/part6 : swap partition /dev/discs/disc0/part7 : free space (backup e.g.)

Here are the commands I'll use :

# I want to erase every partitions i y yes # CAREFUL : mac-fdisk sometimes makes error while counting the number of blocks. So before saying yes, do cat proc/partition in a virtual terminal (command(apple) key here)

# create the bootstrap partition b # command that create a bootstrap partition 64 # first block of the partition

# create the / partition c # command to create a linux partition 3p # tells to write the first block at the beginning of the 3rd partition 5000M # size of the partition root # CAREFUL : the root partition musst be named root absolutely

# create the /usr partition c 4p # same as above, but for the 4th partition now 5000M usr # this name is free

# make the /var partition c 5p 5000M var # this name is free

# create the swap partition c 6p 200M swap # CAREFUL : the swap partition musst be named swap absolutely

# create the free space partition c 7p 7p # explanation : a null size is unpossible, that command is interpreted as 'to the end of the 7th partition' free # whatever you want of course

# a verification is safest, then (w)rite and (q)uit p w # answer (y)es q

After that go through the menu to select your mount points/file systems. Eventually you'll do the 'transfer sourcemage' item.

0.2. 2.2. Configuring Yaboot

Now you're ready to configure your bootloader : Yaboot. This part seems to use yabootconfig, which is broken. Mostly because the kernel we booted with is in one place (cdrom) and the kernel we will be booting with later is somewhere else (hard drive). So thats lame. What I essentially did was shell out and :

cp /lib/modules/* /mnt/lib/modules/

/startup/(vmlinux, boot.msg & initrd.gz) /mnt/root/boot/

that saves you from having to compile the kernel on the iso, and gives you a useful one when you reboot. Now to install that pesky bootloader: My yaboot.conf ended up looking like this :

device=hd,2 #or whatever you bootstrap partition is default=default timeout=100 root=/dev/discs/disc0/part3 #or whatever you /root partition is message=/boot/boot.msg bgcolor=black fgcolor=white image=/boot/vmlinux label=default read-only initrd=/boot/initrd.gz initrd-size=8192

Then I ran

ybin -b /dev/discs/disc0/part2 # or whatever you bootstrap partition is You can recheck with mac-fdisk (dont use fdisk).

If you feel like setting up the network through the iso, or with netconf the module to use is 'sungem'.

It should be fairly obvious, but you'll need the ben kernel patch when you cast linux again.

BEFORE YOU CAST ANYTHING comment out the line in /etc/fstab that says

tmpfs /var/log tmpfs defaults 0 0


umount /var/log

(you'll probably have to kill syslogd and klogd for this to work)

The install logs for all the spells will be missing due to this idiotic twist of fate. You'll need to make /var/log/sorcery and md5sum queue install and compile under it before moving onward... BE SURE to do that before you do a sorcery rebuild, otherwise you'll never have anything tracked until you do it again.

Man pages look ugly, just recast man, or make sure that the PAGER in /usr/share/misc/man.conf is PAGER /bin/less -isR alternatively just set the PAGER to something on the command line.


When you just installed your brand new SMGL system, you have to do some changes before casting glibc. If you don't make these changes, your system will be broken. Do that before sorcery system-update. This bug should be soon fixed in the stable grimoire & sorcery.

so before casting glibc, as root :

cd /lib cp ld-2.3.2.so ld-linux.so.2 ln -sf ld-linux.so.2 ld.so.1

then ;


change the line before the last one by replacing ld-linux.so.2 by ld.so.1

Now you are ready to cleanly compile glibc, without breaking your system.

(afrayedknot: i think the glibc spell was fixed to work without these changes,


2013-02-24 15:55