Linux Kernel

Kernel is a mediator for the programs and hardware. The Kernel's major subsystems are Memory Management, Process Management, I/O system, and File System.

Bootable Kernel Floppy

During the installation, you should create a bootable floppy. If you didn't, try to make a new kernel with the latest kernel source code. When adding new HW, RedHat linux will probe those devices and reconfigure the system to load additional device drivers at boot time. You don't need to make a new kernel, unless it does not recognize the newly added devices.
If you selected "Development" mode in OpenLinux installation, the kernel source code will be installed. You may download the latest kernel from the net or install source code from the second CD-ROM.

"rpm -i linux*src*.rpm" (OpenLinux)
"rpm -i kernel*src*.rpm" (RedHat)
You will see a bzipped linux source code ended with bz2 under /usr/src/OpenLinux. For RedHat, the source will be installed under /usr/src/redhat/SOURCES. To unzip and untar the source code, try bz2cat /usr/src/OpenLinux/*bz2 | (cd /usr/src; tar xf -)or zcat /usr/src/redhat/SOURCES/linux*.tar.gz | (cd /usr/src; tar xf -) You may have to install bzip source code and make bz2cat command. To find out what packages are install, enter rmp -qa.

To install a package say "wget*.rpm", enter rmp -i wget*.rpm. You may download the packages from the net, save the packages onto a MS-DOS floppy then copy it to a Linux system via mcopy a:. (assuming your Linux box is not on the net.)

  1. cd /usr/src/linux

  2. make mrproper
    Should only be done once when loading the new kernel source code. This step makes appropriate soft links and clean up .config file. (You may try cp .config to the other directory to be safe.)

  3. make menuconfig: refer to kernl Documentation for options information
  4. Code maturity level options --->
  5. Processor type and features ---> ([3-6]86, SMP)
  6. Loadable module support ---> (loading kernel modules at run time)
  7. General setup ---> (network, binary format)
  8. Plug and Play support ---> (unstable)
  9. Block devices ---> (IDE/SCSI) SS
  10. Networking options ---> (Sockets, TCP/IP)
  11. SCSI support ---> (disk, tape, cd-rom)
  12. Network device support ---> (ethernet card selection)
  13. Amateur Radio support --->
  14. IrDA subsystem support ---> (serial infrared interface - wireless )
  15. ISDN subsystem --->
  16. Old CD-ROM drivers (not SCSI, not IDE) --->
  17. Character devices ---> (virtual console, mouse)
  18. Filesystems ---> (DOS, FAT, VFAT and etc.)
  19. Console drivers ---> (VGA text console)
  20. Sound ---> (see Documentation/sound)
  21. kernel Hacking --->
  22. For sound card configuration, chances are that you need to select O (Open Sound System) sound modules for configuring the sound card on your system.
  23. make dep

  24. make clean

  25. make

  26. make modules

  27. make modules_install

  28. make bzImage

  29. Create bootable floopy with the new kernel:

    dd if=/usr/src/linux/arch/i386/boot/bzImage of=/dev/fd0 bs=1024b
    rdev /dev/fd0 /dev/hda2 # set root device assuming it is: /dev/hda2
    rdev /dev/fd0 # query root device
    mkbootdisk --device /dev/fd0 2.2.13
    (Note: this also creats a bootable disk of the running kernel.)

    Reboot the system with the new kernel image to make sure it works. If so, you may run "make install" to install the new kernel into hard drive as the default kernel. "Make install" will update lilo. But if you would like to boot from the old kernel, you have to modify lilo.conf with a different label for the old kernel. If you don't have the source code or you don't want to recompile a new kernel, you may load modules into kernel at run time via "insmod ModulesName". E.g.: To load a D-link ethernet card driver into a kernel, enter "insmod rtl8139.o". All the modules are installed under /lib/modules/2.2.12/ (assuming 2.2.12 kernel was installed - enter: uname -r). You may test the newly loaded ethernet driver module via "ifconfig eth0 10.10.10.1 netmask 255.0.0.0 up". This will bring up the ethernet card with an IP address 10.10.10.1 and netmask 255.0.0.0" If no errors displayed, you may ping 10.10.10.1 or ping other hosts on the same network. If everything goes well, you may add an entry into /etc/conf.modules for loading modules at boot time: e.g. alias eth0 rtl8139

    Alternatively, you may use linuxconf to select kernel module for the ethernet card. Select on Client tasks -> Basic host Information -> Kernel module. A pull down button will show all the ethernet modules. To avoid probing the I/O space, you may pass the following parameters to the kernel: reserve=0x300,32 ehter=0,0x300,eth1

    Kernel Hackers' Guide
    Use the source of Linux
    PCMCIA drivers PnP Linux Driver