Text 3737, 348 rader
Skriven 2005-10-09 14:35:06 av Pascal Schmidt (1:340/401.2)
Ärende: Linux FAQ (4/5)
=======================
----- xad begins -----
write drivers for Win???? devices. Don't hold your breath, though.
It is a difficult task and will require some time. For WinModems,
take a look at
http://linmodems.org
For printers, you can try to find information on
http://linuxprinting.org
+-+
3.3 Specific things
This section has information on how to setup specific types of
hardware to run under Linux.
+-+
3.3.1 How do I configure my sound card?
Contributed by: Pascal Schmidt
Most distributions today should have a tool ready for configuring
sound support. On Red Hat, it is called sndconfig and can do most
of the work for you. For those people not having such a tool, here
is good old configure-it-by-hand approach.
The first step is to find out which kernel driver to use. You need
to have the kernel sources installed for this. Go to the directory
where it's installed, then to the subdir Documentation/sound. There
you'll find a few text files. Go through them to find out whether
your sound card is supported. They will also tell you what driver
to use and what options to pass to that driver.
If you are using a default kernel from your distribution, chances
are good that the sound module you need is already there and
waiting to be used. You need to put a few lines in the file
/etc/modules.conf to get the sound support to autoload. To take an
example, I have (Soundblaster 128 PCI):
alias sound es1371
options es1371 joystick=0x200
You need to replace es1371 with the name of the sound module you
need and the "joystick=" part with the options you need to give to
your sound module. Depeding on your card, you may need another
module for MIDI support. This works the same way, just use "alias
midi" instead of "alias sound". For newer kernels and distri-
butions, it may be neccessary to use "sound-slot-0" instead of just
"sound".
After you have done all this, run "depmod -a" and then try to play
sound with a player program of your choice. Try this as root, it
is possible that the permissions on the sound device don't allow
others to play sounds! If this still doesn't work, it is likely
that the module for your sound card is not around. You will then
needs to recompile your kernel, including the module needed for
your sound card. Don't panic! It's not as difficult as it may
sound. There is a Kernel-HOWTO, which describes the process in
great detail.
If your sound card is ISA and Plug and Play, see below on how to
enable the card. You need to do this before you can try to load the
sound modules.
+-+
3.3.2 What about large hard disks?
Contributed by: Francois Thunus, Pascal Schmidt
Linux itself has no problems with large hard disks, it accesses
the drive controller with its own drivers. The only problem is
getting Linux to boot in the first place. Most programs which do
this (LILO, loadlin, etc.) use the BIOS to load the kernel. This
means the kernel needs to be somewhere on disk where the BIOS has
access. The problem is that in the days when the BIOS interface was
designed, 40 MB was considered to be a really huge hard disk. The
same interface is still in use today.
The general limit for the BIOS interface is 1024 cylinders, which
is the maximum number of cylinders addressable by the interface
routine. Depending on BIOS version and the translations it can use,
the limit in bytes can be 500 megabytes, or 2 gigabytes, or at best
8 gigabytes. Once LILO and others start to support the newest BIOS
extensions, the limit will be 32 gigabytes. For now, this means the
kernel must be at start of the hard disk, with start meaning in the
area accessible by the BIOS. This can be ensured by having a small
partiton for the /boot directory on the first few cylinders of the
disk. A few megabytes are enough, only the kernel and a few small
files will reside here.
The install programs of most distributions will ensure by them-
selves that the kernel gets put in an apropriate place.
You can also store the kernel on a DOS or Windows partition and
then use programs like loadlin to load the kernel from DOS. loadlin
and its documentation are often found on distribution CDs.
The newest version(s) of lilo, the Linux loader, can use the
extensions present on modern BIOSes to work around the 1024
cylinder problem. If you have a recent distribution, you may
already have the newer lilo and don't have to care about problems
with large hard disks.
+-+
3.3.3 How do I configure my parallel port?
Contributed by: Rajesh Dhawan, Pablo Saratxaga
If you want to change your printer port, say from IRQ 7 to IRQ 5,
you will have to tell the Linux kernel about the change, because
it assumes IRQ 7 by default. Pass the following as an option to the
kernel (with LILO, loadlin or similar tools, see their man pages):
lp=port,irq
For example, if using LILO, add this to the top of /etc/lilo.conf:
append="lp=0x378,5"
The 0x378 up there is the port address of the printer port, and the
5 obviously is the IRQ to use for it.
If you have parallel port support as a kernel module, the above
won't be of any use to you. Instead you will have to tell the
module where to find the port. This is done in /etc/modules.conf:
options lp io=0x378,irq=5
options plip io=0x378,irq=5
In case you are wondering, plip is another kernel modules that
uses the parallel port. There is at least a third, called ppa,
which is used for parallel port ZIP drives, but it doesn't seem to
have an option for the IRQ.
+-+
3.3.4 What about ISA PnP cards?
Contributed by: Pascal Schmidt
If you have ISA PnP cards on your systems, you will need to use the
isapnp-tools to configure them before they can be used. The tools
come with all major distribution and should already be installed.
If not, look for them on your distribution CD.
The first step is to run the pnpdump utility. It will query all the
cards for their possible configurations. To save this to a file:
pnpdump > /etc/isapnp.conf
The boot scripts of most distributions will look for this file and
then run isapnp automatically on bootup when it is there.
You will then have to take your favourite text editor and edit the
isapnp.conf file. There is no magic configuration utility, you will
have to decide yourself which resources to allocate to which card.
See the manpages to isapnp, isapnp.conf and pnpdump for details on
how to do this.
After you have edited the file, either reboot or run isapnp
manually for the settings to take effect. Your PnP cards should now
be activated, and you can begin to configure your system to use
them. For sound cards, see the section on them above.
All of this is different in the 2.4.x kernel series. There, ISA PnP
support is part of the kernel itself and everything is handled by
the kernel at bootup.
+-+
3.3.5 How much RAM do I need to install Red Hat?
Contributed by: Pascal Schmidt
This bit of information should be available from Red Hat themselves
and is almost certainly also listed in the documentation files that
sit on each Red Hat CD. Nevertheless, it can be hard to find for
older versions, and the question sometimes just pops up in the
echo.
The RAM requirements for Red Hat's text mode installer are less
than for their graphical (GUI) installer - if you have trouble with
the GUI mode, try the text installer.
Red Hat 6.2 requires 32 MB of RAM for the text mode installer, so
if you have less, you'll have to fall back to 6.0 which does
install with less than 32 MB. No idea about version 6.1.
Later versions of Red Hat seem to require at least 64 MB of RAM
even for the text mode installer.
+-+
4 Configuration issues
This section describes a few configuration issues not related to
hardware setup.
+-+
4.1 How do I get internet access with Linux?
Contributed by: Pascal Schmidt
Although this is the FAQ of a FidoNet conference, most of us
realize that internet access is a great thing to have when running
Linux. There is quite a lot of software and documentation for Linux
available on the internet.
The most common way to get internet access is to have an isp (which
means internet service provider) which provides you with a dialup
account via ppp (point to point protocol). This can be either via
ISDN or by modem on the good old telephone network.
Either way, there are quite a few programs available to help you
setting up your ppp connection. For KDE users, there are kppp for
modem access and kisdn for ISDN access. On the console, you can
use wvdial (modem users). Alternatives to kisdn are isdnconfig on
Debian and isdn-config on Red Hat (6.1 and up). There's also
pppconfig on Debian for those who prefer modems.
With so many programs available, I suggest to use one of them. Of
course there is also an "old school" way to do it. If you want to
take this route, and learn something about the way Linux handles
ppp, read the PPP-HOWTO and the manpages to pppd or ipppd. This way
involves writing a few shell scripts and setting up some config
files.
+-+
4.2 Help! My prompt confuses me!
Contributed by: FIXME (there were a lot of people on this thread)
Under bash, the prompt is configured by changing the content of the
PS1 environment variable. You can see your current setting by
giving the command
echo $PS1
on the bash prompt. To change it, you would say:
export PS1=<new value>
Take a look at the bash man page to find out what you can put into
the prompt. Be warned, it is a rather long and technical document.
One example of what to include in your prompt is the name of the
console you're currently working on. This has been suggested by
quite a lot of people on LINUX, and you could to it like this:
export PS1="[\u@\h (`tty | cut -b6-`) \w]\\$ "
To save your customized prompt, put this export statement into
the file .bashrc in your home directory.
+-+
4.3 How do I customize the bootup process?
Contributed by: Mike Mcclain, Francois Thunus, Pascal Schmidt
This is a difficult question, as all the distribution are using
somewhat different approaches to system initialization. The safest
way is to use the tools that came with the distribution itself. On
SuSE, this is yast. On RedHat, use setup, control-panel, or
linuxconf.
You can find out where to look by first checking out /etc/inittab.
There will be an entry called "sysinit". This is the program that
gets run at boot. Very often this will be a shell script. You can
look into that script to find out what gets run on bootup. Most
of these things will also be scripts. Look at them to find out
where they store their configuration files.
Somewhat standard places to store the bootup scripts are /etc/rc.d
and /etc/rc.d/init.d. SuSE has them in /sbin/init.d. The config
files that drive the bootup process will probably be somewhere
under the /etc directory. For SuSE, the main config file is
/etc/rc.config. On Red Hat, most of the system configuration is
found under the /etc/sysconfig directory. Other distributions may
use the same or very similar places.
+-+
4.4 How do I turn the screen saver off?
Contributed by: Pascal Schmidt (originally from the German echo
LINUX.GER)
This depends on whether you are in X Window or on the Linux
console. For X Window, the built in screen saver is configured
with the xset command. To turn it off entirely, use:
xset s off
There may also be other screen savers active. KDE, for example,
comes with its own screen saver - that one can be disabled in the
KDE control center.
On the console, the command to use is
setterm -blank 0
You can use other values than 0 to turn it back on. The number
indicated the timeout to use before the screen goes blank.
+-+
4.5 Help! The output of program <insert-name-here> just flies by!
Contributed by: Francois Thunus, Pascal Schmidt
Bugfix by: Martin van Beilen
Some of the commands you will try out on the console can output
real heaps of information at once. There are several ways to deal
with this. First, if you did not switch consoles since the program
was running, you can simply press <shift>-<pageup> to scroll back
up. This also works inside xterm windows.
If this doesn't help, you can also redirect the output of the
command to a file:
program > myfile
This will write all output from program to the file myfile. This
does not include error messages, and overwrites the file myfile.
If you want to capture error messages also, use:
program &> myfile (this works in bash)
If you do not want to overwrite the file, but append to it, use
>> instead of >.
You can also pipe the output of program through a so-called pager.
The most common pagers are "less" and "more". They will enable you
to scroll through the output of the program at will. Example:
program | less
----- xad ends -----
--- Msged/LNX 6.1.1
* Origin: By order of the king, the city must empty. (1:340/401.2)
|