PowerBook 5300 FAQ
Installing Linux: MkLinux Pre-R2
Step by step instructions to installing MkLinux Pre-R2 on the PowerBook 5300

AlkSoft / Contents / Appendix / Installing Linux


This page describes how the author installed MkLinux Pre-R2 on a PowerBook 5300ce.

Note:
At the time of writing, MkLinux Pre-R2 was the most current version of MkLinux and the only Linux distribution that would run on the 5300. Since that time, several other distributions have added NuBus Power Mac kernel support as well as support for the 5300's sound system and PC card controller. Networking is now possible on the 5300 via PC cards, but the author has no experience with a more modern distribution of Linux on the PowerBook 5300.

Background:

The steps I took are listed in chronological order. My comments are in italics. I managed to install MkLinux (not the "Everything" installation option!) into about 400MB of disk space. Although I haven't yet gotten the X Server working with my display, I'm hopefull that it will work in the future. Certainly the CLI is useable, and if you forgo the X options, you have quite a bit of disk space to play with. Before you start installing MkLinux, though, make sure you've read through and bookmarked the indispensible MkLinux Getting Started guide which has screenshots of the MkLinux installer.

Some things to note before you install MkLinux: As of Pre-R2, MkLinux IS bootable on the PowerBook 5300ce. However, the T-REX PCMCIA controller is not supported, so you can't use PC cards of any kind (ethernet, modem, etc) with your 5300ce unless you can write your own support into the system. The expansion bay controller is equally unsupported so you can't use any extra modules you may have like expansion bay hard drives. The floppy controller is not supported, so you can't use floppies with your MkLinux installation. Although I haven't tested it and I haven't read about it anywhere, I highly doubt that the Lapis MV-xen (x == 8 || 16) card is supported by MkLinux. So, unless you want to use your only serial port for network connectivity, you have no solution for file or data transfer. So the question of whether a completely isolated installation of Linux is actually useable or not, I'll leave up to you.

Oh yeah, and the ITT ASCO 2300 "Singer" sound integrated circuit doesn't work either. So don't plan on playing any MP3s in your Linux install either.

These limitations also extend to any other version of Linux (LinuxPPC, Debian, Yellow Dog Linux, etc) that you might install on the PowerBook 5300, PowerBook 1400, or PowerBook Duo 2300.

Tools You'll Need:

Step 0: Obtain MkLinux

This takes a while! I downloaded the MkLinux Pre-R2 ISO CD-ROM image maindisc.img-old from ftp://ftp.mklinux.org/pub/cdimages/.

You can also download MkLinux from one of the many mirrors (some of which work better than others) listed at http://www.mklinux.org/mirrors.html. Note that the Pre-R2 "maindisc.img-old" disc image may no longer be available when you download MkLinux, but unless something changes drastically in the way MkLinux should be installed, these directions should still apply.

After downloading, I opened Toast and burned a CD from the image file.

While you could probably use Toast to mount the CD image and then burn the volume to a CD-R, you shouldn't get into this practice - other Linux distros distribute hybrid images which will not burn correctly if you do this.

If you don't have the time or desire to download 650MB from the internet, you can always get a pre-burned CD delivered to you. See the MkLinux webite for details.

Step 1: Repartitioning the Hard Drive

I booted my 5300ce off an external SCSI hard disk with a SCSI CD-ROM attached. The external HD already had a full install of Mac OS with lots of disk utilities on board, but you could also boot from a Mac OS CD to do this. I used Drive Setup to re-initialize my 5300ce's internal 500MB hard drive. I made two partitions: the first is of type Unallocated. The second is 60MB of Mac OS Standard (HFS). Make sure your first partition takes up all the remaining disk space, but don't format it with a file system. Alternatively, you can format the first partition as two seperate A/UX partitions. The first would be between 64 and 128MB of A/UX Swap and the second would take up all the remaining free space as A/UX root file system. Then you can skip most of the pdisk steps, but you'll still want to use pdisk to make sure the swap partition is named "Swap" and the root partition is named "/".

I then installed Mac OS 7.6 and OpenTransport 1.1.2 onto the 60MB partition. I also installed the current version of iCab and the drivers for my WaveLAN Silver 802.11b card so I could have network connectivity.

From the CD-ROM I burned of the MkLinux ISO image, I dragged the files in CDROM/MkLinux-install/ to the appropriate locations in the OS 7.6 system folder.
- MkLinux goes in the Control Panels folder
- MkLinux Booter and Mach Kernel go in the Extensions Folder
- lilo.conf and MkLinux.prefs go in the Preferences Folder

I opened the MkLinux control panel and clicked on the "Custom..." button. In the resulting SimpleText file ("lilo.conf") I changed the line that read rootdev=/dev/hdc to rootdev=/dev/scd0 so that the computer would look on the external SCSI CD-ROM for the MkLinux files.

