(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) PowerPC Linux : (Category) LinuxPPC for PCI Macs :
How do I boot LinuxPmac on my G3?
    The following is a simple recipe for getting LinuxPmac running on the first
generation G3 Powermacs. Later G3 Powermacs may deviate from these steps
somewhat (feel free to append information on that topic). The best place to
start is with the most current LinuxPmac distribiton such as that on the
upcoming LinuxPPC cd or from their ftp site on ftp.linuxppc.org in the /Redhat
directory. It is important because only the latest 2.1.24 stable kernels have
ethernet and video fixes for the G3 models. 
Complicating the process is the fact that the OpenFirmware 2.0f1 in the G3
PowerMacs is badly broken making booting from a scsi or ide hard drive very
difficult. Fortunately the broken OF can be largely fixed by applying the OF
patches in Apple's Multibooter 1.0d13 which is available on ftp.apple.com in
/devworld/Rhapsody/UsefullStuff. Unfortunately even with these patches the very
first attempt at booting a scsi, ide or floppy will fail and one must try a
second time. 
    Normally this would be no problem and a small loop could be programmed as the
boot-command to handle it. However, with the OF patches in Multibooter 1.0d13
the catch mechanism is broken so this won't work. Fortunately Harry Eaton has
come up with some patches that are applied over the Multibooter 1.0d13 OF
patches that work around this bug. These patches are available on
ftp.linuxppc.org in /pub/users/harry as fixg3.tgz. Download it and follow the
instructions carefully in the README.
    To help clarify things I will give a small example installation. Assuming you
have downloaded all of the RedHat directory from ftp.linuxppc.org and placed it
on the root level of your internal IDE hard drive of your G3 (or have the new
CDROM) the process for installing Linuxpmac on an external scsi drive would be
would be...

1) make a HFS install floppy by copying the installer.coff from RedHat/images to
a floppy disk
2) obtain Multibooter 1.0d13 and run it under the MacOS (you could select either
the Network Booting or MacOS options...either will load the OF patches)
3) reboot the machine and hold the option-command-O-F key combination down as
the machine is rebooting. You will come up in the OF interface. You will
probably want to toggle caps-lock a few times to get it turned off.
4) insert the installer.coff floppy and enter...

boot fd:installer.coff

5) proceed through the linuxpmac installation as normal and when asked allow the
installer to run quik.
6) now reboot into the MacOS and copy the vmlinux.coff onto another HFS floppy
and reboot into the OF command shell again
7) assuming your root linux partition is 3 and that the external scsi drive has
a lower scsi id than than other scsi devices (like the internal Zip) the root
device will be /dev/sda. So in OF enter for a drive with scsi id 1...

setenv boot-file scsi/@1:3/boot/vmlinux root=/dev/sda3 vmode=13

...this line indicates that vmlinux is to be booted from the /boot directory of
partition 3 of scsi id 1. The additional parameters are passed to the kernel
telling it that the root partition is /dev/sda3 and that vmode 13 should be
used. The vmode entry is particularly important to insure the video is usable
should you move back and forth between booting the MacOS and LinuxPmac. 

...Now with the vmlinux.coff floppy inserted enter...

boot scsi/@1:0

...note that it will return a "Can't Open" error message. Ignore it and repeat
the command again. You should now see the quik boot loader in action and linux
should boot up.

    Once you have booted into Linux, login as root and move the fixg3.tgz program to
the Linuxpmac drive. Once uncompressed and extracted, read the README file in
the newly created fixit directory carefully. The process at this point is very
simple. In the fixit directory you execute...

./patchof 

...which will save the nvramrc patches to a file and apply the new OF patches to
these and then restore them to nvram. You should now test the patches by
rebooting linux. Hold down the command-option-O-F to drop into the OF shell at
the reboot and enter...

setenv boot-device scsi/@1:0

...which indicates that the first bootable partition on scsi device at id 1 and
then enter...

boot

...you should now rapidly see the first failed boot attempt followed by a reset
of the scsi bus and another attempt which then succeeds. Once booted back into
Linupmac if you wish you can install the OF bootmenu program. This will cause a
pause in OF at boot time presenting you with a menu from which you can boot
either the (m)acos, (l)inux or drop into (o)f. The script boots into linux if no
option is selected in the specified time period. To install bootmenu go back to
the fixit directory and enter...

./g3fix bootmenu

Thats it. Now you have a fully bootable Linuxpmac system. Enjoy.

hopefully someone can update this faq with the proper syntax for booting off of
the internal ide of the g3.
   One other note about setting up bootmenu on the G3 (or really any mac)...if you
want to have your Mac boot to the MacOS by default from bootmenu unless you hit
the 'l' key for linux, use the following for the contents of the bootcommand
file in the fixit directory and then reinstall bootmenu with the command
"./fixg3 bootmenu". The contents of bootcommand should be...

." Select" cr ." (m)ac" cr ." (l)inux" cr ." (o)f" cr a 0 do 50000 begin key?
if  drop leave then 1- dup 0 <> while repeat drop i . loop key? if key dup 6c if
bootr  then 6f = if quit then then bye 

Enjoy.
Forget everything you have seen up until now about installing or booting on a G3.
I have been trying incessantly for the last week, and nothing was working.  

BootX is my savior.  I found a beta version of Bootx at the web site:
        
                                mirror.aarnet.edu.au/pub/linuxppc/install

I literally put it into my system folder and tried it out on accident.  It worked.
The installer immediately started up and ran smoothly.  Once it was installed I 
changed the settings so that it would not run the installer anymore.  For my 
setup I put root=/dev/sda4 noinitrd

That was all she wrote.  No more boot variables or quik ever again.  You can
even launch Linux while your in the MacOs.  It restarts automatically and boots.

Thanks to those who created Bootx

Jeff Rose
[Append to This Answer]
Previous: (Answer) From Mac OS to Linux/PowerPC in 60 Minutes & 4 EZ Steps!
Next: (Answer) How do I install Linuxpmac on top of Mklinux pre-DR3 or DR3?
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=431
[Search] [Appearance]
This is a Faq-O-Matic 2.717d.
Hosted by anduin.org and SourceForge Logo