Some Tips
to share |
Q:Can my Modem work on Linux? A: Most AT-commands compatible modems will work
well (Serial/PCI/ISA) on Linux. But there are some so-called "winmodem" can't
work on Linux. This Modems need special software provided by the vendor and will take some
CPU time while Operation. You can run "minicom" in Linux to test if your modem
works. |
|
Enforced Filesystem checks | GPL
RedHat
Diald configuration | Building kernel | Kernel module |
Using diff files | X outside Unix |
Q: While booting to linux, the system
hold on at a statment Reached maximal mount count. How to deal with it?
A: Linux is checking your filesystem.
Simply wait for a while. Usually, Linux do this every 20 boots, or 6 months. This is a
good thing, since this prevent filesystem problems caused by kernel bugs from building up
and make the system unusable. If this is too frequently for your taste, you can change
these settings by tune2fs . See the man page for tune2fs for more details.
|
Q: I saw Redhat 6.0 GPL selling much
cheaper than the list price of Redhat 6.0 boxes. What is GPL? What is the different
between boxed and GPL version?
A: This probably refers to a version
which do not include the proprietary software and demo-ware which are bundled with Redhat
boxes. Also missing are boot floppy, installation manuals, getting-started guide, phone
and E-mail support. This version should be freely redistributable, and you should be able
to get it from Redhat ftp sites. Also, this is probably a wrong name, as there is
currently no Linux distribution which uses only on GPL'ed software.
GPL (GNU General Public License) is the name of a software
license written by Richard Stallman, the founder of Free Software Foundation and free
software in general. It is special in that it attempts to protect its users rather than
the software writers. To achieve this, the terms in this license do not forbid copying,
modifying, redistribution, debugging and reverse-engineering. Instead, it forbid anybody
to take the software, make modifications and distribute the modified binary without giving
out at least the same freedom recepient. In short, it tries to emulate a world without
software license by employing software licenses.
There are lots of different open-source software licenses
around, and not all people agree on the idea of GPL that every software should be free
because the people deserve that freedom. So there are lots of software which are not under
GPL, and in particular XFree is under a BSD style license. It is therefore wrong to call
the distribution Redhat GPL: it contains software which are not licensed under GPL.
|
Q: I use Linux with diald as
a dial-up server for my home network using Windows. The problem is that, whenever a remote
folder is opened by the Windows machines, the Linux start dialing unnecessarily. I think
this may be due to netbios packets. How can I fix it?
A: First, to prevent netbios packets from
triggering on-demand dialing, add the following to /etc/diald/diald.defs:
ignore tcp tcp.source=tcp.netbios-ns,tcp.dest=tcp.netbios-ns
ignore udp udp.source=udp.netbios-ns,udp.dest=udp.netbios-ns
ignore tcp tcp.source=tcp.netbios-dgm,tcp.dest=tcp.netbios-dgm
ignore udp udp.source=udp.netbios-dgm,udp.dest=udp.netbios-dgm
ignore tcp tcp.source=tcp.netbios-ssn,tcp.dest=tcp.netbios-ssn
Of course, this assume that /etc/services
have the correct entries for netbios:
netbios-ns 137/tcp nbns
netbios-ns 137/udp nbns
netbios-dgm 138/tcp nbdgm
netbios-dgm 138/udp nbdgm
netbios-ssn 139/tcp nbssn
However, if the Windows machines asks for IP addresses of
a remote host in the process which cannot be answered by the Linux host, the DNS packet
generated will still bring up the link. To prevent this, you should add the addresses of
the hosts needed by the Windows machines to /etc/hosts of the Linux dial-up
server.
By the way, you can easily monitor what requests are
bringing up diald , by using dctrl and diald-top .
|
Q: What are make zImage, make zlilo and make
bzlilo? I find that sometimes one work while sometimes another works. What are the
differences? What ismeant by the "z" and "b" there?
All of them are commands typed in the kernel source
directory, in order to compile a new kernel. The standard command for this is make zImage,
which at the end produce a new kernel image file arch/i386/boot/zImage in the kernel
source tree (if you use a PC). A "kernel map" file used for reporting kernel
problems is also created called System.map in the root of the kernel source tree.
After producing the new kernel, you have to install it
before you can use it. This typically involve copying the kernel image and kernel map to a
directory (usually /boot), modifying /etc/lilo.conf if needed (e.g. to have more than one
kernel for testing), and running lilo to configure the boot loader. The next time the
machine is booted, it uses the new kernel.
If you don't need to modify /etc/lilo.conf (i.e. the new
kernel should overwrite the old one, a backup is made with old suffix), and the directory
you use to place the kernels is really /boot, you can use make zlilo to automate the
things. After it, you just need to reboot.
Due to the limitation of the PC architecture, the default
kernel layout only allow about 1M uncompressed kernel. For larger kernels, you will get a
message like "kernel too large" when you make it. The make bzImage and make
bzlilo can be used in this situation, as an alternative to have more things compiled as
modules. The "b" here means "big": by using a different layout, it can
tolerate bigger kernel. (N.B. Some might think b is for the bzip or the bzip2 compression
format, but actually bzImage just uses regular gzip for compression, like zImage. This is
what meant by "z".)
Further information can be found in:
Documentation/kbuild/commands.txt. Also, if you use Debian, note that there is a Debian
package called kernel-package, which let you create kernel-image packages to seamlessly
work with the package system.
|
|
Q: What are kerneld and kmod?
A: Usually, in order to preserve memory, and to allow the
same kernel to be used in different machines, much of the Linux kernel is compiled as
modules. In this way, only those useful parts of the kernel need to be load into the
memory. System administrators can use commands like insmod and modprobe to load modules.
When they are not needed, rmmod. Also, if you use Debian, note that there is a Debian
package called kernel-package, which let you create kernel-image packages to seamlessly
work with the package system.
For modules which are used only sparsingly (e.g. the fat
module, if you only use it to read a floppy), having to load and remove the kernel module
by hand becomes bothersome. kerneld comes to solve this problem. It can be used to
automatically call modprobe and rmmod when the need comes and goes. After running
kerneld, you just need a file called either /etc/conf.modules or /etc/modules.conf to
setup the path, options and aliases, without needing to call modprobe or rmmod directly.
In Linux version 2.2, this functionality get absorbed into
the kernel. The kerneld program is no longer needed. Instead, a kernel thread called kmod
will handle all the kernel module requests. On the other hand, kmod will never unload a
module. Typically a cron job runs rmmod -a every some minutes to remove all unused
modules.
For more information, you can see the Documentation/kmod
file in the kernel source tree.
|
|
Q: When I download program source files, I usually
find files with names like *.diff which are much smaller than the tar.gz files. Can I use
of these files instead of the large ones?
A: A diff is a file which record the differences of a
software between two adjacent versions. The rationale is that even if a software (in its
source code) is large, there is usually not too much difference between two adjacent
versions. You can get only these difference and save a lot of download time if you already
get an old version which is recent enough. Of course, if you do not have an old version
you must get the big file.
To use diffs, you should download all the patches from
your old version and the newest version. Decompress the old version, and change to the
directory right outside where your software lies. (For example, if the software is the
Linux kernel which stays at /usr/src/linux, you should change to /usr/src.) Then call
"patch -p0 filename" for each of the diff file you downloaded, from the oldest
one to the newest one. After that, you can see if any patch is rejected (e.g. by
"find linux -name \*.rej"). If everything went fine you can go on to build the
software.
|
Q: Can I remotely run X applications from
Linux using a Windows/Win98 desktop?
A: X is basically a display server,
running on the machine having keyboard, monitor and mouse. The X (client) application runs
on the machine having the data and CPU time (and the executable file of the application).
X clients tells the server via the network about what it wants to display, X server tells
the clients what keys and mouse events has occurred. X applications usually runs on the
same machine as the X server, but this is not necessary.
With this concept, the most natural way to run Linux X
applications remotely is to find a X server program running on Windows. There are many
choices, some of them are:
However, there is another interesting possibility provided
by VNC. You can instead run a special X server in the machine where you intend to run the
X clients (i.e. the Linux machine). The server does not connect to the local (Linux)
keyboard, mouse and display, but instead communicate with another program in other (Linux
or Win95) machines in the network to get the keyboard and mouse events from that computer,
and to show the display in that computer. What exciting is that the communication link
with the Win95 program is dynamic: you can kill the Win95 program while leaving the VNC
server running. When you connect it from another machine, you get back to exactly the same
state. This program also support some OS other than Win95. Find more information from:
|