(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) Installation :
How to install MkLinux on a Powerbook G3
This is intended to be a fairly complete explanation of how to get mklinux up and running on a G3 Powerbook. The primary problems with the standard installation instructions are that (1) the kernel is not able to see the hard drive in the powerbook and (2) the kernel cannot see disk partitions larger than 2G.
First, things will go a lot more smoothly if you make a copy of the RedHat directory in ftp://ftp.mklinux.apple.com/pub/DR3 on a localmachine (but probably not the G3 you're setting up now). This will allow you to do an ftp-based install of the linux packages without having to wait for the load on ftp.mklinux.apple.com. One word of warning: I initially set up this directory by copying it to my G3, and then copying it from there to a linux box. This truncated some of the file names (because of the MacOS limit on name length), and caused confusion later. If possible, I suggest you copy the RedHat directory directly to a machine already running linux or unix.
1. Assuming that your hard drive is bigger than 2G, your life will be *much* easier if you repartition AND REINITIALIZE your G3 hard disk now. You can use the pdisk utility to do this, but pdisk cannot initialize any of the partitions; the result is that MacOS will not be able to see them. What I suggest is that you use Drive Setup to completely reinitialize your disk, including initializing the associated partitions. Yes, this is a pain, because you're going to wipe out whatever is on your hard disk. Put all that data somewhere safe so that you can get it back after the initialization is complete. I set up the following partitions on an 8G disk:
    Mac HD      what you'll use in MacOS; I made it 4G
    swap        mklinux swap space; it's pointless to make it bigger
                than 128M and that's what I used
    /           mklinux root directory; there is a 2G limit.  So I made
                it 1G and also made
    /home       mklinux user file system root, which I made 1.9G
    MkLinux     a second MacOS file system that is SMALLER THAN 2G.  I
                just stuck the rest of the space here.

