Kernel Size and Modules

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.

---

LILO can't find a kernel on a big drive

On some big hard drives, LILO can have problems loading your kernel. The problem is because the hard drive has more then 1024 cylinders.

The trick is to make sure your kernel is in the first 1024 cylinders so LILO can find it. The way to do this is to make a small /boot partition at the begining of the drive, and make sure the kernel is in the /boot directory.

You can set the partitions in fdisk, and select the right path for the kernel in /etc/lilo.conf so LILO knows where it is. When you compile your kernel, simply move the new kernel in that directory so LILO can load it.

---

Multiple kernels choices

When you compile a new kernel, you will often change your configuration. This means you may forget to include an important driver, like the IDE driver, or otherwise make your system unbootable. The solution is to always keep your old kernel.

When you compile your kernel, the compilation procedure will often copy your old kernel into vmlinuz.old.

If it does not, you can do it manually. What you should do is add an entry to /etc/lilo.conf allowing you to boot your old kernel. You should view the lilo man page for the complete syntax. You could also add entries for different kernels, for example if you want to have an older stable version of the kernel and the newest development version on your system.

Note that some distributions name their kernel with the version they represent. For example, your current kernel may be /boot/vmlinuz-2.0.36-0.7

Linux Tips

See Also
How To Make Linux Bootable Disk

Have a Linux Problem
Linux Forum - Do you have a Linux Question?

Linux Books
Linux Certification, System Administration, Programming, Networking Books

Home Index
Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.