Slackintosh 8.1 installation for OldWorld Macs
last updated 13 July 2002
Overview
This installation procedure uses a pair of boot/root disks that allow OldWorld Macs to easily use
the full Slackware installation procedure (rather than manually running installpkg commands).
These disks are based on the boot/root set Keith Keller put together (which, in turn, were based on the
Debian boot floppies). These, however, have modified to boot in three stages:
- Loading the kernel with a miBoot floppy
- Loading a small initial root filesystem from the second floppy
- After detecting and mounting the Slackintosh CDROM, loading the final root filesystem from it
They are not useful as standalone 'rescue' type disks, only to bootstrap the full Slackintosh installation environment.
They currently don't support installation over the network, though I imagine that could be added.
I have only done a full installation on a Motorola Starmax 4000/160, so
I can't be sure that these floppies will work on other machines.
Disclaimer
THE FOLLOWING INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL THE AUTHOR BE HELD LIABLE FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF
THE INFORMATION. THIS INCLUDES, BUT IS NOT LIMITED TO DIRECT DAMAGES, INDIRECT DAMAGES, INCIDENTAL DAMAGES, CONSEQUENTIAL DAMAGES, SPECIAL DAMAGES AND LOSS OF BUSINESS
PROFITS.
Directions
Note: these are installation directions for a completely bare hard drive (i.e. without MacOS). I'm sure you'll need to do different things
if you want to set up a dual boot system. The directions also assume you have a UNIX system available.
Installation
- Download the current Slackintosh tree using rsync:
rsync -avz rsync.slackintosh.exploits.org::slackintosh-8.1 /destination-directory
- Use the script supplied with the tree to generate an ISO image and burn it to CD.
- Download the two floppy images:
- Write them to two floppies:
dd if=slackintosh-bootdisk-1.bin of=/dev/fd0
dd if=slackintosh-rootdisk-1.bin of=/dev/fd0
- Boot the first floppy. The floppy masquerades as a MacOS boot disk, so it needs to be booted by the Mac ROM. Unless you've
started messing with Open Firmware, it should "just work."
- Linux should load and prompt you for the second disk.
- After loading the filesystem on the second disk, it begins looking through your IDE devices for
a CDROM. You should make sure that your Slackintosh CD-ROM is loaded in the drive before you get to this point.
- You may see some DMA-related error messages at this point as the system tries to mount the CD-ROM. It should eventually work, however.
- If it can't automatically mount a CDROM, it will prompt you for a device node from which it should attempt to mount
the CDROM. This will probably be necessary for machines with SCSI CD-ROM drives. (The device node is of
the form /dev/hdc or /dev/sda or something similar to this.)
- Once it has mounted your CDROM to /cdrom, it will attempt to decompress
/cdrom/boot/root.gz to /dev/ram1. If this fails, it should tell you so.
- The system will now mount this new filesystem and use the pivot_root utility to swap it into place as the
root filesystem. A couple of useful utilities will be copied to the /sbin2 directory on the 'new' root filesystem.
The old root filesystem will be unmounted, the memory it used deallocated, and the initialization
scripts from the new root filesystem run.
- You can now install as usual. (i.e., partition using fdisk and run setup) I would suggest
reading through the whole document before you make any partitioning decisions.
Installing a bootloader
Even though all the files Slackintosh will need to run are presumably on your hard drive at this point, you'll still
need to set up a bootloader. This is done with two separate entities: Open Firmware and quik.
Open Firmware plays the same role as a PC-compatible's BIOS. It's the first thing 'run' by the computer after boot, and normally
hands things off to the Mac ROM when it's done doing its thing. However, you can set it to boot an arbitrary
filesystem on your hard drive or floppy. (Keep in mind that with IDE it's confined to booting from master devices,
and reportedly on some platforms confined to booting the master device on the primary channel.)
To access Open Firmware, press and hold down Command-Option-O-F as the machine boots. If you don't have the keys
down by the time the chime ends, it will probably not go
into Open Firmware. I found that the system also occasionally ignores the key combination during warm boots.
If you hold down the keys and your machine halts on a black screen, the problem is probably that your
firmware is set to do its I/O through a serial port, rather than with the screen and keyboard. Your
options at this point for remedying the situation are:
- hooking up another machine to the serial port to act as a console
- downloading a MacOS program called "BootVariables" to change the settings from within MacOS
- using a Linux program called nvsetenv to alter the settings
I chose the third option. Right now, Slackintosh proper doesn't include nvsetenv, but the root floppy
will place a copy of it in /sbin2 so that you can use it during the installation process.
nvsetenv's syntax is very simple:
- nvsetenv - will print all Open Firmware variables
- nvsetenv [variable] - will print the value of variable
- nvsetenv [variable] [setting] - will change the value of variable to setting
- nvsetenv [variable] "" - will clear the value of variable
For many machines all you need to do is change input-device to kbd and output-device to
screen. However, some might need special settings; penguinppc.org has a list of these at
http://penguinppc.org/projects/quik/quirks.shtml.
Additionally, you'll probably want to set auto-boot? to false ... at least while you're testing.
I strongly strongly suggest making sure that you can access Open Firmware interactively at boot before you continue.
Relying on using nvsetenv or "BootVariables" exclusively
may leave you in a position where your system is left unable to boot correctly. If this does happen, you can, as
a last resort, use Command-Option-P-R at boot to reset the Open Firmware to factory settings. Be warned; if you do this, you
may reset your input-device and output-device to your machine's serial port, leaving you
in quite a predicament.
Here are some commands you might find useful inside of Open Firmware:
- boot [device] - boot from specified device
- bye - boot from the Mac ROM
- printenv - print the Open Firmware settings
- setenv [variable] [setting] - change a Open Firmware variable to 'setting'
In any case, now that you've made sure you have a way to easily alter Open Firmware settings, let's take a look at
quik.
Open Firmware can't load your Linux kernel on its own easily (if at all). That's where quik, a LILO-like
kernel bootloader, comes in.
In short, you tell Open Firmware to boot a disk/partition on which you've installed quik.
quik is segmented into a first stage (stored on the partition's bootblock) and a second stage loader (which is stored
in the partition's filesystem). The first stage is only smart enough to load
the second stage into memory. The second stage is able to read ext2
partitions (though somewhat imperfectly) and will first read the quik.conf file (normally stored in /etc)
and then present a menu of whatever options have been configured in quik.conf.
After the user has chosen a kernel (or the timeout has expired) quik will then load and execute whatever
kernel is chosen (or is the default).
There's a whole host of restrictions on quik that are important to understand:
- Whether by accident or by design, the quik second stage ext2 code seems to be unable to load a
kernel if it's not stored in the top-level of whatever filesystem the kernel is in.
- There also seems to be a maximum size that a kernel can be for it to be successfully loaded. For example,
after I installed Slackintosh 8.1, I found two different kernels: /vmlinux (3,536,323 bytes) and /boot/vmlinux
(3,997,287 bytes). Using quik to boot /boot/vmlinux (after copying it to the top-level directory, of course)
resulted in an immediate "image too large" error, while
/vmlinux loaded without error. The best solution to this, once you have a functioning system, is
to compile and install your own kernel with only the drivers
your machine needs to boot compiled in, with all others compiled as modules.
- Both the second stage bootstrap and the /etc/quik.conf file (and presumably the kernels as well)
must be on the same physical disk (though reportedly not necessarily the same partition)
as the first stage bootstrap.
- Unlike LILO, I don't think you can use compressed kernels.
-
Reportedly, there may be problems if you move a kernel into position rather than copying it. The same report mentions that the
quik.conf file needed to be placed in the top-level directory as well.
- Another report that quik may have problems with "inodes over a certain number."
- Unlike LILO, the files referred to in quik.conf may not be symlinks. They must be the actual names of the files.
- The filesystem containing your kernels and quik.conf should be ext2.
This is the setup I ended up using successfully:
dump of Open Firmware settings (from nvsetenv, my changes in red)
little-endian? false
real-mode? false
auto-boot? false
diag-switch? false
fcode-debug? false
oem-banner? false
oem-logo? false
use-nvramrc? false
real-base 0xffffffff
real-size 0x100000
virt-base 0xffffffff
virt-size 0x100000
load-base 0x4000
pci-probe-list 0xffffffff
screen-#columns 0x64
screen-#rows 0x28
selftest-#megs 0x0
boot-device ata/ata-disk@0:3
boot-file
diag-device fd:diags
diag-file
input-device kbd
output-device screen
oem-banner
oem-logo
nvramrc
boot-command boot
Partitioning/kernel location
- A partition mounted as root which contains both the /boot and /etc directories. On my system this is the first Linux partition on the disk.
- Kernels stored in the top-level directory of this partition.
/etc/quik.conf
partition=3
root=/dev/hda3
timeout = 100
default = linux
image = /vmlinux
label = linux
printout of mac-fdisk /dev/hda
root@diane:/# mac-fdisk /dev/hda
/dev/hda
Command (? for help): p
/dev/hda
# type name length base ( size ) system
dump: name /dev/hda len 8
/dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/hda2 Apple_Bootstrap bootstrap 1600 @ 64 (800.0k) NewWorld bootblock
/dev/hda3 Apple_UNIX_SVR2 root 3072000 @ 1664 ( 1.5G) Linux native
/dev/hda4 Apple_UNIX_SVR2 usr 4096000 @ 3073664 ( 2.0G) Linux native
/dev/hda5 Apple_UNIX_SVR2 usrlocal 12288000 @ 7169664 ( 5.9G) Linux native
/dev/hda6 Apple_UNIX_SVR2 swap 2048000 @ 19457664 (1000.0M) Linux swap
/dev/hda7 Apple_UNIX_SVR2 home 3072000 @ 21505664 ( 1.5G) Linux native
/dev/hda8 Apple_Free Extra 15554838 @ 24577664 ( 7.4G) Free space
Block size=512, Number of Blocks=40132502
DeviceType=0x0, DeviceId=0x0
Command (? for help):
Some comments:
- In quik.conf, I found that the partition= line was essential to a successful boot. This value is the number of the partition where your kernels
are stored (possibly also quik.conf).
- If I had it to do over again, I would try a configuration using a dedicated /boot partition at the beginning of the drive to hold both my kernels and
the quik.conf file; however, I'm not sure that would work, and the configuration I've
described has worked fine for me so far.
- Realize that once you change boot-device, the system will no longer automatically load the Mac ROM, which is responsible for starting up the miBoot
floppy. You will need to issue the "BYE" command to Open Firmware to load the Mac ROM and boot from the floppy again.
- I don't think I actually needed to create the bootstrap partition at /dev/hda2 ... from what I understand this is only used by NewWorld machines.
I strongly recommend glancing through some of the additional resources listed below before getting elbow-deep in quik and Open Firmware. The instructions
I give here are neither comprehensive nor are they intended to substitute for the more comprehensive quik and Open Firmware references listed below.
And finally, an executive summary of what you should do once you've installed all your Slackintosh packages and before you reboot.
- Make sure that any kernels you want to use are copied to /mnt (the root directory of your new installation).
- Edit the /mnt/etc/quik.conf file to reflect the kernel images that you want to use. Use the pathnames that they will have (that is, omit
the /mnt part).
- Execute quik -v -r /mnt (this tells quik to treat /mnt as the real root device and to tell you what it's doing in detail).
- Make the necessary changes to Open Firmware (primarily, set boot-device to the Open Firmware path for the disk/partition where you've installed
quik). You can either reboot and jump into Open Firmware to do this, or use the nvsetenv command in /sbin2.
- Once all these changes have been made, you should be able to boot Linux by issuing a boot command at the Open Firmware prompt (or, if you've left auto-boot?
set to true, by just letting the system restart).
Additional resources
Installation overviews
Open Firmware
quik
The Motorola Starmax
Comments?
I have successfully used these floppies and instructions to install Slackintosh on my Starmax 4000/160.
They have successfully booted into the installation environment on a beige G3 as well.
Other than that, I have no idea whether they work. If you use them successfully, please drop me a line at
m
a
q
(at)
n
o
c
t
r
l
(dot)
e
d
u
.