Custom Search

Sunday, June 29, 2008

What to do when the kernel size is too big

To configure Linux to detect a new hardware part, especially on a new kernel, you may need to recompile the kernel. If you add too many devices in the kernel configuration, you may get an error message telling you that the kernel is too big. The trick is to enable modules.

The kernel itself must be a certain size because it needs to be loaded in a fixed memory size. This is one reason why modules can be very handy. If you enable modules, you will need to make them:
make modules

and install them:
make modules_install

Then using the modprobe utility you can load selected modules on bootup. This way the kernel will be smaller and will compile with no error.

Thursday, May 15, 2008

Device drivers for hardware devices

Device drivers is one of the imortant and necessary thing required for Hardware devices . Every operating system, including the Linux kernel, comes with a lot of them.
When you configure a kernel, the menu from which you must choose which devices you have in your computer is actually a list of device drivers available to you. You can configure your kernel by using the following:
cd /usr/src/linux
make menuconfig
All existing hardware can not be supported by Linux. Like other operating systems it is still not that popular
If you have a device that is not in the list, then you will need to search for it on the Web. Some drivers may exist for Linux and not be in the default kernel. But if a device is not currently supported by any driver for Linux, then you will have to wait for someone to make one, or make one yourself.

No device found eventhough LPD is started

LPD is the printer daemon. Its initiation takes place at boot time and gets started during booting of the system. Assume that a printer is connected to the printer port. But a problem may occur when the daemon is started and no device is found.
A configuration problem in the kernel can be considered as one of the most common cause for this problem . Make sure that parallel port, PC-style parallel port, and printer support is enabled in the configuration, and that modules are loaded.

How to control the blinking of keyboard leds.

Nothing irritates you more than blinking keyboard leds while you are working on your computer. They generally intimates you about your num lock or caps Lock key, if ON. Keyboard leds can definitely be used for other meaningful purposes also.
The keyboard leds can be controlled by a device driver called the misc driver. That driver can control all kinds of misc things. You could write your own driver to make them blink or light up at any system event.
A program called tleds is available from That program will have them blink based on network usage. This will lead to blinking of one LED for incoming packet and one for outgoing packet.

Find hardware information

When the Linux system boots, it will try to detect the hardware installed in the computer. It will then make a fake file system called procfs and will store important information about your system in it.
You can get information about your system simply by browsing the directory /proc. The files in there will contain information such as the processor you have, the amount of memory and the file systems the kernel currently supports.

Added processors

Dual processors are becoming more and more popular in computers. Of course, you won't be able to see much performance increase in Linux unless you tell Linux about the second CPU. Here is how to do it.
Go in the kernel, and enable SMP. SMP means Symetric Multi-Processing and tells the kernel that more than one processor can be used.
After a reboot, Linux should tell you that it has detected 2 processors and what their status are.

Detecting 2 ethernet cards

To configure an ethernet card in Linux, you need to enable it in the kernel. Then the kernel will detect your ethernet card if it is at a common IO port. But it will stop there, and will never check if you have 2 ethernet cards.
The trick is to tell the ethernet driver that there are 2 cards in the system. The following line will tell the kernel that there is an ethernet card at IRQ 9 and IO 0x300, and another one at IRQ 10 and IO 0x340:
ether=9,0x300,eth0 ether=10,0x340,eth1
That line can be added up in the /etc/lilo.conf file or at the "boot:" prompt on bootup . YOu also need to run the following command:
That will reload the lilo.conf file and enable changes.