The wikis are now using the new authentication system.
If you did not migrate your account yet, visit https://idp-portal-info.suse.com/

SDB:PPC: Booting with Yaboot on a PowerMacintosh

Şuraya atla: kullan, ara


Version: 6.4

Starting with the iMac models, Apple has changed the bootstrap process. The built-in ROM has been moved to a file on your hard disk. This new structure simplifies firmware updates and increases performance.

We use this new feature to load the Linux bootloader, instead of the MacOS ROM file. To give a choice between MacOS and Linux during system startup, the os-chooser script exists.

Yaboot can be used on these machines (only!):
On every so called "NewWorld" machines

  • - G3 B&W
  • - iMac
  • - G4
  • - iBook
  • - PowerBook with Firewire

The PowerBook type Lombard (bronze keyboard) is a NewWorld machine as well. Unfortunately, the graphic chip is not fully supported right now. Use BootX to boot this PowerBook

Installation of yaboot:

An extra Linux Boot partition, in HFS Format (not HFS+!), is needed. The partition should be 32MB in size. This size gives one the chance to acccess the partition from the Linux side, so that more than one kernel may be placed on it. Copy the folder, "suseboot", from the first CD to this partition. The following files should be in this folder:

yaboot
vmlinux
ramdisk.image.gz
Finder
System
yaboot.conf
os-chooser (optional, if dual-boot is desired)
  • yaboot: is the Linux boot loader that loads the kernel
  • vmlinux: is the Linux kernel
  • ramdisk.image.gz: contains the installer
  • Finder: is a dummy file to make this folder bootable
  • System: is a dummy file to make this folder bootable
  • yaboot.conf: is a config file for yaboot
  • os-chooser: gives the choice between MacOS and Linux on system startup

The folder must have the icon of a active System folder. If this is not the case, perform the following steps:
- open the folder "suseboot"
- move the file "Finder" to the Desktop
- close the window of the folder "suseboot"
- drag the file "Finder" from the Desktop on the icon of the closed folder "suseboot"
Now the folder should appear as a system folder.
If the folder still does not appear to be a system folder, there is probably an older version of MacOS on the computer. Use the "Finder" file in the active System folder to replace the faked, empty one in the suseboot folder in order to create a bootable folder.

Open the configuration file, yaboot.conf, with SimpleText, and adapt it to your needs. An example config could look like the following:


 default = linux
 timeout = 200

 image = vmlinux
      label = linux
      append = ""
      root = /dev/

 image = vmlinux
      label = install
      append = ""
      initrd = ramdisk.image.gz
      root = /dev/fd0

 # your own kernel on the linux side, could look like this
 #image = ultra0:11,/boot/vmlinux
 #     label = vmlinux
 #     append = ""
 #     root = /dev/hda11
 #
 

SuSE's version of yaboot will load the Kernel, vmlinux, and the ramdisk from the same folder where yaboot itself is located. (Unless a full path is specified.)

The file os-chooser gives one the choice between Linux and MacOS during system startup. If the space is held down, the first "Booting ..." line will be executed, if nothing is pressed, the second line will be executed.

<CHRP-BOOT>
<COMPATIBLE>
iMac,1 PowerMac1,1 PowerBook1,1 PowerMac2,1 PowerMac3,1 PowerBook2,1 PowerBook3,1
</COMPATIBLE>
<DESCRIPTION>
Linux/PPC Yaboot bootloader
</DESCRIPTION>
<BOOT-SCRIPT>
" get-key-map" " keyboard" open-dev $call-method
dup 20 dump
5 + c@ 08 = if
" Booting MacOS ..." cr " boot ultra0:6,\\:tbxi" eval
else
" Booting Yaboot ..." cr " boot ultra0:7,\\yaboot" eval
then
</BOOT-SCRIPT>
</CHRP-BOOT>

The most important part is the section of the line:

 ultra0:7,\\yaboot

This line loads the file yaboot from the active system folder on partition 7 of the first IDE disk. Adapt the lines to fit _your_ needs.

There are two tools in the folder, "suseboot", that are AppleScript programs. These programs will set the correct type and creator information on the relevant files.

"mark os-chooser bootable" sets the correct attributes for the os-chooser script and some other files.
"mark yaboot bootable" sets yaboot itself bootable, so Linux can be booted directly.

When all of the configuration files are setup correctly, it is necessary to change the startup disk to your Linux boot partition. Then os-chooser or yaboot will be booted.

After restarting, one may choose between MacOS and Linux with the space bar. If the mouse pointer appears, then MacOS booting.

Installation on SCSI-only machines: The installation on a SCSI-only system is a little more complex because there are no device aliases like ultra0 or hd. In this case, the device path is determined from the Linux side. Another possibility is to use the Apple tool, "System Disk". This tool can be found at ftp.apple.com (617 kb):

ftp://ftp.apple.com/developer/macosxserver/utilities/SystemDisk2.3.1.smi.bin

The Apple licence does not allow us to put this utility on our CD.

You can only boot from SCSI-controllers that are supported in OpenFirmware. The Adaptec 2906, for example, is not bootable.

  • be sure the folder suseboot contains all the needed files, and is located on your Linux boot partition
  • run the script "mark yaboot bootable" from the tools folder
  • choose your Linux boot partition in the Startup disk control panel
  • boot from the first CD and install Linux
  • login as root after the installation process
  • mount the first CD with the command "mount /cdrom" (to eject CD-Roms use the command "eject")
  • run the script "gernerate_os_chooser.sh" with the Linux boot partition and the MacOS partition as parameter.
/cdrom/generate_os_chooser

for example (change the paramters for your needs!):

/cdrom/generate_os_chooser.sh /dev/sda8 /dev/sda7 suseboot

This script will generate a proper os-chooser file. Furthermore the file yaboot.conf will be modified, the label "linux" will be activated, and the current root partition will be appended to the file. <keyword>ppc,powerpc,apple,yaboot,openfirmware,mac,macintosh</keyword>