News Introduction Developer Tools Project Status Installation Bugs!

Site Map

One processor per person is not enough. One operating system per computer is not enough.

Linux for BeBox logo

LinuxPPC
Linux for the BeBox is based on the LinuxPPC distribution. They have some specific information for installing LinuxPPC on the BeBox here.

Chuck Shotton has written up some installation scripts to make life easier when installing. They're detailed on his site.

A Brief Warning
Note that the entire contents (each and every partition) of the hard disk you choose to install the standard LinuxPPC distribution on will be erased; you will require two hard disks if you wish to use both BeOS and LinuxPPC on the same machine. This fact was not well documented on the LinuxPPC web site when I installed it. This is not true if you use the patched kernels detailed on this page, however.

Installing LinuxPPC and BeOS
Your mission, should you choose to accept it, is to persuade LinuxPPC and BeOS to share a partition map. The problem is that LinuxPPC and BeOS use different partition maps by default. Since BeOS is the "native" operating system of the BeBox, and since we have the means to change the way LinuxPPC behaves but not the way BeOS behaves, we have to change our partitioning scheme to match theirs.

BeOS supports two partition mapping schemes; Intel and Apple style. LinuxPPC supports Intel style partition mapping, so we'll use that one. Since none of the LinuxPPC partitioning software will write out correctly formatted partition maps (yet), you MUST do your partitioning under BeOS. You will require a blank hard disk to install on. Our target partition layout is this:

Partition

Type

Contents

Size

1

BeOS (0xEB)

Bootstrap for booting LinuxPPC

At least 3Mb

2

Linux Native (0x83, 131 decimal)

Your root Linux filesystem

Most of the disk

3

Linux Swap (0x82, 130 decimal)

Swap space for Linux

About 32Mb

4

Unpartitioned (0x00)

Unused slot

0Mb

If you want to have BeOS itself on the same hard drive, use the fourth partition. Do not attempt to use the first partition, it won't work. You'll have to install BeOS on the fourth partition and make it the default partition to boot from (there's a Be application for doing that in Preferences somewhere, I'm sure).

Boot the BeOS and load the Drive Setup application. Right click on the hard drive you wish to use for Linux, then choose "Setup", "Partition", "Intel". A dialog will pop up. Adjust the settings to match the partition layout given above. For reference, this is how my 1Gb Linux drive looks under Drive Setup:

A 1Gb IDE drive partitioned for Linux with Drive Setup

Format (initialise) the first partition on this disk as a BeOS partition. Give it a name like "LinuxPPC bootstrap". Find a LinuxPPC bootstrap floppy disk, and place it in the floppy drive on your BeBox. I recommend you use the very latest one, which is available here. Details on writing it to a floppy are further down this page.

Open the "Disks" window, and from the "File" menu choose "Mount Settings". Click the "Mount all disks now" button. Open your Linux bootstrap disk, and create a folder named "system" on it. Open the folder named "system" that is on the floppy disk, and copy the file "kernel" from the floppy disk to the folder named "system" on your newly formatted hard drive. That drive will now load the LinuxPPC bootstrap if you try to boot from it. Now you will need to download some more things (sorry!). The kernel has had to be patched to work with the Be style partition mapping. There are several files available, all by anonymous FTP from ftp.halfast.com in the /pub/be-linux-devel/ directory. This is a list of the files (just click one to download it).

Filename

Contents

Size

980610-kernel-patches.tgz

This archive file contains the various files I've patched. For the partition mapping, it's drivers/block/genhd.c. There are also the results of my fiddling with the interrupt handling code in here.

19Kb

980610-bootstrap.gz

This is the latest version of the bootstrap floppy disk. Uncompress and write this image out to a floppy disk. Leave the floppy disk in the drive and reboot your BeBox to begin loading LinuxPPC.

30Kb

980610-setup.gz

This is a compressed kernel image of the kernel you require to install LinuxPPC. You must have this file to install with a Be-style partition map. Uncompress it before writing it to a floppy disk.

1322Kb

980610-boot-ide.gz

Once you have installed LinuxPPC you must use a second kernel to boot for normal operation. This is a compressed kernel image of the kernel you require if your root disk is on IDE. You must have this file to run Linux with a Be-style partition map. Uncompress it before writing it to a floppy disk.

