Administration
  Home arrow Administration arrow Page 2 - Kernel, Cron, and User Administration, Part 2
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ADMINISTRATION

Kernel, Cron, and User Administration, Part 2
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 7
    2004-10-06


    Table of Contents:
  • Kernel, Cron, and User Administration, Part 2
  • Updating Your Boot Loader
  • The Kernel Source Tree and Documentation
  • The Kernel RPMs
  • GUI Kernel Source Management
  • The Linux Kernel tar File
  • Understanding Kernel Configuration Options
  • Compiling and Installing a Custom Kernel
  • The cron and at Systems
  • Setting Up cron for Users
  • Certification Summary
  • Self Test
  • Lab Questions
  • Self Test Answers
  • Lab

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Kernel, Cron, and User Administration, Part 2 - Updating Your Boot Loader
    ( Page 2 of 15 )

    If properly configured, the Red Hat kernel that you install should automatically update your boot loader. But as a RHCT or RHCE, you need to know how to check. If the code described in this chapter has not been added, you’ll need to know how.

    Whether you’re using GRUB or LILO, it is advisable to keep your old kernel in case something goes wrong. So you’ll be adding a stanza to either /etc/grub.conf or /etc/lilo.conf. In either case, the changes that you’ll make will be as if you’re setting up two different operating systems.

    Updating GRUB

    Look at your /etc/grub.conf file. If you have Linux on your system and use GRUB, you should already have a stanza that points to the appropriate locations for your original Linux kernel and Initial RAM disk. For example, here is an excerpt from my RHEL 3 /etc/grub.conf file (which includes a dual-boot configuration with Microsoft Windows):

    title Red Hat Enterprise Linux ES (2.4.21-4.EL)
      root (hd0,0)
      kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/
      initrd /initrd-2.4.21-4.EL.img
    title DOS
      rootnoverify (hd0,1)
      chainloader +1

    In Red Hat Enterprise Linux, the vmlinuz and initrd files are already in the /boot directory. Since you’ve copied the revised kernels to the same directory, all you need is a second stanza that points to your revised files. When I revised my kernel earlier in this chapter, my EXTRAVERSION variable in /usr/src/linux-2.4/Makefile was -4.ELcustom. The changes are in bold:

    title Red Hat Enterprise Linux ES (2.4.21-4.EL)
      root (hd0,0) 
      kernel /vmlinuz-2.4.21-4.EL ro root=LABEL=/
      initrd /initrd-2.4.21-4.EL.img
    title Red Hat Enterprise Linux ES (2.4.21-4.ELcustom)
      root (hd0,0)
      kernel /vmlinuz-2.4.21-4.ELcustom ro root=LABEL=/
      initrd /initrd-2.4.21-4.ELcustom.img

    title DOS
      rootnoverify (hd0,1)
      chainloader +1

    Since you don’t need to load /etc/grub.conf into the MBR, no further action is required. The resulting GRUB menu looks like Figure 5-10. Note how the original kernel is set as the default. If you’ve watched closely, you’ll note that in /etc/grub.conf, the value of default was changed from 0 to 1. If you want to set the default to the new kernel, change the value of default back to 0.

    Figure 5-10  GRUB menu with original and recompiled kernels

    The GRUB Menu

    Updating LILO

    Alternatively, if you’re using LILO as a boot loader, you’ll need to revise /etc/lilo.conf. Add a stanza that points to the new kernel. Take a look at the following excerpt from /etc/lilo.conf:

    image=/boot/vmlinuz-2.4.21-4.EL 
      label=linux
      initrd=/boot/initrd-2.4.21-4.EL
      read-only
      append="root=LABEL=/"

    From this information, you can see that the original kernel is called vmlinuz-2.4.21-4.EL. Assume LILO resides on the MBR and controls the boot process. Now add another stanza for the new kernel.

    image=/boot/vmlinuz-2.4.21-4.EL
      label=linux
      initrd=/boot/initrd-2.4.21-4.EL
      read-only
      append="root=LABEL=/"
    image=/boot/vmlinuz-2.4.21-4.ELcustom
      label=linux
      initrd=/boot/initrd-2.4.21-4.ELcustom
      read-only
      append="root=LABEL=/"

    Save this file, then run the lilo -v command. The output should resemble the following:

    LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger
    'lba32' extensions Copyright (C) 1999,2000 John Coffman

    Reading boot sector from /dev/hda
    Merging with /boot/boot.b
    Mapping message file /boot/message
    Boot image: /boot/vmlinuz-2.4.21-4.EL
    Mapping RAM disk /boot/initrd-2.4.21-4.EL
    Added linux *
    Boot image: /boot/vmlinuz-2.4.21-4.ELcustom
    Added newLinux
    Backup copy of boot sector in /boot/boot.0300
    Writing boot sector.

    When you reboot, LILO will wait for you to enter a label, in this case, either linux or newLinux.

    EXAM WATCH! Although there are references to both GRUB and LILO in the RHCT and RHCE exam curricula, Red Hat is focusing on GRUB and has “deprecated” LILO. Therefore, I believe you can expect to work with GRUB on the Red Hat exams.

    Kernel Sources

    One of the strengths of Linux is the ease with which you can customize your kernel to precisely meet your needs. But before you can start this process, you need the Linux kernel source code.

    While references to recompiling the kernel have been removed from the Red Hat exam requirements, you may still need to find kernel modules and configuration files, which I cover in this section.

    EXAM WATCH! Fortunately, the Red Hat exams no longer specify requirements to recompile the Linux kernel. Nevertheless, it is a very important skill for any Linux administrator.

    This is part one from the fifth chapter of Red Hat Certified Engineer Linux Study Guide (Exam RH302), fourth edition, by Michael Jang. (McGraw-Hill/Osborne, 2004, ISBN: 0-07-225365-7). Check it out at your favorite bookstore today. Buy this book now.



     
     
    >>> More Administration Articles          >>> More By McGraw-Hill/Osborne
     

       

    ADMINISTRATION ARTICLES

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek