Slackintosh 8.1 installation for OldWorld Macs
last updated 17 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; they can only be used in conjunction with the Slackintosh CD-ROM.
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 creating
a 'small' (about 100MB) partition to hold your kernels as your first partition, but please read
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
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:
- quik seems to have problems with storing its files on 'large' partitions:
-
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."
- 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 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.
- quik may have problems accessing data past the first 8 GB of your hard disk.
- The second stage bootstrap, quik.conf, and the kernels
should all be in the same filesystem, and on the same physical disk as the first stage bootstrap.
- Unlike LILO, you can't use compressed kernels.
- Unlike LILO, the files referred to in quik.conf should not be symlinks. They should be the actual names of the files.
- The filesystem containing your kernels and quik.conf must 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:0
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 separate filesystem for /boot. On my system this is the first Linux partition (/dev/hda2) on the disk.
- Kernels, first and second stage bootloaders, and quik.conf stored in the top-level directory of this filesystem/partition.
/boot/quik.conf
init-message = "Slackintosh 8.1.\n"
partition=2
root=/dev/hda3
timeout = 50
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_UNIX_SVR2 boot 204800 @ 64 (100.0M) Linux native
/dev/hda3 Apple_UNIX_SVR2 root 2868800 @ 204864 ( 1.4G) 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):
printout of mount
root@diane:~# mount
/dev/hda3 on / type ext2 (rw)
/dev/hda2 on /boot type ext2 (rw)
/dev/hda4 on /usr type ext2 (rw)
/dev/hda5 on /usr/local type ext2 (rw)
/dev/hda7 on /home type ext2 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /proc type proc (rw)
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.
- 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.
Wait... I thought you said you stored your kernels in /boot?
Nice catch. You noticed an apparent discrepancy between my contention that kernels, bootloaders, and quik.conf are all stored in /boot and
the fact that quik.conf clearly states that vmlinux is stored in the root directory. Here's the explanation:
Since quik's second-stage loader actually reads the ext2 filesystem to find your kernel,
it needs to know the file location from the filesystem's point of view (as opposed to your overall tree's point of view).
So, if you have kernels and quik.conf in separate partition /dev/hda2, mounted
as /boot, your quik.conf would need to look something like this:
partition=2
image=/vmlinux
label=Linux
... since vmlinux, while it's /boot/vmlinux in your overall tree, is /vmlinux in the filesystem on partition 2.
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/boot (where /mnt/boot has been created as a separate filesystem).
- Create a /mnt/boot/quik.conf file similar to the above. Use the pathnames that they will have (that is, pathnames
relative to the logical filesystem they're in, omitting the /mnt/boot part).
- Execute quik -v -r /mnt -C /boot/quik.conf (this tells quik to treat /mnt as the real root of your filesystem tree, to
use the quik.conf in /boot
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 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
Miscellaneous Q and As
Motorola Starmax specific
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
.
Revision history
- 17 July 2002 - revised partitioning recommendations, added additional links, minor other revisions
- 12 July 2002 - initial version