478Kb

980610-boot-scsi.gz

Once you have installed LinuxPPC you must use a second kernel to boot for normal operation. This is a compressed kernel image of the kernel you require if your root disk is on SCSI. You must have this file to run Linux with a Be-style partition map. Uncompress it before writing it to a floppy disk.

478Kb

Performing the installation
Download the latest bootstrap from the above list. Uncompress and write it out to a formatted 1.44Mb 3.5" floppy disk with a command like this:

inferno:~/belinux$ gzip -dc 980610-bootstrap.gz > /dev/fd0

Label that floppy disk Bootstrap. You will need this disk to prepare the hard drive as a bootstrap (see above). Insert a new one and repeat the process for the setup disk. Change the disk again, and then write out your boot disk - make sure you choose the correct disk, depending on whether the disk you are installing on is IDE or SCSI. Both disks include drivers for IDE and SCSI, but one disk expects to find the root filesystem on the first IDE disk, whereas the other expects to find it on the first SCSI disk. You cannot presently install on disks other than the first SCSI disk (well you can, but you'd need to patch the kernel first).

Place the "Setup" disk in your floppy drive, and reboot the BeBox. Hold down the shift key as soon as the Be logo appears (or even from before it appears, if you can). You should get a list of the BeOS filesystems in your system. One of them should be the bootstrap you prepared earlier. If you cannot see it, choose the bottom option, which will cause the system to rescan the SCSI and IDE busses looking for disks. If you still cannot see it after a few seconds, something has gone wrong. Did you copy the bootstrap code to "system/kernel" on that disk, as described above? If you still cannot get it to work, something is seriously wrong. Contact me and tell me what you've done.

When you've found the correct disk to boot from, highlight it and press return. You should see the video card change to text mode and the words "PowerPC Linux for BeBox bootstrap" followed by a massive wadge of status and debug information. If you just get a black screen, reboot and try again. If you get no change at all, you have an unsupported video card. Sorry about that. We're actively working to add support for more video cards, even as you read this.

With the "Setup" floppy in your floppy drive, hit return. It's okay to boot with this floppy in the drive, the boot ROM won't try to load an operating system from it ;)

The system will load the kernel from the floppy disk. As it loads, the two rows of lights on either side of the BeBox will "fill up". After the kernel has loaded, the screen will clear again and you'll be confronted with the "Linux/PowerPC Load:" prompt. Just hit return at this point, and wait as the installation kernel and RAM disk (slowly) decompresses.

Finally, the screen will clear once more and Linux will boot into single user mode from the RAM disk built into the setup kernel image. You should get a "#" prompt. During the "Partition check" you should see "{BeFix}" printed for the disk you plan to install on (either sda or hda). If you don't, abandon your installation now and contact me!

Type "crdisk-net" and hit return to begin the installation. Choose "Diskettes" as your installation method. Enter "/dev/fd1" as the device name for your floppy. Make sure you enter the correct device name to install onto - use "/dev/sda" for the first SCSI disk, and "/dev/hda" for the first IDE disk. Name "dev/hda2" or "dev/sda2" as the root partition, and "dev/hda3" or "dev/sda3" as the swap partition. When it asks you for the options for cfdisk, erase the "-z" from the command line! Do NOT repartition your hard drive when it tells you to! It will start cfdisk for you, you must quit it without allowing it to alter your partition table. To do this, move the cursor over to "Quit" using the right arrow key, then press the return key. You will need to download, decompress, and write some files out to floppy disk to complete the installation. These are all found on the LinuxPPC FTP site.

Once you've completed the installation you'll get the "#" prompt again. Reboot the BeBox and start the bootstrap as before. Instead of using the "Setup" disk to load the kernel, however, use one of the "boot-ide" or "boot-scsi" disks. You may now install RedHat PowerPC RPMs to get a working LinuxPPC installation.

Built on a BeBox Dual603-133

© 2002 William R Sowerbutts <will@sowerbutts.com>
Page last modified: Sun Aug 16 19:05:14 1998

Be is a registered trademark, and BeOS, BeBox, BeWare, GeekPort, the Be logo and the BeOS logo are trademarks of Be, Inc. All other trademarks mentioned are the property of their respective owners. Yadda yadda yadda.