First of all, how to configure the keyboard. If you missed this step during installation or have changed your keyboard, you'll have to:
it.map
selects the Italian keyboard;
KEYTABLE="/usr/lib/kbd/keytables/it.map"
;
/sbin/kbdrate -s -r 16 -d 500 # or whatever you like
Upon the next reboot, the keyboard will work fine. To avoid rebooting and
load the key table only, cd to /etc/rc.d/init.d and issue
the command ./keytable start
.
IMHO, the first thing to do next is build a kernel that best suits your
system. It's very simple to do but, in any case, refer to the README
file in /usr/src/linux/ or the Kernel HOWTO. Hints:
http://www.linuxhq.com/patch/20-p0591.html
;
noblink-X.X.tar.gz
and is available on
ftp://sunsite.unc.edu/pub/Linux/kernel/patches/console
.
Install the package, then add to your /etc/profile the line
/usr/local/bin/cursor bgreen # or other colour
modprobe
indicating
that some modules can't be located, that means that your
/etc/conf.modules needs mending. If you don't use the ipx and
appletalk modules, add these lines:
alias net-pf-4 off
alias net-pf-5 off
sendmail
Lock
On some systems, sendmail
locks the machine at boot time. Quick fix:
make sure your /etc/hosts contains a line that reads
127.0.0.1 localhost
See also Section Hostname.
Your hard disk's performance can be greatly enhanced by carefully
using hdparm
(8). If your Linux distribution doesn't include it,
you'll find on
ftp://sunsite.unc.edu/pub/Linux/system/hardware
; look for a
file called hdparm-X.Y.tar.gz.
I can't give you a general recipe, as many details depend on your hard disk and HD controller. Since you risk to toast your filesystem, please read the man page carefully before using some options. At its simplest, you could add the following line to /etc/rc.d/rc.sysinit:
/sbin/hdparm -c1 /dev/hda # first IDE drive assumed
which enables (E)IDE 32-bit I/O support. As for the `-m' option, this is
what hdparm
author Mark Lord emailed me:
(...) if your system uses components from the past couple of years, it will be fine. Older than that, there *may* be a problem (unlikely). The really buggy chips were the CMD0646 and RZ1000 chips, used *extensively* on 486 and (early) 586 motherboards about 2-3 years ago.
To use the parallel port version of the Zip drive you can use the default driver that comes with recent (2.x.x) kernels. During kernel configuration, make sure that SCSI support and SCSI disk support are enabled (either in the kernel or as a module). Remember, there can be conflicts between the printer and the Zip drive on the same parallel port.
Zip disks are sold preformatted on partition /dev/sda4. To enable the Zip, all you have to do is issue
#~ chmod 666 /dev/sda4 # everyone can access the Zip Drive
#~ insmod ppa
and the Zip can now be mounted as usual (better write the last line in
/etc/rc.d/rc.sysinit). You also access the Zip drive via
mtools
adding this line to your /etc/mtools.conf:
drive z: file="/dev/sda4" exclusive
There's a better ppa
driver than the standard one, though: have a look
at
http://www.torque.net/~campbell
.
Devices in /dev
(or better, links to the actual device drivers) may
be missing. Check what devices your mouse, modem, and CD--ROM drive
correspond to, then do what follows:
~# cd /dev
/dev# ln -s /dev/cua0 mouse
/dev# ln -s /dev/cua1 modem
/dev# ln -s /dev/hdb cdrom
and, if you want, do chmod 666
to these devices (not the links, the
actual devices!) to make them fully accessible by every user. Tip: in some
laptops the mouse device is /dev/psaux: take this into account
when configuring X11.
In addition, you'll want to make the floppy accessible by non-root users
with chmod 666 /dev/fd*
. This is bound to cause security problems,
but I don't know the details. Comments are welcome.
If you want to customise the bootup messages, check whether your /etc/rc.d/rc.local overwrites /etc/issue and /etc/motd. If so, fire up your editor and go ahead.
Issuing the command hostname new_host_name
may not be enough. To avoid
the dreaded sendmail
lock, follow these steps:
new_host_name.localdomain
);
127.0.0.1 localhost new_host_name.locadomain
gpm
mouse services are useful to perform cut and paste in tty mode, and
to use the mouse in some applications. Check that you have a file called
/etc/sysconfig/mouse and that it reads:
MOUSETYPE="Microsoft"
XEMU3=yes
Moreover, you must have a file /etc/rc.d/init.d/gpm. Of course,
make sure this configuration is right for your mouse type. Tip: in some
laptops, MOUSETYPE
is ``PS/2
''.
For Caldera, all you have to do is append this line to /etc/rc.d/rc.boot:
/usr/bin/gpm
It's handy to have mount points for the floppy and other devices. For example, you can do the following:
~# cd /mnt
/# mkdir a: ; mkdir floppy ; mkdir cdrom ; mkdir win ; mkdir zip
This creates mount points for an MS-DOS floppy, an ext2 floppy, the CD-ROM, the DOS partition, and the parallel port Zip drive.
Now edit the file /etc/fstab and add the following entries:
/dev/fd0 /mnt/a: msdos user,noauto 0 1
/dev/fd0 /mnt/floppy ext2 user,noauto 0 1
/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto 0 1
/dev/sda4 /mnt/zip vfat user,noauto 0 1
/dev/hda1 /mnt/win vfat user,noauto 0 1
Obviously, you must use the correct device in the first field. To
access fat32 partitions, there's a kernel patch and information on
http://bmrc.berkeley.edu/people/chaffee/fat32.html
.
lilo
(8) and LOADLIN
Many users run both Linux and DOS/Windows on their PC, and want to choose at boot time which os to use. Let's suppose that /dev/hda1 contains DOS/Windows and that /dev/hda2 contains Linux.
Do what follows:
~# fdisk
Using /dev/hda as default device!
Command (m for help):a
Partition number (1-4): 2
Command (m for help):w
~#
This makes the Linux partition bootable; this step ought to be carried out
by activate
when running LILO's QuickInst
, but it won't work with
my Red Hat.
Write this basic /etc/lilo.conf file:
boot = /dev/hda2
compact
delay = 50
# message = /boot/bootmesg.txt # write your own
root = current
image = /boot/vmlinuz # boot linux by default as this entry comes first
label = linux
other = /dev/hda1
table = /dev/hda
label = dos
Now issue /sbin/lilo
and you're set. Being lilo
a crucial part
of your installation, you're strongly advised to read its documentation
anyway.
To boot Linux from DOS/Windows without resetting, put LOADLIN.EXE
in a
directory (in the DOS partition!) included in the DOS path; then copy your
kernel to, say, C:\DOS\VMLINUZ
. The following
.BAT
file will boot Linux:
rem linux.bat
smartdrv /C
loadlin c:\dos\vmlinuz root=/dev/hda2 r
If you use Windows 95, set the properties of this .BAT
so as it starts
in MS-DOS mode.
Making a backup copy of your MBR before installing Linux could save your
bacon. Use restorrb
(included in the FIPS
package) before
installation, or you can use a Linux rescue floppy and issue this command:
rescue:~# dd if=/dev/hda of=MBR bs=512 count=1
then make at least two copies of the file MBR
on floppies. Should
disaster strike, you'll be able to restore your old MBR by issuing:
rescue:~# dd if=/mnt/MBR of=/dev/hda bs=446 count=1
assuming that a floppy containing MBR
is mounted under
/mnt
. Alternatively, use a DOS rescue floppy to issue
FDISK /MBR
.
Red Hat and Caldera have a fine configuration tool, printtool
; if you
don't use these distributions, manual configuration follows.
Let's suppose you have a non-PostScript printer you want to use to print raw text (e.g., C source files) and PostScript files via Ghostscript, which is assumed to be already installed.
Setting up the printer involves a few steps:
~# echo "hello, world" > /dev/lp0
~# echo "hello, world" > /dev/lp1
and take note which one works.
~# cd /var/spool/lpd
/var/spool/lpd/# mkdir raw ; mkdir postscript
~# echo "first line" > /dev/lp1 ; echo "second line" > /dev/lp1
if the output is like this:
first line
second line
then save this script as /var/spool/lpd/raw/filter:
#!/bin/sh
# This filter does away with the "staircase effect"
awk '{print $0, "\r"}'
and make it executable with chmod 755 /var/spool/lpd/raw/filter
.
#!/bin/sh
DEVICE=djet500
RESOLUTION=300x300
PAPERSIZE=a4
SENDEOF=
nenscript -TUS -ZB -p- |
if [ "$DEVICE" = "PostScript" ]; then
cat -
else
gs -q -sDEVICE=$DEVICE \
-r$RESOLUTION \
-sPAPERSIZE=$PAPERSIZE \
-dNOPAUSE \
-dSAFER \
-sOutputFile=- -
fi
if [ "$SENDEOF" != "" ]; then
printf "\004"
fi
(in this example an HP DeskJet printer is assumed. Fix it to suit your
printer).
# /etc/printcap
lp|ps|PS|PostScript|djps:\
:sd=/var/spool/lpd/postscript:\
:mx#0:\
:lp=/dev/lp1:\
:if=/var/spool/lpd/postscript/filter:\
:sh:
raw:\
:sd=/var/spool/lpd/raw:\
:mx#0:\
:lp=/dev/lp1:\
:if=/var/spool/lpd/raw/filter:\
:sh:
For more complex or exotic printing configurations, the Printing-HOWTO awaits you.
If you use printtool
, be aware that the GSDEVICE chosen by Printtool
will work, but not necessarily at its best for your printer. You may
consider fiddling a bit with the file postscript.cfg
; for instance,
I changed GSDEVICE from cdj500
to djet500
and now my prints come
out much quicker.