Administration
  Home arrow Administration arrow Page 15 - Kernel, Cron, and User Administration,...
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
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? 
ADMINISTRATION

Kernel, Cron, and User Administration, Part 2
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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
     
     
    IBM Developerworks
     
    ADVERTISEMENT

    PCmover - $15 Off with Coupon Code CJPH7Q

    Kernel, Cron, and User Administration, Part 2 - Lab
    (Page 15 of 15 )

    Lab 1
    This lab has two purposes: it is designed to help you understand mounted network directories and the login process. You can substitute the user, the shared network directory, and directories of your choice. But based on the premises in this lab, I would take the following steps:

    1. Log in as user vaclav. Create the specified directory. For this lab, you would use the mkdir /home/vaclav/inst command.

    2. Test the network connection. Mount the remote NFS directory on the directory that you just created. For this lab, use the following command:

      # mount -t nfs 192.168.30.4:/mnt/inst /home/vaclav/inst

    3. Run the mount command by itself. If you’ve successfully mounted to the shared directory, you should see it at the end of the list of mounted directories.

    4. Unmount the network connection. For this lab, you would use the following command:

      # umount /home/vaclav/inst

    5. Add the commands specified from steps 2 and 4 to the local .bashrc and .bash_logout configuration files. Remember, since these files start with a dot, they are hidden.

    6. Test the result. Log out and log back in. Check your mounted directories. If the command in .bash_logout does not work, you’ll probably see the shared directory mounted multiple times.

    Lab 2
    The purpose of this lab is to get you some more practice with creating quotas for users. It’s quite possible that you’ll have to configure quotas on the Red Hat exams. While you may not have to test quotas in the way described in this lab, it will help you become familiar with the error messages that you’ll see when you exceed a hard and then a soft quota limit.

    Lab 3
    Before we can build a new kernel, we have to ensure we have all the correct RPM packages. You could do so by checking a list of RPMs as described. Alternatively, you can start the Package Management utility with the redhat-config-packages command. From this GUI utility, make sure you have the Kernel Development package group installed. As with the rest of this chapter and the Red Hat exams,

    this assumes that you have a PC with a 32-bit Intel type CPU. The procedures for other CPUs vary and are not, as of this writing, covered on the Red Hat exams. The following list of RPMs are associated with the source code:

    kernel-source-*
    glibc-kernelheaders-*
    glibc-devel-*
    cpp-*
    ncurses-*
    ncurses-devel-*
    binutils-*
    gcc-*

    1. When you install RHEL 3, you’ve probably already installed most of these packages. Alternatively, it may be faster to install the Kernel Development package group using the Package Management utility. This utility automatically takes care of any dependencies.

    2. Navigate to the /usr/src directory with the cd /usr/src command. Run the ls -l command. You should see a link between the linux-2.4 directory and the location of your source code files. In RHEL, that is by default the /usr/src/linux-2.4.21-4.EL directory.

    3. Navigate to the /usr/src/linux-2.4 directory. You’ll be running the remaining kernel configuration commands from this directory.

    4. Set up a unique name for the kernel that you’re about to modify. Open the Makefile file in a text editor. Look for the EXTRAVERSION variable. Red Hat adds this variable as a suffix to the recompiled kernel. Modify this variable as desired; save and exit from Makefile.

    5. Jot down the value of the EXTRAVERSION variable here: ______________

    6. Determine the correct CPU on your hardware. Use the command

      # cat /proc/cpuinfo

    7. Jot down the CPU model name here: ________________

    8. Run the ls /usr/src/linux-2.4/configs command. You’ll see a list of available default kernel configuration files. Find the file associated with your CPU. If your computer has more than one CPU, use the smp version of the kernel, if available. If your computer has more than 4 GB of RAM, use the hugemem version of the kernel, if available. Save it in the /usr/src/linux-2.4 /.config file.

    9. Make sure you’re in the /usr/src/linux-2.4 directory. Clean up any stray source code from previous kernel reconfigurations with the following command:

      # make mrproper

    10. Wait until the messages are complete. Problems are rare at this stage.

    11. Next, it is time to configure your kernel, using one of the three major tools:

      • make config A line-by-line tool that gives you a choice with all kernel options

      • make menuconfig A text-based menu that allows you to select just the changes you want

      • make xconfig A GUI interface that works only in the X Window System

    12. Set the processor type to match your hardware (for example, Pentium, Pentium II, Pentium III, Pentium IV).

    13. Return to the kernel configuration tool of your choice. Turn off all unneeded devices. Some possible unneeded devices are in the following categories:

      • ISDN Subsystem
      • I2O
      • Old CD-ROMs
      • Amateur Radio
      • Telephony Support
      • Symmetric Multiprocessing Support
      • MTR Memory Support

    14. Be sure to turn on Kernel Loadable Modules support.

    15. Save your changes and exit.

    16. When you save the new configuration, the kernel configuration tool overwrites your /usr/src /linux-2.4/.config file.

    17. Resolve all kernel dependencies (between sources) with the following command. This will produce a lot of output and may take several minutes.

      # make dep

    18. Prepare the source code directories to create the new kernel with the following command:

      # make clean

    19. Once your dependencies are resolved, it’s time to build a new compressed kernel image, with the following command:

      # make bzImage

    20. This is the actual kernel build, which will take some time. You may take this opportunity to log into another terminal and run one of the other labs.

    21. The easiest way to see if the kernel build worked is to run the following command immediately after the messages from make bzImage command stop:

      # echo $? 0

    22. If you got a 0, everything worked (success). Any other result indicates a failure during the kernel build process. In that case, go back and reconfigure your kernel to make a configuration that works.

    23. Check for the existence of two new files. Run this command:

      # ls -l System.map arch/i386/boot/bzImage

      It should show you two files, a relatively small System.map and a much larger bzImage.

    24. Make the loadable modules that will be used by this kernel:

      # make modules

    25. Install the new custom kernel files into their correct locations and update your boot loader so that it knows about your new kernel. The make install command should perform all of these tasks.

    26. Check to see that the make install command worked. Based on the EXTRAVERSION variable that you set earlier, check your /boot directory. You should see at least a new initrd, System.map, and vmlinuz file in this directory, with this variable as a suffix. Otherwise, you’ll need to copy these files yourself. Also, check your boot loader configuration file (/etc/grub.conf for the default GRUB boot loader).

    27. If the make install command didn’t put an initial RAM disk (initrd) into the /boot directory, you’ll have to create one with the following command (if your version and EXTRAVERSION variables are different, revise this command accordingly):

      # mkinitrd /boot/initrd-2.4.21-4.ELcustom1 2.4.21-4.ELcustom1

    28. Congratulations, you have just installed a custom kernel on your new system. As long as you also have your original kernel in your boot loader menu, test it out!

    29. Run the reboot command. You should see both kernels in the boot loader menu. Try your custom kernel!

    Lab 4
    Assuming everything works with the updated Red Hat RPM kernel package, you should not have to update anything, especially if your boot loader is GRUB. The steps described in the lab should help you confirm this through the appropriate configuration files on your RHEL 3 computer.

    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.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

       

    ADMINISTRATION ARTICLES

    - 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
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway