Last Modified 2003/09/06 12:11:28 Graham.Williams@csiro.au
|
DISCLAIMER: The information on this page is provided as-is. Use it at your own risk. But please let me know if there are errors or if you think it can be enhanced. Visit the The GNU/Linux Cookbook, a user's guide to using GNU/Linux, and a replacement for this older information. A PDF version of the FULL book is also available. Out-of-date information on Debian GNU/Linux on the Dell Latitude XPi P133ST is available in dlxpip133st.html This cookbook provides an overview of installing Debian GNU/Linux on a number of machines, specifically the Dell Latitude CPi D300XT laptop, but also with information relating to installaitons on other hardware, including the Dell Latitude XPi P133ST and Dell Latitude XPi 90T laptops and an old 486/DX66 underperformer with no CDROM, no modem, no network card, but with 12MB RAM, a 1.44MB floppy and a 400MB hard disk. If you've come by this way email me your experiences and recipes
for inclusion.
This cookbook started life as a guide to installing Debian GNU/Linux on the Dell Latitude CPi D300XT laptop and will still serve that purpose. The hardware consisted of:
The laptop has two 6GB internal Hard Drives (one internal for Microsoft Windows NT and one in the internal bay of the laptop for Debian GNU/Linux). The floppy drive normally housed in the internal bay is hooked up through the parallel port. A docking station delivers a CD-ROM, Ethernet, and external keyboard, mouse, and monitor to the laptop. Things work pretty much the same (except for missing devices of course) when it's free of the dock. I have woody (the current `unstable' Debian distribution) installed and use the Helix GNOME desktop environment. A much older machine is the 486/DX66 on which I have a very basic installation of woody with Emacs, ssh, and lynx (no windows yet).
For a real challenge one starts with the Linux kernel and builds a GNU/Linux system bit-by-bit. Usually though you start with one of the many excellent distributions. My favourite is Debian GNU/Linux, the ``Linux for the GNU Generation.'' I started with Slackware but migrated through Red Hat on to Debian. Red Hat is pretty good. But Debian is great. It conforms to the open and distributed development model, unlike Red Hat, and is the basis of commercial distributions like Amirix, Corel, Embedded Debian, Stormix, TimeSysand the VA Linux Systems, O'Reilly and SGI collaboration. It also powers web sites like Linux.com. The stable distribution is rock solid. The unstable distribution is where you will find the latest and the greatest -- it is a pretty solid distribution (and is particularly suited to those who live at the bleeding edge). Administering the system and maintaining up-to-date package installations is easy with Debian's apt and dpkg tools. A lot of effort has been devoted to ensuring the system works as a whole, rather than providing a lot of glitz. Here are some specific reasons I use Debian:
Installation is a breeze if you follow the very clear instructions of the Debian Installation Guide. Nine floppies (for Debian 2.1) began the installation for me. The raw floppy disk images were retrieved from ftp.debian.org. They are: resc1440.bin (Rescue Disk); drv1440.bin (Drivers); base14-1.bin up to base14-7.bin (Base Disks). These are dumped to floppy disks using the rawrite2 executable for Microsoft Windows (available from the same place): C:\> rawrite2 -f resc1440.bin -d a: Following the installation instructions left me with a basic installation of Linux: Boot with the Rescue Disk. I had to force the recognition of the internal bay hard drive by supplying the following command line when you receive the boot prompt: boot: linux hdc=13424,15,63(the numbers were eventually figured out one time when the drive was auto-detected). The dbootstrap application runs automatically and asks lots of configuration questions, with a summary of my answers below: color kb qwerty/us disks partition 6GB Linux N P 6063 B T 83 B hdc1 128MB Swap N P 125 T 82 hdc2 W Q swap /dev/hdc2 scan linux /dev/hdc1 scan root mount /dev/hdc1 kernel from /dev/fd0 Rescue Disk Drivers Disk devices misc psaux net ppp network host = debian connected = no base from /dev/fd0 Base Disks 1-7 config timezone Australia ACT GMT no (skip the "Make Linux boot directly from hard disk") Make boot floppy Custom Boot Reboot Once the base is installed and the machine rebooted you are asked to enter a password for the root account and to create a user account. Do this. PPP should then be made to point to your ISP using your PCMCIA modem card (or some other modem or network device). The Debian package tool called `dselect' will do the rest allowing you to choose packages and to install them. I did this using the `apt' method but you could also do this via a CD-ROM. Initially, dselect will install all of the other basic required packages, and then hand things over to you for your needs.
You might like to begin with installing the lilo package. (But don't install it over the existing master boot record on drive /dev/hda unless you wish to wipe out NT -- the boot sector of the first hard disk where the BIOS boots from is called the master boot record or the MBR). For dual boot using the Microsoft Windows NT boot loader see the Linux with NT Loader mini HOWTO, but I detail the steps below. Lilo (/sbin/lilo) is run under Linux to install a boot sector (after editing /etc/lilo.conf) on /dev/hdc. You then copy the Linux boot sector to floppy disk, reboot to NT, and copy the Linux boot sector onto the NT hard disk. The NT boot loader is then told where to find the file (edit C:\boot.ini). It is all very clearly documented in the above mini HOWTO. On bootup you can then choose between GNU/Linux and Microsoft Windows NT.
# editor /etc/lilo.conf
root=/dev/hdc
boot=/dev/hdc
append="hdc=13424,15,63"
# /sbin/lilo
Warning: /dev/hdc1 is not on the first disk
Added Linux *
# dd if=/dev/hdc1 of=/root/bootsect.lnx bs=512 count=1
# mcopy /root/bootsect.lnx a:
# reboot (into NT)
C:\>copy a:\bootsect.lnx c:\bootsect.lnx
C:\>attrib -s -r c:\boot.ini
C:\>notepad c:\boot.ini
[boot loader]
timeout=30
default=C:\bootsect.lnx
[operating systems]
C:\bootsect.lnx="Debian GNU/Linux"
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation ...
C:\>attrib +s +r c:\boot.ini
C:\>reboot (into Linux)
Note the inclusion of the append line above in my lilo.conf. This ensures /dev/hdc is found. Otherwise, sometimes it is not. After you install a new kernel under Linux (either from a
kernel-image package on the Debian archive or else your own compiled
kernel-image) you will need to rerun LILO. By default lilo.conf
identifies the image to boot as "/vmlinuz". This is a symbolic link
to, for example, /boot/vmlinuz-2.0.36.
Debian distributions are based on over 4400 packages. Your task is
to select those you wish to install! This is made easier with
task packages which are virtual packages that depend on a
collection of other packages. Selecting one of these task
packages results in that collection of other packages being
installed. An example is the Individual packages are installed and updated using dselect
(with a basic GUI), or dpkg
(for manual installation of deb files), or
Using dselect is at first confusing but allows you to
easily update and install new packages with an ease that leaves you
confident that all difficulties have been carefully hidden through
extensive dependency and consistency checking. If network connection
is interrupted, the downloads will be resumed from where they got
to. The dselect learning curve will pay dividends. My installation
has always been left in a consistent and stable state after installing
packages from the Debian archives on the Internet.
As you gain confidence and know what you are after, move on to
apt-get if you prefer a command-line interface. This takes
care of dependency checking automatically (unlike dpkg) and
will retrieve the required packages from the Debian archives.
Each individual package can Suggest, Recommend, and Depend on other
packages. A subtle difference between dselect and
apt-get is that the latter ignores Suggest and Recommend
dependencies whereas dselect will offer Suggested packages
for the user's attention and will select Recommended packages
automatically.
Debian has a carefully planned and controlled release program and
has a variety of distributions available at any time. The
distributions have code names (from the Toy Story movies), release
names, and versions. This may sound complicated, but it is quite
simple and effective, and I describe it through an example. The
official version of Debian is referred to as the "stable" distribution
which, as of April 2000, is code-named "slink" and is officially
Debian 2.1. The "unstable" distribution is where new packages and
updates to old packages appear and the current unstable distribution
is code-named "woody". A new release is on the horizon. This release
has until recently been called "unstable" but is now "frozen". Its
code-name is "potato". It will be officially released sometime as
Debian 2.2. The different names act as convenient synonyms with the
code-names never changing but the stable/unstable/frozen links set as
appropriate.
The fact that the links can change is a little problematical as
people may suddenly find that their system wants to upgrade everything
to a new version once the stable link changes to a new release. My
suggestion is to choose the code-name and stay with that. So, as of
May 2000, if you want to maintain a stable distribution, go with
"slink". If you want to track the emerging new release, then go with
"potato". If you want all packages and latest releases (but less well
tested) go with "woody".
There are over 75 Debian mirrors world-wide and over 4400 packages
available for unstable. Check for a mirror near you by trying
http://ftp.XX.debian.org/debian where you replace XX with your country
code. If you don't find one then try some others or stay with the
master Debian site or check for another mirror. If you do
find a suitable mirror then edit /etc/apt/sources.list (as root user)
and add in the appropriate Net address. My current sources.list
points to the potato distribution:
Note that the format of the non-US entry has changed since slink.
Running dselect you will be lead through these simple steps:
Simple. The Select stage can be a little confusing when you get
conflicts so read the help screens carefully.
Once you've got things going with dselect you may find
the convenience of the command line based apt-get useful.
Last Updated: 2000/06/13 09:35:02 Graham.Williams@cmis.csiro.au
The apt-get utility provides a command line method for
installing packages and (automatically) their dependencies, retrieving
them from the Internet when required. The basic operation is:
The file /etc/apt/sources.list is again used to specify the
location of packages.
To upgrade all of your installed packages to the latest available
for a particular distribution distribution, all you need to do is add
the appropriate lines for that distribution to your
/etc/apt/sources.list and then simply:
Usually this will list the new packages to be installed and any old
ones that will be removed, and inform you of the number of packages
that will be upgraded. To also list the packages that will be upgraded use the -u option:
An alternative, and that which is often suggested, is to do a
dist-upgrade rather than just an upgrade. The
difference is that an upgrade will not remove packages nor
will it install new packages (that might otherwise be required due to
dependencies). A dist-upgrade will do an upgrade but
also do the book-keeping (removing and installing other packages). As
a consequence dist-upgrade may break things temporarily if it
has to (e.g., uninstall a critical package in order to get
dependencies working). So the common upgrade procedure is:
If your sources.list grabs the packages from the net these
upgrades can take some time but are mostly automatic.
You can use the --download-only option of apt-get
to download the files for an install without actually unpacking and
setting up the packages. For example:
In this way you are able to leave the download unattended and when
you are ready you can monitor the unpacking and setup.
If things go wrong somewhere the apt may be able to
help. The --fix-broken will do its best:
but if things still don't work, you may need to use dpkg
directly to remove and isntall packages.
Last Updated: 2000/05/20 22:50:25 Graham.Williams@cmis.csiro.au
Here are some other locations that may come in use for different
purposes. Some may no longer be current so check them out first.
Put a package on hold List all installed packages that have updated versions available The apt method within dselect and the
apt-get command (which the apt mathod uses) place
all downloaded files into /var/cache/apt/archive. You can
then use the apt-move command to move the archived files into
a local hierarchy that mirrors a standard disttribution hierarchy.
Then you can point apt-get to this local archive by pointing
to it from sources.list using the file://
format. You can also give the option --download-only to
apt-get to download but not unpack nor install the package.
The package system maintains a list of all packages installed (and
de-installed). You can access this list, save it to a file, and use it
to mark those same packages for installation (or deinstallation) on
anther machine:
The dpkg and apt-get commands are pretty useful and provide a lot
of functionality. Here's some common things that you may want to do:
Search for the package that installed the file diff.info.gz List all packages installed (one line per package) What is the (one-line) status of the diff package? List the information for any package with diff in its name List files associated with the package diff What packages mention diff? Display information about a package
What packages depend on diff? Last Updated: 2000/05/24 16:36:07 Graham.Williams@cmis.csiro.au
And now onto the desktop itself.
XFree86 3.3.2 is shipped with Debian 2.1. However, the NeoMagic Graphics chip is supported
by XFree86 as a standard SVGA driver only from XFree86 3.3.3. All is
not lost as Debian 2.1 has available a XFree 3.3.2 driver for the
chipset called
xserver-neomagic.
I first updated to XFree86 3.3.4 compiled for Debian 2.1. After
upgrading to potato you will have XFree86 3.3.6. The packages from
potato to install are:
You will then need to run either xf86config (for a
console-based interface) or XF86Setup (for a X Windows based
interface) to create an appropriate /etc/X11/XF86Config
file. If you are in luck, this will be straightforward. Often it is
not (particularly for laptops). Below are some configs I have had
success with:
I hand crafted a simple XF86Config file that worked to get 16 bpp
at 1024x768 on the Neo Magic graphics chip nm2160:
This setup is used when the notebook is docked with display being
to an external monitor. Both internal and external displays don't
work together and so you need to manually edit the XF86Config file
each time you change between the external and internal display (could
be done with a script, but essentially you swap the "#" around, which
is used to identify a comment line). It is reported that having both
enabled can destroy the internal display. It certainly makes it go
pretty ugly momentarily. According to the Linux on
the Dell Latitude CPi A366XT page, you can't just switch
between internal and external displays without updating your
XF86Config and restarting X, or YOU CAN DAMAGE YOUR DISPLAYS!
The value for the Vertical Refresh rate of 55-65 was suggested by
Charlie Hedlin since ``LCD's
don't need 80Hz and the like.''
I hand crafted a simple XF86Config file that worked to get 8 bpp at
800x600 for the Cirrus Logic grachics chip clgd7543 and plan to
include it here sometime (depending on demand).
GNOME is my Desktop and Session
Manager and Sawfish is
the Window Manager. KDE is a GNOME
alternative and Window Maker and Enlightenment are alternatives to
Sawfish.
The LBX (Low Bandwidth X) server extension is useful for increasing
the responsiveness of remote X applications. Remote Emacs windows are
now being delivered to my desktop over a 33 K connection at about 3
times more quickly! (Also more quickly than my LBX connection from
MS-WindowsNT using Exceed!)
CHECK: I may not need to compile my own kernel any more?
The last remaining thing I needed was APM for the laptops. The current
kernels have APM configured, but disabled by default, and I beleive
you turn it on with the use of "apm=on". Need to check this. If this
works, I will move this kernel section to the end of the document as
it becomes less important. So add append="apm=on" to lilo.conf.
After upgrading to potato I installed a newer kernel. I will
illustrate the process with kernel-image-2.2.14 and the associated
pcmcia-source (PCMCIA card support) and alsa-source (sound card
support). Tuning the kernel through the CONFIGs can appear daunting.
There are many reasons to install your own kernel. I originally
had to do so to get support for the laptop advanced power management
and sound. Kernels are becoming more modularised and thus more
general, allowing support to be loaded as needed..
The first step is to install the appropriate packages. For slink I
installed the following packages:
For potato I installed the following packages:
The first three install the appropriate tar files in /usr/src. The
fourth provides the tools to create your own kernel-image and
modules-image as Debian packages that you then install with dpkg. The
use of kernel-package is highly recommended and is the Debian way of
doing things. It is all very straight forward. Note that you do not
need the kernel-headers package as all the headers required are in the
kernel-source package. The headers were split out for other
reasons. The kernel-source delivers a tarball. You can instead obtain
a more recent version from the net yourself and still use the Debian
kernel-package utilities.
The steps involved are:
You now need to configure the kernel. There are many options and I
tend to start with the Debian kernel configuration found in
/boot/config-2.2.14. The primary changes I made include specifying
CONFIG_M686 and enabling APM support. For these kernels Debian out of
the box supports sound modules and NTFS.
Move the old module libraries out of the way:
Now install the new kernel and modules:
This should start you up with the new version of the kernel. You
can then do the boot sector transfer across to WindowsNT to remove
the need to boot from floppy, once all seems okay (assuming you've
already set things up for dual boot):
Note how this interacts with Debian's package management. By
calling my version of the kernel 2:custom.1, this will be a more recent
version number than the standard Debian kernel-image package. That is,
kernel-image-2.2.14_2:custom.1_i386 is regarded as being more recent
than kernel-image-2.2.14_2.2.14-1_i386. Thus, the packaging system
will not try to install a more recent 2.2.14 over my own image.
Debian kernel packages always have the version number the same as the
kernel version number.
Kernel configuration is an interesting exercise. You are offered
many configuration options, most with brief but helpful documentation
(stored in /usr/src/linux/Documentation/Configure.help).
An oddity I noticed is that a couple of files in
/usr/src/linux/include/linux are not readable by other. For example:
In compiling other programs this is sometimes a problem (for
non-root users). You can change this with "chmod o+r version.h".
There is no hiding the fact that GNU/Linux is a comprehensive
operating system. We now begin tuning the system to suit our needs.
Some tuning may require reconfiguring the kernel but many do not. I
mention various kernel configurations in the following and you can
check in the appropriate config file in /boot (for example
/boot/config-2.2.14) to see if the currently running kernel has the
option set.
UPDATE I beleive current debian kernels have
CONFIG_APM on but CONFIG_APM_DO_ENABLE off. You
simply have to add append="apm=on" to lilo.conf to turn APM on and you
no longer need to worry abuot copmiling your own kernel.
The relevant parts of the kernel configuration (kernel 2.2.15) are:
You can now close the lid of the laptop to force a suspend. The
laptop will beep then turn itself off. Simply open the laptop lid to
resume. This works for both console logins and X sessions.
You can also eject the laptop from a docking station to achieve the
same effect. When the laptop lid is opened, or the laptop is inserted
back into a docking station, the system resumes. It seems advisable to
do this only when in console mode (that is, not while you have an X
session running - it's not quite there for X sessions yet).
It is also advisable to install the apmd package which
provides the apm command. This produces a more human
readable output than a simple cat /proc/apm and can suspend
your laptop from the command line:
A suspend while connected to power within a docking station does
not seem to suspend the machine completely. It sends it to sleep but
it does not beep and power down.
Some useful commands related to rebooting are:
After installing the apmd package the suspend maintains the clock
correctly between a suspend and a resume. (Although I seem to be
losing a few seconds each time.)
Note that a suspend will disconnect your modem!
PROBLEMS When you eject the laptop from a docking station
while running an X session it does not come back properly when the
laptop is reinserted into a docking station. Sometimes the display is
half off the screen. Sometimes simply get streaks across the
screen. If this happens, you can go back to a console as usual with
CTRL-ALT-F1, or exit from the X session with
CTRL-ALT-BACKSPACE. If you eject while running an X session
and open the laptop lid you will not get the proper display, and may
damage the display. It can also freeze the laptop.
Debian has a clean mechanism for dealing with applications that
provide the same tools and commands. We describe here how this
mechanism works and how you can use it to tune your installation.
If you have more than one variant of emacs installed (e.g.,
emacs19, emacs20, and xemacs) then you can configure which one you get
by default with:
You will be asked to choose from a list of alternatives.
Here's another example: You can use the
update-alternatives command to specify which window manager
to use as the system default.
Now suppose the window-manager you want to use
as the default is not listed as available. You can install it with:
Where PRIORITY is a number higher than the highest existing
priority for the x-window-manager alternative. You can get a list of
priorities with:
To remove a Window Manager:
For a CD-ROM located in the Docking Station of a Dell Latitude CPi
you will need a recent version of the kernel (I'm currently using
2.2.15) so that it will be recognised. On boot the following is
displayed:
To make use of the CD-ROM device first create the /dev/hde devices
with MAKEDEV as root:
To allow general access to the CD-ROM edit /etc/fstab to
add the following line. Any user can then mount /cdrom which is
particularly convenient from the GNOME mount applets which you can
click on to cause a mount or unmount, or you can leave it to GNOME to
magically do the mounting for you when you open the device Make sure
you unmount the cdrom before you physically remove the media.
The command line mounting of the partition can then become:
For audio CD access the default seems to be to add users to the
Unix group "disk". That didn't quite seem right. Instead change the
Unix group of /dev/hde from "disk" to "cdrom" and add users who need
access to the drive to the group "cdrom":
Then, next time user fred logs on he will be in group
cdrom in addition to the other groups he was already in. He
will then have access to the CD-ROM device.
The Gnome gtcd utility worked just fine, accessing the Internet
CDDB database of CD's to display album and track information. All I
need to know now is how to get sound from the CD!
You can obtain all of the Debian packages from the network with the
support of the Debian package tools. However, one may not always have
access to the network and you may want to burn your own CD-ROM image
of the distribution. This is fairly straightforward. (The example uses
a Solaris machine and ncftp 2.4.3 - don't use ncftp 3 beta.)
First, obtain the appropriate Debian tools to build a CD-ROM image
(I build the image on the Solaris machine for now):
Obtain a list of files that will make up the contents of the CD-ROM
from an appropriate CD-ROM archive. (These archives also contain the
actual images, but they get overloaded with people downloading the
images so it is turned off. It is more efficient for every one if you
build the image yourself using the procedure here. It is quite easy.)
Now download from a local server the actual packages that will make
up the contents of the CD-ROM:
This takes quite a while! The end product is a file called
pseudo-image. All the other pseudo-image* files can
be removed (they're used to keep track of where things were up to in
case the download is interrupted).
This download is called the pseudo image because it's an
approximation of the real image! It's pretty close, but not yet
guaranteed perfect. It is a simple process to now turn it into an
Official image:
This uses rsync to synchronise your CD-ROM image with the
Official one. You can now burn this image directly to CD-ROM. Most
CD-ROM burning software supports burning iso images directly.
Some other useful rsync commads allow you to hunt around
the directory structure of an rsync server:
List contents of the rsync server's root directory
List the contents of another directory
You can get the potato test images as:
With a dual boot system with WindowsNT I have my clock set to local
time as suggested by the Debian install. For a sole Linux
installation Debian suggest using GMT (the standard approach for
Unix). To effect a change use the "tzconfig" command (I've not tried
this). You also have to change the line in /etc/default/rcS which
states the CMOS clock configuration.
There are two clocks: a system clock and a hardware clock. The
date command talks to the system clock that is maintained by
the operating system. The hwclock command talks to the
hardware clock that is part of the hardware of the computer and
usually battery backed up.
Some experimentation is often needed to make sure you get an
accurate clock (or close to it). Some hints on dealing with clock
problems can be found in the Clock mini
HOWTO, but the hwclock and adjtimex man pages
are clearer. The adjtimex command can be used to counter
systematic drift in the system clock.
To set both clocks do:
Then monitor how the system and hardware clocks vary over 24 hours.
The "adjtimex" command communicates with the kernel to change the
number of ticks in a day (default is 10000 which corresponds to about
8.64 seconds per tick) and the frequency (default is 0) of the system
clock. In Debian you can use the command adjtimexconfig to
automatically tune the tick and frequency so that the change has
effect on each boot. Alternatively, override the automatic settings
by editting /etc/adjtimex.conf.
The system clock on the Dell Latitude CPi was losing (very) roughly
1 second per hour. (The hardware clock also seems to lose nearly one
second each day.) Not too much on the face of it, but considering the
machine does not need rebooting, this can become a significant
drift. I found a tick of 10002 and a frequency of 4000000 worked for
me on the Dell Lattitude CPi
On the 486/DX66 the system clock was gaining about 22 seconds in 24
hours and the hardware clock gaining about 10 seconds in 24
hours. Removing 3 ticks had the dramatic effect of making the system
clock pretty accurate.
The hwclock command provides the interface to the hardware
clock. The --adjust option checks information stored in the
configuration file /etc/adjtime and makes an actual
correction to the time stored in the hardware clock to account for the
drift that it (the hwclock utility) has been
monitoring. (Each time you set the hardware clock with the
hwclock command the current time is compared to the previous
time it was corrected to determine the amount of drift.) Thus, when
setting the system clock from the hardware clock it is advisable to do
the following:
When updating the hardware clock from an accurate system clock do:
Debian uses cron in a very neat and stylised fashion. Scripts to be
run regularly are maintained in
/etc/cron.{daily,weekly,monthly}. The entries in
/etc/crontab then simply run any scripts in these directories
on a regular basis. The daily scripts, by default, are run at
6:25am each day. The weekly scripts are run each Sunday at
6:47am and the monthly scripts are run at 6:52am on the first
day of each month. If these times don't suit (e.g., you like to work
early in the morning and get annoyed by the sudden disk whirling each
morning at 6:25 am) the simply change the times in
/etc/crontab. Unlike traditional versions of cron,
the newer versions do not require the running of the crontab
command to install the new version when you edit the crontab
file.
Warning I have not tried this: Some notes here on using
DHCP, from Florian Lohoff. First,
install dhcpcd-sv 1.3.16-1 (Sergei Viznyuk's DHCP client for 2.1.x
kernel). With a self-made pcmcia-cs 3.1 set DHCP=y in
/etc/pcmcia/network.opts and then link /sbin/dhcpcd ->
../usr/sbin/dhcpcd-sv, so that the pcmcia utils will find the dhcpd.
Then remove the /etc/(init.d|rcn.d)/dhcp scripts as these are not
needed as the pcmcia network scripts start the dhcpd itself.
Where is documentation on Debian? An interesting question, and one
that has not been all that easy to answer.
To connect through the ethernet adaptor in the docking station Eric Dobbs reported that RedHat
6.0 found a 3com Vortex (3C590/905-series) driver auto-detected for
him. So getting the ethernet controller in the docking station to work
was simply a matter of setting the following kernel configurations
(from the defaults supplied):
Now on boot I get the following messages (which can also be read
using the dmesg command):
If you edit /etc/fstab to add the following line any user can then
mount /floppy which is particularly convenient from the Gnome mount
applets which you can click on to cause a mount or unmount. Or create
symbolic links for Gnome from your ~/.gnome-desktop directory to
/floppy. Then Gnome seems to magically do the mounting for you when
you open them (they will appear on your Gnome desktop and you can
change the icons to more appropriate symbols such as a floppy). I
guess you better make sure you unmount the floppy before you physically
remove the media.
Unless you like large fonts be sure to have the 75dpi fonts ahead
of the 100dpi fonts in the FontPath as specified in
/etc/X11/XF86config.
I run Gnome as my XWindows session manager and Sawfish as my window
manager. The HelixCode distribution of Gnome (released end of May
2000) is a professional package, and brings the Linux desktop pretty
much up to scratch. They package Gnome for many platforms, including
RedHat and Debian. Prior to Gnome 1.2 the default window manager was
Enlightenment. Now it is Sawfish, a lightweight, yet themable and
very tunable window manager, that leaves all the rest (like session
management, multiple desktops, etc.) to Gnome.
When prompted to load or to save files the dialog does not show
any hidden directories (those beginning with a period). To get
them displayed, simply enter a period in the Selection text field and
press TAB.
The Gnome Display Manager gdm, when installed, will start
up automatically on boot. This presents an X11 interface to log on. If
you are used to starting X11 from the command line you will be used to
using either .xsession or .xinitrc to tune some of
your X11 settings. The System menu in the gdm
dialogue lets you start up Debian, Gnome, or XSession. To tune your
X11 settings in this environment with your .xsession file be
sure to run with the Debian session. If you use the default Gnome
session in gdm place your tuning in the file
.gnomerc in your home directory, but be sure not to include
any window managers, etc., as these are started by the
gnome-session command that the Gnome session starts. Some
startup tunning I perform incudes:
A Debian system creates some standard groups and users. The system
administrator will also create new users and may also create new
groups. We list below the standard groups and users.
Initialisations of various daemons and other services within Linux
usually occur at boot time but also can occur when the run level is
changed.
Run levels are used by Linux to identify different situations in
which the operating system is run. For Debian the default is run level
2, unless you change it in /etc/inittab, and for Red Hat the
default is run level 3. In genera the run levels 2, 3, 4, and 5 are
all multi-user tun levels.
When the system enters a run level it executes the scripts in
/etc/rc.n where n is the runlevel in question. These scripts
are symbolic links (symlinks) to scripts in /etc/init.d. A
script starting with S starts a service. One starting with
K stops a service. The number after the `S' or `K' specifies
the order in which the scripts are run. For example, S25xdm will start
before S35xdm.
To stop xdm, for example, from starting up by default on boot,
simply remove the symbolic link of the corresponding `S' script from
/etc/rc.2.
See man init for and extensive discussion.
The init script is run with "start" on changing runlevel (S) and
runlevels 0 (the halt runlevel) and 6 (the reboot runlevel). It is not
clear to me why the "start" is sent for runlevels 0 and 6? Should it
not be "stop" (and hence the link from /etc/rc0.d/ should be named
Knnhwclock.sh instead of S25hwclock.sh)? It seems that the hwclock is
adjusted and then the system time is updated from it on boot, reboot,
and halt? Makes no sense to me yet. But it's good that it does this
since otherwise it would be updating the hardware clock with the
incorrect system clock on each halt/reboot (which is actually what I
think is happening).
I am also puzzled as to why there is no link to
/etc/init.d/hwclock.sh from /etc/rc2.d. Maybe I need one there (set up
with update-rc.d as root). Or maybe it's just needed in rcS.d (where
it already is) if that is what happens at boot time.
To remove something (e.g., gdm) from the init scripts:
Kernel 2.2.12 and beyond support read only access to NTFS, the file
system of Microsoft Windows NT. The kernel needs to be configured to
use it:
I have two NTFS partitions on the Microsoft Windows NT side of the
machine. So I edit /etc/fstab to include these two lines:
These will be mounted each time you reboot, unless you add the
`noauto' option to the appropriate lines in /etc/fstab.
Users are granted access to /nt/c and /nt/d through the use of the
umask=002,gid=100 in the fstab, and then add trusted users to
this group. You can allow access for only a specific user by adding
"uid=1000,gid=1000" to the options. Or you can remove all security and
give complete access to everyone with umask=000 (this is
dangerous as any login will be able to peruse your possibly private
and password containing files on the NTFS partition).
Note that permissions on the mountpoint itself (/nt/c are
irrelevant: when you mount a filesystem the permissions of the mounted
filesystem's root directory replace the permissions of the mountpoint,
even when the filesystem in question does not support permissions.
You have two copmuters, one somewhat better resourced than another.
You have Debian GNU/Linux installed on both. You want to link them
together using their parallel ports and a Null Modem cable (also
called a LapLink cable) so you can share resources. PLIP is the
answer and the PLIP
Install HOWTO gives some clues. Below is my recipe based on these
clues.
If you forget your password for root, then you will be in a spot of
bother. One way to fix this is to reboot the machine using the Debian
installation floppy or CD. When you get the first question (about the
having a colour monitor) press CTRL-ALT-F1 to get a shell. Mount your
root partition (let's say it is /dev/hda1):
The pppconfig command allows you to configure your modem
connections. Essentially it is a front end to the various scripts in
/etc/ppp. My PCMCIA modem is loaded at /dev/ttyS1. Newer versions of
ppconfig check the serial ports for modems for you. Usually,
/dev/ttyS0 corresponds to COM1 under MSWindows and
/dev/ttyS1 corresponds to COM2.
To allow users other than root to connect through the modem (using
the pon and poff pair of commands) add the users to the Unix group
"dip":
Then, next time user fred logs on he will be in group
dip in addition to the other groups he was already in. He
will then be able to initiate and terminate a dial up
session. However, user fred does not have access to the log file
through the plog command---only root does, presumably for security
reasons, since unless you inhibit it, passwords can be displayed
there.
Further information on PPP is available from:
Last Updated: 2000/05/29 14:23:27 Graham.Williams@cmis.csiro.au
This is the Gnome applet I use for modem access. After adding a
user to the "dip" Unix group they can use this applet to dial the
modem, display transfers, and to hangup. Under properties I had to
change the connect and disconnect commands to be pon and poff rather
than pppon and pppoff (which don't exist --- perhaps this is a
"problem"). The newer Potato version of the applet had the defaults
correct.
After moving to the potato distribution pon continued to work just
fine under the slink kernel when booting from the slink Custom Boot
disk. But as soon as I compiled my own kernel (2.2.13_2.2.13-2) and
pcmcia-modules, pon stopped working and I was getting an error from
plog:
I seemed to have "fixed" this by removing the setserial package.
The relevant kernel configuration options are:
Debian packages to install:
Both ALSA and the
traditional OSS work as kernel modules so that you are able to load
the modules dynamically, changing and experimenting with parameters as
required, without the need to rebuild the kernel. The module
parameters are located in /etc/modutils/alsa. The
alsaconfig utility provides a graphical interface for
editting this file and then loading the modules. If instead you do
this by hand, after you edit the file you can do the following:
This will update the actual configuration file
/etc/modules.conf. A configuration that I finally got working is:
(note that the line continuations marked by the \ actually
all need to be on the one line). You can then stop the sound driver if
it is already running and start it up with the new configuration:
You should hear a click from the speakers. Next, make sure it
works by playing a sound:
Then get xmms and listen to great mp3 quality.
Note that on boot, and only on boot, the message:
is displayed, but others get this message also and sound works for
them.
If you use xmms to play your mp3 files (recommended) be
sure to select the esound output library in the properties
configuration for xmms since otherwise xmms will lock the
sound device and GNOME sounds will wait for a chance to use it and
time out, making GNOME appear very sluggish.
For ALSA (and OSS) you need to know the parameters of your sound
card. There is some help from Dell. My
settings and other suggestions are in the table below (under the
CS4237B column). In the file /etc/modutils/alsa each of these
parameters is prefixed with snd_ and appear as
options for snd-card-cs4236. You should use the
graphical configuration utilitiy alsoconf to set the values,
which also does the necessary updates and turns muting off.
The information comes from [TP] Tomas Pihl, [RB]
Robb, and [NT] the MSWindowsNT
Diagnostics under the Administrative Tools menu. In particular, the
information from the MSWindowsNT Diagnostics for the cs32ba11 (on the
ISA bus), which I think is what the MSWindowsNT driver for this sound
card, is:
Using sound in GNOME (sound is enabled through the Control Center)
when the enlightenment sound daemon (esd) isn't running
causes each GNOME application to pauses each time it tries and fails
to play a sound.
Initially, users do not have access to the sound system. You may
get permission errors on /dev/sound and /dev/dsp. To allow a user,
fred, access to the audio, add them to the "audio" group:
Then, next time user fred logs on he will be in group
audio in addition to the other groups he was already in. He
will then be able to access the audio devices. Be cautious though
since members of the audio group may use the microphone attached to
your computer to eavesdrop on you (even from remote logins through ssh
or telnet)!
The Secure Shell (abbreviated ssh) provides a secure mechanism for
communicating withremote hosts and is a drop in replacement for things
like rsh, rlogin, and rcp. All communications is encrypted, and is
highly recommended.
The free reimplementation of the now commercial SSH is OpenBSD SSH
which is what Debian provides by default. The package to install is simply:
However, this package cannot be part of the main Debian
distribution since the US export laws prohibit the export of
cryptography software as it is classified as munitions! You will need
to have a non-US distribution in your sources.list file, such
as one of the following:
During the install you may be asked about installing ssh as SETUID
root. The suggesting from the configuration script is that you do not
install as SETUID root and it you have problems, then run
dpk-reconfigure ssh to reconfigure the package. I've had no
problems with this.
Once installed, you can connect to remote hosts running
ssh (e.g., connect as user stu at
wxyz.domain.name.org) or copy files:
The rsync application is a related tool that is used to
efficiently copy files across the network. It can also be encouraged
to use ssh to perform it's tasks by setting the appropriate
environment variable:
The use of passphrases with public/private keys is more secure than
sending passwords over the network. When connecting to a remote host
that remote host will encrypt a random number with your public key and
require you (automatically) to decrypt it and return it before it agrees to connect.
Once you have ssh installed you can generate a pass phrase
that will be used to secure your communications with the outside
world. Once you've created a pass phrase you need to communicate this
to your remote host. These steps are simple:
If your remote host already has the authorized_keys file
then don't copy over it, but append the contents of your local
identity.pub to it. You can then do the following so that you
won't be asked for your password nor your passphrase each time you
interact with the remote host:
The ssh-add will prompt you for your pass phrase but from
then on all further interaction with the remote host will not reqquire
the pass phrase to be type again (it is rembered).
<>NEED TO VERIFY THE FOLLOWING PROCEDURE
For the same effect in X windows start X with (THIS IS NO LONGER
REQUIRED?):
and enter your pass phrase on the startup of the X session and
all further ssh connections within this X session will require
no further password or pass phrase.
Better still you can install packages that will prompt you for the
pass phrase when you start up an X session:
Then add an ssh-add command to your .xsession file to have
the pass phrase promtped for, using a Gnome dialog box, automatically
each time you start up your X session:
XAuthority provides a mechanism for ensuring secure access to your
display from other hosts connected to the network. Refer to the mini
HOWTO for details.
Once connected onto a network (e.g., connecting via modem to a
dialup service) you can use ssh (the Secure SHell) to login
to remote hosts and then have them start up X clients to be displayed
on your local host. The ssh protocol encrypts all
communications and performs some compression of the communications.
By default, Debian ssh does not allow X11 connection
forwarding from remote hosts. This is a security measure. Instead,
for each remote host you would like to connect to and have
applications running there to display on your X11 display you will
need to allow X11 forwarding. This is achieved by adding the
following lines to your /etc/ssh/ssh_config (assuming the
remote host you want to allow is called
wxyz.domain.name.org.au):
The LBX
extension to X11 performs compression of the X11 communications
protocol. On your remote host you run the lbxproxy command
which, by default, creates a `fictional' display called :63
(so, for example, on the remote host you would then run xterm -d
:63). The lbxproxy application will transform all the
communications via display :63 into a copmressed protocol and send them on through to the actual display of your local host.
While ssh takes care of xauth issues when connecting to a
remote host you have to take an extra step to pass this on to clients
displaying through LBX. By default lbxproxy sets up a display on :63.
Thus on your local host (abcd) you grab the xauth key:
You can automate this a little by adding the following to your
.bashrc (on your local machine, abcd). Then type the command
lbxauth (on abcd), be prompted for a password (unless you set
up ssh to not use passwords), and the remote xauth will be set up.
The remove before the add is necessary as an add does nothing if the
:63 is already in the .Xauthority file (on wxyz).
The hard disk is /dev/hdc, however the GNU/Linux boot from floppy
does not always seem to find it, so I (sometimes) need to specify
a boot-time parameter:
The Audio from the CD-ROM does not work. The controls seem just
fine, in something like gtcd, where you can start the CD playing etc.
But no sound is heard. It worked once when I first boot NT then into
Linux. Presumably there is some initialisation that NT did that Linux
does not know about? Perhaps I need to explore using loadlin from
MS-DOS after it has initialised things properly! Or is there some
setting not being set? I can certainly read the audio from the drive
and play it back as wav and mp3!
Last Updated: 2000/04/27 11:12:22 Graham.Williams@cmis.csiro.au
|
This document is copyright © 1999, 2000 Graham Williams and can be freely redistributed under the terms of the GNU Free Documentation License. Please email corrections and updates to Graham.Williams@cmis.csiro.au
Have Fun!