PearPC Configuration Guide
From PearPC
This guide will help you through the installation and configuration of PearPC and the basic steps before installing a guest OS on PearPC.
Before we begin, you should get all the necessary things...
Contents |
Getting the PearPC emulator
To set up a PearPC enviroment you should first create a directory for PearPC. It will contain all your PearPC files.
UNIX/Linux
Get the PearPC source from CVS and compile it. After you have finished compiling, copy the video.x file from your PearPC source directory to the directory you created in the first step.
Windows
Download the archive containing PearPC from the official site and unpack it to the directory you created. Later you may want to download fresh CVS builds from Richard Goodwin or epsilon15. Or you may want to try Prasys' and Alex's Builds.
Creating the HD image file
UNIX/Linux
On UNIX(-like) operating systems you can create a HD image (or virtual harddrive) file very easily using the dd command. Just enter one of the following:
3 GiB:
dd if=/dev/zero of=myharddisk.img bs=516096 seek=6241 count=0
6 GiB:
dd if=/dev/zero of=myharddisk.img bs=516096 seek=12482 count=0
Option if describes the input file, which in this case gives back "zero" bytes. of is the image file to be created. bs is the block size in bytes. The size of a disk image must be a multiple of 516096. Then it seeks the given number of blocks which represents the end of the file. Please note that the faster seeking method just reserves the diskspace for that file, without zeroing out the image file content. If you would like to have an image file containing "null" bytes instead, use the count option, like this:
6 GiB (zeroed out file):
dd if=/dev/zero of=myharddisk.img bs=516096 count=12482
If you want to create an HD image of different size, you can calculate the seek value yourself. Simply use the formular:
[Size in MiB] * 2
Windows
If you use Windows XP, there is a DOS program capable of creating empty HD files. First calculate the proposed size of the file in gigabytes:
[Size in GB] * 2 * 528482304
Open a command prompt, navigate to your PearPC directory, and type:
fsutil file createnew myharddisk.img [Calculated Size]
There is also a downloadable tool to create an HD image in our The Moron's Guide to Tiger on PearPC. The PearPC.net package also includes such a function.
If you create a secondary drive using these methods and then format it using 'Initialize' and 'Erase', there is a bug where the reformatting/erasing will change the size of the mounted image. If you try to use the image again, PearPC will not boot due to failure of the image to be a multiple of 528482304. (OSX Tiger 10.4)
Performance Tip: After creating the hard disk and CD/DVD images defragment your hard drive, in most cases this will help with the speed of the installation.
Expanding/Resizing an Image
There are some tools on the net that say they can expand images but they dont take into account the 'multiple of 528482304' restriction. PearPC will not boot if the size is wrong.
The best method is to create a new drive image and mount it as a secondary drive in PearPC. Next, use OSX itself to 'Restore' the main drive onto the secondary drive. Restore is the same as ghosting or making a real image of the drive. This can be found in the 'Disk Utility', which conveniently comes up when you add an uninitialized drive. Once copied over, change the image that PearPC boots from in the config file.
Creating the CD/DVD image
Now we have to create the CD/DVD image. Using this image you can later install the OS in PearPC. It is recommended to place the CD image in the PearPC directory.
UNIX/Linux
On Unix (-like) operating systems you can create a CD/DVD image very easily. Type this command in a console window (needs root account password):
sudo dd if=/dev/cdrom of=cd.iso
This command does not show any progress and takes a few minutes. It automatically quits when finished.
Windows
On Windows you can use image programs like Transmac, ISOBuster, WinImage, Ahead Nero or Alcohol 120% to get a proper image of your install CD/DVD.
Mac OS X
Mac OS X has a UNIX subsystem and you can use dd just like in UNIX/Linux, but there are some different device names. In most Macs the CD/DVD drive is named /dev/disk1. Type this command in Terminal (needs admin account password):
sudo dd if=/dev/disk1 of=cd.iso
This command does not show any progress and takes a few minutes. It automatically quits when finished.
Editing the Configuration File
Now it's time to edit the configuration file. First, copy all the text from this Basic Configuration File to a file called ppc.cfg. Place it in your PearPC directory. Open the file again and edit the line beginning with pci_ide0_master_image to point to your HD image, and the line pci_ide0_slave_image to point to your CD-ROM/DVD image (ISO file). If you are running UNIX, then this line can also point to the device for your CD-ROM/DVD-ROM drive, like /dev/cdrom. That makes you able to install Mac OS X or any other PowerPC operating system directly from your CD/DVD drive without the need of making an image
If your CD/DVD image isn't located on the same partition as PearPC you may experience a system panic within PearPC.

