Lab #1: Kernel Build
Date: January 13, 2006

All labs are done using a VMWare virtual machine. If you haven't set up your VM yet, follow the instructions in VMWare Setup.

To build a new kernel, use the following procedure:

  1. Start VMWare Player
  2. Open the virtual machine from within the CSC660 directory.
  3. Login as student.
  4. Start X Windows.
    startx
    
  5. Open a terminal window and change to your src/ subdirectory.
    cd src
    
  6. Download a copy of the Linux kernel.
    wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.10.tar.bz2
    
  7. Unpack the kernel
    tar -xjf linux-2.6.10.tar.bz2
    
  8. Change into the kernel directory
    cd linux-2.6.10
    
  9. Generate tags database for source browsing
    make tags
    
  10. Configure the kernel
    make xconfig
    
  11. Select the following configuration options
    Code maturity level options
        Y Prompt for development and/or incomplete code/drivers
            Y Select only drivers expected to compile cleanly
    Processor type and features
        Y Pentium 4
        N Math Emulation
    Power management options
        N Power Management support
    Bus options
        PCCARD
            Y ISA support
                N EISA support
            N MCA support
            N NatSemi SCx200 support
        N PCI Hotplug support
    Device Drivers
        N Old CD-ROM drivers
        N IEEE 1394 (FireWire) support
        Networking support
            N Amateur Radio
            N IrDA (infrared)
            N Bluetooth
        N ISDN subsystem
        N Telephony Support
        N Sound
    File systems
        N Miscellaneous filesystems (disable all except cramfs)
        Network File Systems
            N SMB
            N CIFS
            N NCP
            N Coda
            N AFS
    Kernel hacking
        We'll want to turn on many of these later.
    
  12. Build the kernel
    make bzImage
    
  13. Build kernel modules
    make modules
    
  14. Become root to install the kernel
    su -
    
  15. Install kernel and kernel modules
    make install
    make modules_install
    
  16. Add your new kernel to GRUB's boot menu
    vim /boot/grub/menu.lst
    

    Add a new entry of the form before the two pre-existing Debian GNU/Linux entries:

    title   Test Kernel (2.6.10)
    root    (hd0,0)
    kernel  /boot/vmlinuz-2.6.10 root=/dev/sda ro
    savedefault
    boot
    
  17. Reboot your system to try out the new kernel.
    reboot
    
 

©2006 James Walden, Ph.D.