Then I initialized all of these partitions, and reinstalled MacOS from the CD.
2. Use pdisk to make swap, / and /home the A/UX-style partitions used by MkLinux. What I did was to use pdisk to delete these partitions and then recreated them, one at a time. (If you try to delete them all and then recreate them all, it's a lot harder.)
3. Get the various files from the DR3 directory on ftp.mklinux.apple.com. All you need are the sea.hqx files; invoke each of them to extract what they contain. Open the "Mac Files" folder and put the files where it says.
For the Mach kernel, you'll need to get a special powerbook version. It can be found at

  ftp://globegate.utm.edu/pub/MkLinux/Mach_Kernel.powerbook.gz
Retrieve it, unzip it, rename it "Mach Kernel", and put it in the extensions folder.
4. Move the mach_servers folder off of Mac HD, which the mach kernel won't be able to see because it's >2G. So move that folder onto the MkLinux folder. This is going to avoid the infamous "bootstrap cannot find config file" error message that often makes installing MkLinux much harder.
5. Determine the MkLinux device name for the partition where you finally ended up putting your mach_servers folder. Typical device names look something like this:
        /dev/hda4       (fourth partition on the first IDE drive)
        /dev/sda5       (fifth partition on the first SCSI drive)
        /dev/sdb7       (seventh partition on the second SCSI drive)
The pdisk utility is probably the best tool to determine the device names for your MacOS partitions. Use the "L" command to display the partition tables for every drive attached to your Mac. It may take some sleuthing, but you should be able to figure out the partition which contains the HFS volume containing the mach_servers folder. Here's an example of pdisk output:
     Partition map (with 512 byte blocks) on '/dev/hda'
      #:                type name             length   base    ( size )
      1: Apple_partition_map Apple                63 @ 1      
      2:      Apple_Driver43*Macintosh            54 @ 64     
      3:      Apple_Driver43*Macintosh            74 @ 118    
      4:       Apple_Patches Patch Partition     512 @ 192    
      5:           Apple_HFS untitled         614400 @ 704     (300.0M)
      6:     Apple_UNIX_SVR2 swap             196608 @ 615104  ( 96.0M)
      7:     Apple_UNIX_SVR2 root            3381703 @ 811712  (  1.6G)
      
In this case, the device name for the MacOS partition is '/dev/hda5'. If you followed the suggestions in (1), you'll have moved mach_servers to MkLinux and it's probably /dev/hda11.
6. Put that device name into your lilo.conf file's rootdev line. You do this by invoking the MkLinux control panel. Click on the "Custom" button. SimpleText will launch and you'll be editing a preferences file called "lilo.conf". Edit the "rootdev=" line so that it points to the partition containing your mach_servers.
7. Reboot, when the MkLinux "Splash Screen" comes up, select MkLinux. After a few moments of booting messages, you should be in the MkLinux Installer.
8. In general, you will follow the installer screens according to the instructions given in README_DR3. However, once you get to Installation Method, you'll need to pick something other than "Local CDROM".
The installer needs to be able to access the RPMs and other files that are in the "RedHat" directory (under DR3 on this FTP site). If you are connected to the internet via the ethernet port on your Mac, you can retrieve the RPM's via FTP as they are needed (ie. you don't need to download them all beforehand).
If you choose the FTP install, you'll need to know the name of an FTP site and the name of the directory that contains the RedHat directory. On ftp.mklinux.apple.com, that directory would be "/pub/DR3", because that's where the RedHat directory is.
Another thing you need to know is that sometimes the installer cannot determine the address of the FTP site if its name is a "DNS alias". For instance, the installer won't recognize "ftp.mklinux.apple.com" because that's really an alias for "www.mklinux.apple.com". As a last resort, you could always use the actual IP address (ww.xx.yy.zz) of the ftp site.
And one more tidbit about FTP installs: the main MkLinux FTP site, ftp.mklinux.apple.com (or really, www.mklinux.apple.com) is usually under heavy load. If you try to do a FTP install directly from it, the install process may fail and you'll have to start over. You'll be much better off if you choose either a Mirror site or to install off the local machine that I suggested you copy the RedHat folder to at the beginning. The Mirror site list is shown when you connect to ftp.mklinux.apple.com, and is also contained in the file "Mirrors" at the top level (/pub) of the FTP archive.
As an alternative to the FTP install, you can load all the RPMs onto a local disk. The structure of the RedHat directory must be preserved, including the directory (or Folder) "RedHat" itself. Some of the files in the RedHat folder have names longer than 32 characters, and their names will be truncated when placed onto a MacOS volume. Don't worry about this; the installer knows that if the files are coming from a local disk, it may have to look for truncated names.
[I had difficulty getting this to work; at the very least, you'll need to put RedHat on the <2G MkLinux partition on your hard disk.]
9. Finish in the installer according to README_DR3. Don't forget to automount the MkLinux partition on your hard disk if you want to use it to have MacOS and MkLinux talk to each other. I called it /macos; you'll need to edit /etc/fstab and change it from ro (read only) to rw (read write).
When you have completed the installation, you may remove the "mach_servers" folder.
10. You should have no trouble getting X to work as well; just edit /etc/inittab and change
    id:3:initdefault:
to
    id:5:initdefault:
(assuming that you install all of the X stuff in linux itself).
Good luck!
                                                Matt Ginsberg

ginsberg@cirl.uoregon.edu
Just a short note to make sure you read the README-KERNELS file on globegate.utm.edu. The mach_kernel.powerbook.gz file has been obsoleted by mach_kernel.generic-XX.gz, where XX is some ordinal. See the README file.
kamath@pogo.wv.tek.com
99.03.05 Installing MkLinux DR3 on a 300mhz powerbook g3. Here are more details. i was getting this error: ----- ERROR: bootstrap task cannot find configuration nfile. please make sure that your
     boot device and partition is correctly specified. On PowerMacs this is
     specified from the MkLinux control panel.
Configuration file (or 'builtin'): /dev/boot_device/mach_servers/bootstrap.conf -----
As suggested, you need a new kernel. The 'top' directory is at:
        ftp://globegate.utm.edu/pub/MkLinux/
and the directory with kernels is (currently):
     ftp://globegate.utm.edu/pub/MkLinux/kernels/stable/
I used Mach_Kernel.generic-06.gz
Now: * Ungzip the kernel file * Make sure the resulting name is "Mach Kernel" (no underscore in name) * Put it in the Extennsions folder. * Change the lilo.conf file so the root device is /dev/hdc * reboot
it should see the CD-Rom drive now!
dawej@netgate.net
I just wanted to add an update re: whereabouts of Mach_Kernel.generic ..
It is current at top directory
ftp://globegate.utm.edu/pub/MkLinux/
Subdirectory:
ftp://....[as above] kernels/stable/Mach_Kernel.generic-07.gz
Ljuba
ljuba@ling.su.se
An addendum to the guide to installing MkLinux.
Note that when you are installing via FTP, the installation program asks you to configure TCP IP and the network settings. I had no idea what they wanted, so I entered my IP address and accepted the defaults. However, this didn't work, I needed the exact settings (which I was able to pull from the MacOS control panels) :P.
Copy the following numbers from the TCP/IP control panel in the MacOS: Your computer IP address (i.e. 24.108.1.88), Your subnet mask (usually 255.255.255.0), Your gateway (i.e. 24.108.1.1) NB: this is usually your computer IP address, except that the last number is 1. Your ISP Domain Name Server address (i.e. 24.206.75.92)
Enter those numbers in the listed order when prompted by the Linux install program.
It will then ask you to configure the Network. I didn't enter anything, and it seems to work fine.
Continue with the guide and enjoy MkLinux! :)
pyl@ualberta.ca
Ummmm.... My PB G3 (FireWire) will not run pdisk properly. Pdisk fails to find the partition map. When I do L to find all partition maps, pdisk replies with: This app uses the SIOUX console library Choose 'Quit' from the file menu to quit.
Use fake disk names (/dev/scsi<bus>.<id>; i.e. /dev/scsi0.1, /dev/scsi1.3, etc.).
Top level command (? for help): L ATAPI - couldn't get info or not LBA capable pdisk: can't open file '/dev/ata0.0' ATA - couldn't get info pdisk: can't open file '/dev/ata0.1' ATA - couldn't get info pdisk: can't open file '/dev/ata1.0' ATA - couldn't get info pdisk: can't open file '/dev/ata1.1' Top level command (? for help): Can you help?
dougk_ff7@mac.com
[Append to This Answer]
Previous: (Answer) How to install LinuxPPC R4 on a Blue & White G3
Next: (Answer) How to install LinuxPPC on a G3 Powerbook (no floppy required)
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=452
[Search] [Appearance]
This is a Faq-O-Matic 2.718d.
Hosted by anduin.org and SourceForge Logo