Complete Idiot's Guide to Linux:Customizing Your Linux Kernel
function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg) {
var end = document.cookie.indexOf (";", j);
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(j, end));
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
var m1='';
var gifstr=GetCookie("UsrType");
if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; }
document.write(m1+m2+m3);
Keyword
Title
Author
ISBN
Publisher
Imprint
Brief
Full
Advanced Search
Search Tips
Please Select
-----------
Components
Content Mgt
Certification
Databases
Enterprise Mgt
Fun/Games
Groupware
Hardware
IBM Redbooks
Intranet Dev
Middleware
Multimedia
Networks
OS
Prod Apps
Programming
Security
UI
Web Services
Webmaster
Y2K
-----------
New Titles
-----------
Free Archive
To access the contents, click the chapter and section titles.
Complete Idiot's Guide to Linux
(Publisher: Macmillan Computer Publishing)
Author(s): Manuel Ricart
ISBN: 078971826x
Publication Date: 12/22/98
function isIE4()
{
return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') );
}
function bookMarkit()
{
var url="../../../../../www.itknowledge.com/PSUser/EWBookMarks.html@url="+window.location+"&isbn=0";
parent.location.href=url;
//var win = window.open(url,"myitk");
//if(!isIE4())
// win.focus();
}
Search this book:
Previous
Table of Contents
Next
Installing the New Modules
Installation of the modules is a little trickier because, by default, the module installation will want to overwrite existing modules. Modules are installed in the /lib/modules directory in a directory called after the kernel version. (Kernel version can be had with the uname r command.) For my setup, this means a path of /lib/modules/2.0.35.
To save the current modules, move them out of the way:
[root@digital linux]# mv /lib/modules/2.0.35 /lib/modules/2.0.35-old
Install the new ones with
[root@digital linux]# make modules_install
After the new modules install, set things back to the way they were so that the old kernel can still find them. You can do this by
[root@digital linux]# mv /lib/modules/2.0.35 /lib/modules/2.0.35-apm
[root@digital linux]# mv /lib/modules/2.0.35-old /lib/modules/2.0.35
If the new kernel you are installing is a different version, then this step is unnecessary because the new modules will have a different version and directory.
Configuring LILO
The final step in installing your kernel is setting up LILO. LILO (the Linux Loader) is the program that boots Linux from your disk. The LILO configuration file will look something like this:
[root@digital /]# more /etc/lilo.conf
#
# general section
#
boot = /dev/sdb1
install = /boot/boot.b
# default entry
#
image = /vmlinuz
initrd = "/boot/initrd.gz"
label = OpenLinux
root = /dev/sdb1
read-only
append = "load_ramdisk=1 ramdisk_size=2880"
#
# additional entries
#
Depending on the configuration of your system, you might not see the exact lines as in the example. But in looking at the example, you can see that there is already at least one Linux entry defined. The default entry is the one that boots after the time-out period has elapsed. You can install your new kernel as the default, as long as you save the previous entry just in case your new kernel doesnt behave the way you thought.
Insert the entry for the new kernel above the entry for the old kernel. Use the old entry as a partial guide. Youll need to specify values for the image (kernel file), label (name to display at boot), and root (same as in the old kernel entry). Add the read-only line at the end to specify that your filesystems are to be checked each time you boot this kernel. The resulting /etc/lilo.conf will be similar to
[root@digital /]# more /etc/lilo.conf
#
# general section
#
boot = /dev/sdb1
install = /boot/boot.b
# default entry
#
image = /boot/vmlinuz-2.0.35-apm
label = newkernel
root = /dev/sdb1
read-only
image = /vmlinuz
initrd = "/boot/initrd.gz"
label = OpenLinux
root = /dev/sdb1
read-only
append = "load_ramdisk=1 ramdisk_size=2880"
#
# additional entries
#
After editing the /etc/lilo.conf file, test to see that it works with
[root@digital /boot]# lilo -v -t
LILO version 20, Copyright 1992-1997 Werner Almesberger
Reading boot sector from /dev/hda
Merging with /boot/boot.b
Mapping message file /boot/message
Boot image: /boot/vmlinuz-2.0.35-apm
Added vmlinuz-apm *
Boot image: /boot/vmlinuz-2.0.35-modular
Added modular
Boot image: /vmlinuz
Added linux
The boot sector and the map file have *NOT* been altered.
If everything is all right, then you can create the boot sector
by issuing
[root@digital /boot]# lilo -v
LILO version 20, Copyright 1992-1997 Werner Almesberger
Reading boot sector from /dev/hda
Merging with /boot/boot.b
Mapping message file /boot/message
Boot image: /boot/vmlinuz-2.0.35-apm
Added vmlinuz-apm *
Boot image: /boot/vmlinuz-2.0.35-modular
Added modular
Boot image: /vmlinuz
Added linux
/boot/boot.0300 exists - no backup copy made.
Writing boot sector.
You are now ready to test your new kernel. Shut down and reboot the system to begin module configuration. If you have any problems, hit Tab when rebooting and type the label of your previous kernel.
Configuring the New Modules and Rebooting
Once you have successfully booted into your new kernel, you might think you are finished, but this isnt the case. The drivers you compiled as modules havent yet been made active. To make them active, you need to do a little bit of configuration.
The Caldera boot system looks for a directory in the /etc/modules directory named after the version of the kernel you built. (In my example the full path of this directory is /etc/modules/2.0.35.) In this directory it expects to find a file named after the time and date when the kernel was built followed by a .default:
#1 Tue Jan 6 16:44:51 MET 1998.default
This is a weird name for a file. The name the system expects is stored in the kernel itself. To access it, you can use the following command:
[alberto@digital 2.0.35]$ uname v
#2 Sat Oct 3 13:17:24 CDT 1998
Using this text, youll create the new module list so that the system will load your modules each time it boots. The command youll use to do this is a little bit complicated, but with a look at the BASH man page you might be able to figure out that youre using a technique called command substitution:
# find /lib/modules/2.0.35-apm name "*.o" print >
"/etc/modules/2.0.35/
$(uname v).default"
This command finds all the modules in the new modules directory, makes a list of them, and sends it to the correct file in the /etc/modules/2.0.35 directory. Without such a complex command, this is tedious work and no tool currently automates this process. If you dont do this, your new modules wont load automatically when the computer starts.
Once this has been done, shut down again and reboot using your new kernel. If everything goes as planned, your new modules will now be active. Welcome to your new system!
Previous
Table of Contents
Next
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited.
Wyszukiwarka
Podobne podstrony:
283 286283 286286 288283 aDz U 2004 nr 283 poz 2840286 Ustawa o udzielaniu cudzoziemcom ochrony na terytorium Rzeczypospolitej PolskiejBieg po zdrowie srt 28302 (283)283 00286 288283 29282 283286 AQC3XLKMU3B6BAYWASGMRBANGK5SOGWJXNLPURQwięcej podobnych podstron