Department of Mathematics, Statistics
and Computer Science
Wim Ruitenburg's MSCS 206 linux learning 971004
We choose to install Slackware linux. To install linux, we need to
know what our source and destination devices are.
Where exactly is the source? About two weeks ago we copied
Slackware from several well-known web site repositories to our local machine
warrior.mscs.mu.edu (not currently available) in the directory
/home/ftp/pub/slackware. It was reachable with your browser as
ftp://warrior.mscs.mu.edu/pub/slackware/.
We are going to install linux over the Net onto our PC using this site. This
is why we have an Ethernet card in our PC, and a connection for the Internet.
What is the destination for linux? Our PC, of course, but that is not
enough information. Slackware wants to know the exact memory device on which
we are going to put linux. Inside our PC we have a SCSI hard disk. That
is the information Slackware needs.
Now that we know our source and destination devices, we can select
which boot disk file to get from
ftp://warrior.mscs.mu.edu/pub/slackware/bootdsks.144/ (not currently
available).
Network installation with an Ethernet card requires that we uses the NFS
(Network File System) driver; writing on a SCSI drive requires the scsi driver.
From the WHICH.ONE file at our ftp site we read that we need the image
scsinet.s. Get this file `raw' copied on a 1.44M floppy.
We also need a root disk.
Almost always this is color.gz from
ftp://warrior.mscs.mu.edu/pub/slackware/rootdsks/ (not currently available).
Copy this `raw' to a floppy.
We connect the PC to our local Ethernet loop, put the boot floppy in
drive A, and reboot. The computer lists some info on the screen and prompts
boot:
At this moment we can pass parameters.
These parameters mostly involve managing an existing linux installation with
problems (the boot disk can also be used for recovery operations).
In our case we want to install afresh. So just hit the <enter> key.
The computer passes all kinds of further useful information.
Then it asks us to insert the root disk and hit <enter> again.
We comply.
The computer passes all kinds of further useful information.
Then it prompts
slackware login:
At this moment we can login as root (without password).
Sometimes we want to see some of the useful information that passes over the
screen.
By hitting <shift><pageup> we can scroll one half screen back at
a time.
By hitting <shift><pagedown> we move one half screen down.
In what state is the PC right now?
A tiny linux version is running as kernel, and part of main memory is set aside
as hard disk.
Whatever command you (try to) execute, it is found on this socalled RAM disk
in main memory.
Files that are stored on the hard disk, or the network card, are `invisible'
at this stage.
Now it is time to prepare the hard disk.
The hard disk contains a socalled boot record on its outer cylinder that is
used by the computer to find out where to look for the files.
In particular, once linux is installed on the hard disk, the PC must be able to
find the linux kernel when the machine is turned off and back on again.
So this boot record mechanism must work at a very primitive level, before linux
(or DOS for that matter) itself can take over.
We have to put information on this boot record so that the PC knows where to
read or write files on the hard disk.
By scrolling back we read that there is a special command fdisk on our RAM disk
specially designed for that purpose. Type
fdisk
The program automatically finds /dev/sda, our primary (SCSI) hard disk.
With fdisk we now must create partitions.
The built-in help menu assists along the way.
We create the following partition (use p to display it on the screen):
Device boot
/dev/sda1
/dev/sda2
/dev/sda3
Begin
1
995
251
Start
1
995
251
End
250
1010
994
Blocks
519219
33232
1545288
Id
83
82
83
System
Linux native
Linux swap
Linux native
You don't yet have to know what all this means, just the main points.
We can divide the hard disk into 4 chunks, called partitions.
We created 3, called sda1, sda2, and sda3.
When we do, fdisk asks how big to make them.
I prefer to choose cylinders, from an odd number to an even number.
As we have a 2GB disk with 1010 cylinders, a little arithmetic tells you how
many bytes there are on each cylinder.
Each newly created partition has type Linux native (with code HEX 83).
Those are the regular linux partitions where files will go.
Why do we choose 3 partitions, and one of them called swap?
It is advisable to always have one socalled swap partition.
Such a chunk is used by linux as an overflow area for main memory.
We choose a swap partition of a size about equal to main memory.
Use the l command to see a list of possible partition types, and then
t to set the type for a particular partition (in our case partition 2).
Why did we divide the remainder into 2 Linux native partitions instead of 1?
We could indeed have turned the remainder into one large Linux native
partition, but we prefer to put linux itself on one partition, and the user
accounts on another.
Just in case a user mistakenly overflows the user account area.
We estimate that linux and all other system stuff should fit in 500MB.
the remainder will be user area.
Save the partition settings and quit.
The linux installation program (on our RAM disk, we still run the tiny
linux of the 2 floppies) is called setup. Type
setup
The program guides us through a series of steps.
The following is the list that we do, the others will be skipped.
We give only brief descriptions.
ADDSWAP. We must select a swap partition (we have only one), and use
formatting and swapon to enable it for use.
TARGET. We have to choose where our root directory / is going to be.
Recall that in UNIX the files are ordered like leaves on a tree of
directories. There is one base point called the root, and written /. We
choose /dev/sda1 as the place for this root point (despite its name
/dev/sda1, this disk partition is not part of the tree hierarchy yet.
Rather, it is mounted, as a `dumb' device, as a substructure on the Ram
disk. This is always confusing in the beginning). The other Linux native
partition, /dev/sda3, can be used to store files of a subtree. We choose to
identify the partition /dev/sda3 with the internal subdirectory /home, where
the user accounts on linux are going to be.
SOURCE. We decide to install over the Net, so we select the NFS
(network file system) option. Now the install program needs to know a lot
more about our local network. Most data that follows is provided by the
department or the university, although some can be found out by those who
know how to use the UNIX functions nslookup and traceroute.
The department lends us the IP address 134.48.4.79. Recall that this really
is a short for the binary number (without the dots which I only left in as a
visual aide)
10000110.00110000.00000100.01001111
A left part of the string is our local group address, the tail is the
individual machine address. The netmask involves the question which
left part is the local group address. This is indicated by the bit string,
with the obvious meaning,
11111111.11111111.11111110.00000000
In decimal form this reads 255.255.254.0, which is what we type in as our
netmask. Next comes the gateway, which is the IP address of the device that
is designated to facilitate communication between our local group and the
outside world (in practice all machines with an IP address that differs in a
netmask level bit position). I don't think we need it, because in our
situation all our communication will remain in our local group. Anyway, the
number happens to be 134.48.4.100, and we type that in. Next the IP address
of the source machine, the one that has the linux files stored in its file
system. In our case the source is on warrior.mscs.mu.edu mentioned above; it
has IP address 134.48.4.141. Finally, we have to tell where on this source
machine the downloadable packages are. We put the collection in directory
/home/ftp/pub/slackware/slakware.
DISK SETS. With our web browser we can see lots of subdirectories in
ftp://warrior.mscs.mu.edu/pub/slackware/slakware/ (not currently available).
Each subdirectory
contains a collection of files of such a size that they could fit on one
floppy disk. For that reason these directories are called disks, and the
groups of disks with identical letter code are called disk sets. We can
select to install some, or all, of these. Moreover, as our first choice, we
could install our own `disk sets' if we had any. We don't have any, but we
will install everything else. In `quiet' mode, otherwise we are asked very
many times `do you want to install this.' Now automatic installation of all
files starts. This takes enough time to get a cup of coffee.
CONFIGURE. Now that all files are on the disk, we must place final
information such that the computer after rebooting can become the big linux
system running off the hard disk. The key file you need is a kernel. This
kernel runs the computer at the most basic level and is internally known to
linux as /vmlinuz. After rebooting and some configuration stages it is put
in main memory to keep the system running. This kernel must, among other
things, understand how to communicate with all your devices, including the
network card and the SCSI hard disk. A good choice is to select the kernel
from the floppy disk scsinet.s, because its kernel apparently knows these
two critical devices well enough to let us install the linux files in the
first place. We need not make any backup floppies of this kernel; the
scsinet.s disk plays that function for us. In principle we could now go to
EXIT below, and reboot. Instead, we decide to install the mouse and
re-program our network connections. The mouse is easy; it has two buttons
and a round plug that sticks into a special round connection in the back. So
it is a PS/2 mouse (NOT a Microsoft mouse, although it says so on the rodent
itself). As to the network parameters, these are exactly the same as the
ones we used above to download the files from warrior to this new machine,
except that two more pieces of information
are needed. First we must set the name of our machine. This information is
pre-chosen by the department. It turns out that for 134.48.4.79 the
department has chosen the name guest. Second, we must give the IP address of
our domain name server. This so-called DNS is a computer on the Net that,
among other things, translates name strings like warrior.mscs.mu.edu into
their corresponding IP addresses, like 134.48.4.141. The university happens
to have a DNS, and its number is 134.48.1.32. Our name guest and IP address
134.48.4.79 are already in there.
EXIT. Exit.
Make sure that no floppies are left in the drives, and reboot. We log
in as root, and set a password as fast as we can. Then we ping several other
machines on the Net, and do some telnets. The system is up and running. We shut
the machine down by typing
shutdown -h now
Last updated: November 1998
Comments & suggestions:
wimr@mscs.mu.edu