Welcome to AlphaSlack Linux for the Alpha platform!

Installation of AlphaSlack Linux has significantly improved from the earliest
days, where much of the work had to be done by hand.  Currently, the 
Slackware setup program will work almost completely for most people.  Those
looking to do more interesting installs on complicated setups may run into
some rough edges.  But for most people, setup should be easy.  It's almost
not even interesting anymore :)

That's not to say there aren't bugs.  The boot and root disk images are
quite volatile.  Please make sure that you are using the latest versions
of the appropriate disks before sending me any bug reports.  Chances are
I've already run across the problem and (hopefully) fixed it.


Contents
========
1. Choose your boot media
   a. Why wouldn't I choose to boot from CD?
   b. Making the required disks
2. Booting under SRM
   a. Floppy
   b. CD-ROM
3. Booting under MILO
4. Installing AlphaSlack
5. Making your machine bootable
6. Automatically booting into AlphaSlack
   a. Without aboot
   b. With aboot
7. Troubleshooting
   a. "Unable to mount rootfs"
   b. The bootdisk doesn't boot on my machine!


1. Choose your boot media
=========================
There are now two ways to install AlphaSlack.  If you've downloaded an ISO
image, you can most likely boot and install from CD.  Alternatively, you
can choose to make some boot floppies, boot from floppy, and install from
whatever installation source you want.  The currently supported installation
sources are CD, NFS, and a directory on your hard drive.  Installation
from floppy is not (and never will be) supported.

a. Why wouldn't I choose to boot from CD?
-----------------------------------------

If you've got the SRM console on your machine and you have a CD drive
hooked up to a SCSI card that SRM does not recognize, you will need to
boot from floppy.  Adaptec 2940 cards are really bad on this point.  If
you have an IDE CD drive or a SCSI one hooked up to a supported SCSI card,
you most likely want to boot from CD.  It's just cleaner.

Additionally, if you don't have a bootable ISO image, you will need to 
boot from floppy.  Making a bootable ISO image requires that you have a
machine with the "isomarkboot" utility to set up the ISO image for
booting.  If you don't have that utility, you're not going to be able to
make bootable ISO images.

At this moment, I haven't figured out the best system for distributing
bootable ISO images.  So while CD booting is the nicest way to go
about doing things, booting from floppy will be the most common thing
to do until some sort of release has been made.  Stay tuned.

b. Making the required disks
----------------------------

You will need three floppy disks, in addition to whatever media you store
the AlphaSlack packages on.  The first disk is the bootdisk, which contains
only the kernel and the second stage bootloader (aboot).  The second disk
is the first half of the root filesystem, which gets loaded into a ramdisk.
The third disk is the second half of the root filesystem, whose contents
also get copied onto the ramdisk.

The bootdisk can be found in the /bootdsks.144 sbudirectory of the
distribution tree.  Simply copy the appropriate kernel image to a floppy
disk using dd under Unix, like so:

   # dd if=generic.s of=/dev/fd0

The two halves of the root filesystem can be found in the /rootdsks
subdirectory of the distribution tree.  Again, use dd to create these
two floppy disks.


2. Booting under SRM
====================

a. Floppy
---------

Stick the boot floppy into the floppy drive and turn on your machine.  At
the SRM prompt, issue the following command:

   P01>>> boot dva0 -flags 0

The bootdisks all have an /etc/aboot.conf file present, with the following
line in them:

   0:1/vmlinux.gz root=/dev/fd0 rw load_ramdisk=1

The -flags 0 tells aboot that you want to use the line marked "0" in the
aboot.conf file.  By doing this, you will not have to worry about passing
those arguments yourself.  After a while, the kernel will (hopefully) boot, 
and you will be prompted for the root disk with the following message:

   VFS: Insert root floppy disk to be loaded into RAM disk and press ENTER

Remove the bootdisk and insert the first of the two root floppies.  Then
hit enter.  There will be more waiting as the kernel very slowly 
decompresses the ramdisk image and mounts it.  Once this process is complete,
you'll be greeted with the following message:

   Please insert the second root filesystem disk (color2.img),
   and hit [enter] to continue

Remove the first rootdisk and insert the second one.  Then press enter.  Again,
please wait as the contents of the second disk are decompressed and copied
into the ramdisk.  Once this process is complete, you will be given yet
another message, and finally a root prompt.  Log in as root.

