Here are some notes I have made based on installing Red Hat Linux version 6.0 on a Pentium system running a PCI bus motherboard. These notes are designed to supplement Red Hat's own installation instructions and not to replace them.
Unix Support maintains an NFS server with, among other stuff, a
mirror of the Red Hat distribution. The server is called
nfs-uxsup.csx.cam.ac.uk
and the directory containing the
mirror is /linux/redhat
. This is NFS exported to the
world. It is also available via anonymous FTP from the same
machine. Login as user ftp or anonymous and give any old junk as your
password (though it is tradition to give your e-mail address). The
mirror can be found in /pub/linux/redhat
.
These notes assume you have an ethernetted PC connected to the University network. If you don't then I'm afraid you're out of luck here. These notes also assume a small degree of computer literacy and intelligence on the part of the installer; they do not constitute a recipe that can be blindly followed.
There are certain bits of information about your hardware that you
will need to know before you proceed with installing Linux. On a PCI
based system, many of the cards can be autodetected. However, you
will need to know certain facts. Unfortunately, because the retail
world seems to grovel at the feet of Bill Gates it is often hard to
find out exactly what sort of hardware you have. The shops will
typically tell you "Don't worry; it's Windows-compatible." and ignore
any technical questions. More worryingly, even if you precisely spec
a machine for purchase some vendors have been known to deliver
something different, saying that they've given you something better at
no extra cost. So pore over the paper docs that came with your
hardware, run the MS-DOS msd
(MicroSoft Diagnostic)
program from a floppy or your hard disc (if you have a copy of MS-DOS
already installed), scour the startup screens when MS-DOS boots but
get the following critical information:
WARNING: Monitors can be very heavy and very, very unweildy. Even if your monitor is not on the large side, if you need to move it to get at the back it is still worth asking a friend to help. This can save bending over it and lifting at bad angles for your back.
As part of networking your system, whether as a Linux box or as an
MS-DOS box, you will have been assigned an IP address and a name by
ip-register@ucs.cam.ac.uk
. You should have a copy of
this letter, even if someone else (e.g. your CO) applied for the
number. The letter asks that it be passed on to the person
immediately responsible for the system. The letter has the following
information:
131.111.8.2
".
This is the number that is unique to your computer and corresponds to
your machine's name. NB: This is a fake IP address for the
example. This is NOT your IP address. 255.255.255.0
though some (typically large) departments have the value
255.255.0.0
. Other institutions will have still
different numbers. 131.111.8.62
. bootes.cus.cam.ac.uk
" into
131.111.8.1
for example. Some departments have their own,
in which case you will be told about it if the Computing Service knows
about it. Otherwise you will have been given the IP addresses of the
two central nameservers that we run: 131.111.8.42
and
131.111.12.20
. Pick one at random.Go, either by NFS or FTP to the top of the Red Hat mirror. By NFS
this is /linux/redhat
and by FTP it is
/pub/redhat
. We will refer to this as the "top level
directory". From there change directory to
updates/6.0/images/i386
. You need a copy of
bootnet.img
. You only need a copy of
supp.img
if you need support for PCMCIA cards. You only
need a copy of rescue.img
to do recovery work on trashed
systems.
bootnet.img
should be written directly to a
floppy:
/dev/fd0
, you should give the following
command to copy the file:$ dd if=bootnet.img of=/dev/fd0 bs=1474560
rawrite
program from the
redhat-6.0/i386/dosutils
subdirectory of the mirror's top
level directory and use that to write the floppy. As a precaution you should set the boot floppy to be read-only.
Now back up your system.
I repeat: BACK UP YOUR SYSTEM!
The installation process from the user's point of view, consists of a series of screens containing queries for information. What you need to know about navigation and selection is described in this section.
Within a menu the arrow keys will move you up and down. The page
up and down keys will move through the list much faster. If the menu
is for selecting a single item from a list then simply leaving the
desired item highlighted will suffice. If multiple items in the list
are to be selected then they will come with checkboxes. An unselected
check box looks like this: "[ ]"
and a selected
one, like this: "[*]"
. The SPACE bar toggles
the selection of the item in the list.
The TAB key will move between items on a screen. For example, to move between OK, Cancel and Edit buttons press TAB to move from one to the next. A common combination is for there to be a menu followed by some buttons. The arrow and page keys move within the menu as described above, and the TAB key moves from the menu to the first button. TABbing is typically cyclic: hitting TAB when the focus is on the last item moves the focus back to the first item.
The RETURN key will hit the current button, i.e. the button moved to via the TAB key. (To "toggle" is to flip between two states; selected items become unselected and vice versa.) On a screen with a menu but no OK button it will also accept the current setting of the menu and move on to the next screen.
Once you have backed up your system insert the boot floppy into the floppy drive that MS-DOS regards as A: and reboot. This will launch the installation program. It will first ask you for boot options. This is principally to launch a "rescue floppy" configuration. You will only need this if something has gone horribly wrong. For installations and upgrades, just hit return.
The system then loads Linux from the floppy and then presents you with a welcome screen with an OK button at the bottom. Hitting RETURN takes you on to the series of querying screens.
The language screen gives you the series of languages Red Hat supports. The default is English (actually American English, but let's not be too fussy) so you can just TAB to the OK button and hit RETURN.
The keyboard screen follows. You will probably have either a UK keyboard (one with the double quotes character as a shifted 2 and the pounds stirling character as a shifted 3) or a US keyboard (one with the commercial-at character as the shifted 2 and the hash or sharp character as the shifted 3). Get it right. One of the other differences is the location of the Unix pipe and the backslash characters. You do not want to work on a keyboard with these incorrectly mapped!
The next screen asks you to identify the installation method. Select "NFS image" (NFS is the "network file system"). This is the method that accesses our copy of the Red Hat distribution over the network.
Now that the installation program knows that the network is to be used, it ask you to identify the network card from a menu. Once you have selected the card, it will ask for options. The options are typically to autoprobe or to enter the options manually, with the default for that particular card as the upper menu item. Most modern cards support the autoprobe and have it as the upper, default menu item. If you select the manual entry you will need to give the i/o address and the IRQ number. If the card does not match the description or if the autoprobe fails, or if you type in the wrong manual entries the installation program will display an error screen saying that it could not locate the card and offer you a chance to try again.
If it can use the network card it will proceed to ask you for the boot protocol. The CUDN uses "static IP" for its IP numbering; your machine will always have the same number and need not apply for an address each time it boots.
The next screen asks your to configure TCP/IP and you will need the information from the letter from the University's IP Register issuing you with your IP address.
The first field asked for is the IP address.
When you TAB to the next entry, the netmask a
default value will be created for you. If your IP address begins with
131.111
then you will get the default
255.255.0.0
. This is only correct for certain (typically
large) departments in the University. Use the netmask value given in
the letter from IP Register.
The third field is the gateway machine address. This is the address of the route from your local network (department, college, whatever) to the rest of the world. A typically incorrect default will be created for you by the system and will need to be replaced. The letter from IP Register gives the address to use.
The fourth and final entry is for a primary nameserver. The
nameserver is the system that maps between machine name and machine
number (and vice versa.) Red Hat's default will almost certainly be
wrong. If the IP Register knows of a nameserver on your network then
the letter will inform you of it and you shyould use this local
nameserver. Otherwise you will be pointed at one of the University's
central nameservers, 131.111.12.20
and
131.111.8.42
. If the nameserver works and is contactable
then the installation script automatically works out your system's
host name from the DNS. If it cannot get to the nameserver, or the
nameserver does not recognise your IP address then you will be
prompted for a hostname. This is a sign that something has gone
wrong.
The next screen asks you to identify your NFS
server. The machine name you should use is
nfs-uxsup.csx.cam.ac.uk
and the directory containing the
installation image is /linux/redhat/redhat-6.0/i386
.
After confirming the NFS server you should briefly see a message "in second stage install" which is the confirmation that you are no longer working from the boot floppy but from the NFS-mounted file system.
If the installation program can see Linux partitions on your disc it will ask if you want to perform a fresh installation or an upgrade. For the purposes of this example we will select the Install option.
The next question asks what sort of installation you want to perform. It offers three alternatives: "Custom", "Server" and "Workstation". The "server" and "workstation" settings are simple default installations, whereas the "custom" install allows you to tinker. This document will start by describing the "workstation" installation. (A later revision of this document will describe the other two, I hope.)
There are up to two warning screens displayed, essentially notifying you that you are going to trash data. You have taken backups, haven't you?
You will then see a brief "scanning packages" message followed by a large number of "install status" windows, one for each package being installed.
On a system with a mouse connected to the system bus, the installation program will automatically detect the presence of the mouse, but not its exact type. If you have a serial mouse the probing is less certain and may prompt you for whether or not you even have one.
In either case you will need to identify the type of the mouse and to specify whether or not you need three button emulation. If you have a two button mouse you do want it; if you have a three button mouse you don't.
Finally, in the case of serial mice, you will be asked which serial port it is connected to.
After configuring the X settings (or abandoning X altogether) you will be prompted for the network configuration. You should select the choice to keep the current settings.
The next screen asks you to set the timezone. First you need to specify whether or not the hardware clock is set to GMT. If this is a Linux-only system then you are well advised to have your hardware clock on GMT. Leave the daylight saving to the operating system. Unfortunately, because Microsoft products are a heap of s**t, MS Windows requires the hardware clock to keep local time. If you have a dual boot system you need to work down to MS's standards here, I'm afraid.
After describing the machine clock, you need to set your timezone. The menu is long with a mixture of geographical regions and timezone names. Pick "GB". Don't forget about Page Up/Down on this menu.
The penultimate screen asks you to set the root password. You know the drill: no real names, keep it secret, yadda yadda yadda...
Now think about this: when the system goes horribly wrong and you're not about who else knows the password? It is worth having a trusted deputy to also know the root password. Your local computer officer may also be a useful depository of such data (if and only if s/he has a secure place to keep them all).
The next screen asks you if you want to make a custom bootdisk. You do.
The boot floppy is a copy of LILO configured for your particular system's set up which you can boot from should the copy on your disc get corrupted. You do want this floppy. Keep it safe too.
On PCI bus systems, the graphics card is automatically probed for. If it is found and recognised the installation program simply announces the card it has found.
On non-PCI bus systems, or if the card is unrecognised on a PCI bus system, you are presented with a menu of cards to pick from. Your card may be a variant of one of the cards in this list or be back-compatable with one. The "Unlisted card" option in this menu takes you to a menu wherein you specify the chip set on the card.
If you definitely need an X driver not in the list you will need to cancel the X installation and return to it later when you have the relevant driver.
If you do select a card from the list there will be another package download as the relevant package is loaded from the NFS server.
The next screen will ask you about your monitor, providing you with a list to select from. Recall the data you found from your monitor during the preinstallation checks. (How's your back, by the way?) If you can find your monitor in the list, select it. If you can't, you will need to go for the "Custom" entry and describe your monitor to the system.
Finally, the installation program will run a probe on your X server to see if the settings work at all. You will see your screen flash a few times. Things can go horribly wrong at this stage but typically problems will have been caught already. Theoretically, your monitor may blow up if you overclock it, but don't let me scare you.
If all goes well, you will be asked about screen resolutions. This screen will tell you the default it has selected (typically the highest resolution at 256 colours) and ask if you are happy with that or whether you want to choose. If you opt to choose you are presented with a screen with the various combinations possible. TAB will carry you beteen columns and arrows within the column. The SPACE bar toggles a selection on or off. You can have more than one option. If you do then once X is running, CTRL-ALT-PLUS will run you through the various settings.
Finally you will be asked if you want X running automatically at boot. You probably do.
Ta da! That's it; you've made it. Eject the floppy, hit RETURN and wait for your shiny new Linux system to boot.
It's not quite all over yet, though the hardest part is now compete. Red Hat Linux installs, even as a workstation, with a few misfeatures which need to be corrected as soon as possible after installation.
/etc/inetd.conf
There are some entries that should be commented out of
/etc/inetd.conf
. You definitely want to comment
out the pop-2
, pop-3
, imap
,
linuxconf
and both time
entries. The first
three of these are responsible for most of the recent (successful)
attacks against the University's computers. The
linuxconf
service also seems to be a frequent cause of
security problems and needs to mature before being installed by
default. You probably want to comment out gopher
too
unless you are really planning to run a gopher server. (Hint: don't.)
Unless you plan to use the talk
programs you should
comment out the talk
and ntalk
entries
too.
/etc/sysconfig/sendmail
Change the line that says "DAEMON=yes
" to
read "DAEMON=no
".
This stops sendmail
listening for incoming mail. You
should not be receiving incoming email by SMTP unless you really know
what you are doing.
Certain services are started at boot and shouldn't be. To turn
them off use the chkconfig
program as shown below.
# chkconfig --level 12345 linuxconf off # chkconfig --level 12345 lpd off # chkconfig --level 12345 pcmcia off
Obviously, you should only turn off the pcmcia
support
if your system doesn't use it!
Note that you have to turn off linuxconf
both in
/etc/inetd.conf
and as a boot option. It comes in two
parts, and both need to be disabled.
To kick these changes into service you could now reboot.
If you want to be sophisticated, and learn for the future, you could do the following instead.
The inetd
daemon rereads its
/etc/inetd.conf
configuration file when it receives the
HUP signal. This is true for many daemons. We can find the process id
of the inetd
by looking in
/var/run/inetd.pid
. The /var/run/
directory
is used for this purpose by most Linux daemons. We then use this to
send the HUP signal (with the kill
command) to the
relevant proicess.
# more /var/run/inetd.pid 278 # kill -HUP 278
The sendmail
service has been reconfigured and up to
three others have been told not to start at boot. None of these
changes have taken effect yet. We will now shut down all four
services and then restart just the sendmail
service. The
start/stop scripts all live in /etc/rc.d/init.d
.
# cd /etc/rc.d/init.d # ./linuxconf stop # ./lpd stop # ./pcmcia stop # ./sendmail stop Shutting down sendmail: sendmail # ./sendmail start Starting sendmail: sendmail