I copied CDROM/Mac OS Utilites/pdisk to the hard disk.

I ran pdisk. The 1st (and only) internal drive on the 5300 is /dev/hda so I typed e /dev/hda to edit the partition map for my internal hard disk. I typed p to see a list of all the partitions on my disk. The big unallocated partition was partition 9 and labeled Apple_Free. Using pdisk, I then created two new partitions just for MkLinux. I typed c 9p 96m Swap and then c 10p 10p root. That deciphers to essentially the following: Create a new partition with 96megabytes from partition 9 and give it the name "Swap" and Create a new partition from partition 10 using all of the remaining space in partition 10 and name it "root." I typed p again to make sure I did things right. My two new partitions were numbers 9 and 10 (the HFS partition being renumbered to 11 from 10 automatically). Partition 9 was of type Apple_UNIX_SVR2 and named Swap while partition 10 was of type Apple_UNIX_SVR2 and named root. I then typed w (followed by a y for "yes") to save the new partition map, then I typed q and q again to exit the editor and the application respectively.
If you do everything the same way I have (with your Mac OS Standard partition the second partition you create in Drive Setup) you should practically be able to close your eyes and type in these directions being assured that they will work just as I said - you don't need to know how to use pdisk! This will work no matter what capacity drive you have, so long as you set it up as I have.

I was now ready to install MkLinux, so I restarted with the MkLinux CD-ROM still in the drive and using the built-in disk with Mac OS 7.6 as my startup disk.

Step 2: Installing Linux

When the dialog came up asking which OS to boot, I choose to boot MkLinux. After several lines of text being written to the display, the installer came up. I made the obvious choices in the setup (English language, US standard keyboard, etc) and that eventually brought me to the part where the installer presents the "Partition Disks" screen. Only one disk was listed, my internal hard drive /dev/hda (I'd disconnected the external SCSI hard drive during the reboot), so I chose it and selected "Done." At this point, you can choose Edit and run the Linux version of pdisk on your internal hard disk in case you need to change your partition scheme - if you skipped some of the above steps, you can do them now...

On the next screen, I selected /dev/hda10 from the list of partitions, then chose "Edit." I typed "/" as the name of the partition in the new dialog on the screen. Back on the main dialog, I picked "Done." I then chose "/" (or /dev/hda10) as my mount point and /dev/hda9 as my swap space.

I waited on the next screen ("Find installation files") for a while, and just as I was about to give the book the old three-fingered-salute, the installer showed some life bringing up the "Format Partitions" screen. I selected my root partition "/dev/hda10" and let the formatter go to town. Be prepared to wait quit some time for the installer to kick in. I was just about ready to restart my PowerBook when the installer started to work.

The next screen ("Components to Install") asks what set of software packages to install. With fewer than 400MB of disk space, I didn't have a lot of room to play with, so I chose to "select individual packages" so that I could get a minimal install but still get a functional X windowing system. If you don't care to muck about with the GUI, pick the minimal install - I think it was called "Server" or something.

I zipped through the next few screens selecting an ADB 1 button mouse and neglecting to configure my network interface (since I effectively don't have one anyhow...). I zipped through the next few screens too until I got to the screen for entering the root password. I was somewhat dismayed when I noticed that the characters I was typing didn't show up on the screen, but then I realized that this is normal behavior for this screen...

The next screen ("Info") showed what my root device is. I wrote this down and moved on to the "Done" screen, letting the 5300ce reboot.

Oh yeah, it also tried to auto-detect my display to get the settings right for X windows, but that failed. It then dumped me into the manual configuration (I tried several different LCD settings, but didn't check to see if the iBook setting would work - granted, it's a different video controler, but the LCDs are both 800x600...). I couldn't get that working either, so I chose not to start the X Server at login. If you want an X Windowing system, you'll have to look elsewhere to find the setup info. And if you find it, give me a shout!

Step 3: Configuring MkLinux

After the reboot, I allowed the 5300ce to boot into Mac OS. I then went to the MkLinux control panel and pushed the "Custom" button. Where the resulting SimpleText document says /dev/scd0 I changed the text to read /dev/hda10 to tell the MkLinux Booter extension to look for MkLinux on the 10th partition of the first IDE hard drive.

I then rebooted and allowed the MkLinux Booter to boot MkLinux. I entered "root" as my login and my root password. Then I mucked around a bit to see what I could do. Of course, startx didn't work nicely... So I gave it the old three-fingered-salute and booted back to MkLinux, which promptly inspected my filesystem to make sure I hadn't messed it up too badly when I rebooted...

I then logged back in as root and typed adduser Drew then passwd Drew. I typed in the password I would use as the user Drew. I logged out and logged back in as Drew with a functional Linux environment on my PowerBook 5300ce!