b. CD-ROM
---------

Assuming you've gotten your hands on a bootable ISO image, booting and
installation will be very easy.  It's almost completely uninteresting.
First, you will need to figure out what your CD-ROM device is called.  Typing
"show dev" at the SRM prompt will help you out.  IDE drives will be named
something like "dqa1" while SCSI drives will be named something like "dka1".

Second, you will want to know which kernel to use for your machine.  The
WHICH.ONE file in the /kernels directory will help shed some light on that
problem.  Knowing those two pieces of information, you can now boot.  On
one of my machines, I would boot the CD like so:

   P01>>> boot dqa0 -file /kernels/generic.s/vmlinux.gz -flags \
          "root=/dev/ram initrd=/rootdsks/ramdisk.gz"

If you type that in as one long line, drop the backslash off the end.
Basically, you want to substitute your settings into that example boot
command.  Instead of "dqa0", use whatever corresponds to your device.
Instead of "/kernels/generic.s/vmlinux.gz", use whatever filename leads
to the kernel you want to boot.  If you wanted to boot the avanti.s
kernel, you'd use the "/kernels/avanti.s/vmlinux.gz" filename.  Leave
everything else alone.

Boot messages will fly by, and eventually you will be dumped at a login
prompt.  You're now ready to install AlphaSlack.


3. Booting under MILO
=====================

I have not yet tested booting the bootdisk/rootdisk combination on a MILO
system.  If you do this, please let me know how it works out.  At this
point, AlphaSlack is not designed to operate on MILO machines.  I 
currently have one such system, but installation is a completely manual
procedure.  This is scheduled to be fixed once I get the major bugs out
of the SRM procedure.


4. Installing AlphaSlack
=======================

At this point, it is time to partition your hard drive and install
AlphaSlack onto it.  If you are using a machine with SRM, you need to make
one decision first: do you want to be able to boot off the hard drive
or not?  If you do want to boot off the hard drive (most people will
want to), you will need to set up the device with a BSD disklabel.  If
you do not, a regular partition scheme will do.

The rest of this document assumes that you use SRM to boot, and that you
want to be able to boot off the hard drive.  If you don't care to boot
off the hard drive, you need to make your partitions like you normally
would, then run setup.  This is very similar to the installation
procedure on Intel machines.

For the majority of you that will want to be able to boot off the hard
drive, it is not a difficult procedure.  You will need to use fdisk to
create a BSD disklabel on the drive.  Once you start to make partitions,
leave about five megs free at the very beginning of the drive.  This is
where you will install aboot to later on.

Also, you will notice that the BSD disklabel includes a third partition
that takes up the entire device.  This is completely normal.  Never touch
that partition, as doing so will most likely destroy your filesystems.
setup will not touch this partition at all during installation, and will
take some precautions to make sure that you do not attempt to use it
in any way.

Now that you've partitioned the drive and written that partition table
out, run "setup" like you would on an Intel machine.  On the Alpha,
setup has had some magic added to it that allows it to treat BSD disks
exactly like normal DOS disks.  I will assume that you are familiar
with installing AlphaSlack, so I will not cover the various install
options and all that.  If you are not familiar with the installation
process, please check out our website for more information.


5. Making your machine bootable
===============================

If you've got a machine with hardware that SRM will not boot from (for
example, the Adaptec 2940UW controller), or you want to boot from a floppy
disk, setup will already handle making your machine bootable.  All that
you need to do is have a floppy disk available.  setup will prompt you
to make an aboot bootdisk.  Say "ok", and setup will create a disk with
the installed kernel and an aboot.conf file with the right options.  You'll
then be able to boot AlphaSlack by typing the following at the SRM prompt:

   P00>>> boot dva0 -flags 0

If you want to boot off the hard disk, setup is not yet able to do that.  
This is planned to be added sometime in the near future, certainly before any 
real public release of this port.  For now, you will need to do a little work 
on your own.  Here are some guidelines for those of you using aboot to boot 
the machine.

AlphaSlack installs the aboot program to the destination device.  This
includes the bootlx secondary bootloader file, as well as a variety of
programs that write this file to the proper location.  Assuming you followed
the advice in the installation section, you should have about five megs free
at the head of your hard drive.  Now, you can use the "swriteboot" program
from the installed system to make the drive bootable.

First, finish up with installation and configuration of your system from
inside the setup program.  Once you're done with that, setup will advise
that you go ahead and reboot to use your system.  Don't do that yet.  You'll
notice that the installed system is still mounted under /mnt.  This gives
you access to both swriteboot and the bootlx file.  Write bootlx to the
beginning of your drive like so:

   # /mnt/sbin/swriteboot /dev/sda /mnt/boot/bootlx

Substitute your actual device in for "/dev/sda".  When using BSD disklabels,
you will need to force the issue, using the -f flag.  swriteboot will
tell you all about it.

You may wish to set up the etc/aboot.conf file under your installed system
to make it easy to boot.  Look at the aboot.conf.example file for a simple
example.  Here's my aboot.conf file, with an explanation:

   0:1/boot/vmlinux.gz ro root=/dev/sda1

0 is a unique identifier, which allows you to pick which line to boot.
4/boot/vmlinux.gz indicates that the kernel is /boot/vmlinux.gz, and can be found on
the fourth partition.  "ro" is a kernel flag for mounting the filesystem
read-only, and "root=/dev/sda4" is another kernel flag indicating which
device is the root.  After writing an aboot.conf file, use abootconf to
configure aboot with this file:

   # /mnt/sbin/abootconf /dev/sda 4

/dev/sda is the device with /etc/aboot.conf on it, and 4 indicates the fourth
partition.

For a much more in-depth discussion of all this, check out the SRM
howto available at the following URL:

   http://www.alphalinux.org/faq/srm.html


6. Automatically booting into AlphaSlack
=======================================

a. Without aboot
----------------
Configuring the SRM console to auto-boot the system is actually quite easy.
All you need to do is set four SRM variables.  The variables you need to set
are:

   boot_file
   boot_osflags
   bootdef_dev
   auto_action

To set an SRM variable, enter it like this at the console:

   P00>>> set VariableName VariableValue

In most cases, you will probably want to set it like this (edit to fit
your machine):

   P00>>> set boot_file vmlinux.gz
   P00>>> set boot_osflags root=/dev/sda1
   P00>>> set bootdef_dev dka0
   P00>>> set auto_action BOOT

The first variable ("boot_file") sets the name of the kernel to boot.  The
second variable ("boot_osflags") defines the flags to pass to aboot when
booting - in this case only the name of the root filesystem but you could
add more kernel parameters if needed.  The third variable ("bootdef_dev")
specifies the name of the default boot device (using the SRM naming scheme).
In this case, dka0 is the name of the first SCSI hard drive.  dva0 represents
the first floppy drive; type "show dev" to see a complete list of all SRM
devices available to you.

The last variable ("auto_action") tells the SRM console what to do when
booting.  Possible values are BOOT or HALT - boot will auto-boot the OS
(which is probably what you want) and HALT will drop you to an SRM prompt.
After setting the variables, you can just type "boot" (or even "b") at the
SRM prompt to boot Linux with the values defined in the variables.

If you configured them correctly, it should now boot perfectly.  If you
set "auto_action" to BOOT, the machine should be able to boot without
any user intervention.

b. With aboot
-------------
If you'd like to use aboot to manage booting up the system, it's even easier
than the previous section discussed.  First, you'll need an aboot.conf file
with lines for each boot option you'd like.  Setting up aboot.conf was
discussed earlier.  Then, just set "boot_osflags" to the line in aboot.conf
that you want to boot up:

   P00>>> set boot_osflags 0

That corresponds to the line in /etc/aboot.conf that has the kernel and
kernel options that you wish to use.


7. Troubleshooting
==================

Here's some answers to a few possible problems that could arise.

a. "unable to mount rootfs"
---------------------------
First, have you checked that you are passing the right options on the SRM
command line to the bootdisk kernel?  If you are and problems still persist,
it's probably just a bad floppy disk.  Throw it away, and make a new one.

b. The bootdisk doesn't boot on my machine!
-------------------------------------------
I'm sorry, but there's currently nothing that I can do.  Please help by
telling me what kind of machine you have, what kind of hardware is in
it, and what caused the bootdisk to fail.  I'm perfectly willing to create
additional bootdisks, but I do not have access to all the various types
of machines.

- Mario Stabrey
  <masta@alphaslack.de>
