Securing and Optimizing Linux:RedHat Edition | All about OS

Installing the new kernel

Категория: Securing and Optimizing

First we create a new directory named “linux-2.2.14″ based on the version of the kernel we have installed for easy interpretation, then we copy directories asm-generic, asm-i386, linux,
net, video, and scsi from 7usr/linux/include” to our new place 7usr/src/linux-2.2.14/include”. After we remove the entire source directory where we had compiled the new kernel, we create a new symbolic link named “linux” under 7usr/src” that points to our new 7usr/src/linux-2.2.14/include” directory. With these steps, future compiled programs will know where to look for headers related to the kernel on your server.
NOTE: This step will allow us to gain space on our hard drive and will reduce the risk of security. The Linux kernel source directory handles a of lot files and is about 75 MB in size when uncompressed. With the procedure described above, our Linux kernel directory began approximately 3 MB in size so we save 72 MB for the same functionalities.
6. Finally, you need to edit the “/etc/lilo.conf’ file to make your new kernel one of the boot time options:
Stepi
Edit the lilo.conf file (vi /etc/lilo.conf) and make the appropriated change on the line that read
“image=/boot/”.
[root@deep /]# vi /etc/lilo.conf
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
prompt
timeout=00
restricted
password=somepasswd
image=/boot/vmlinuz-kernel.version.number #(add your new kernel name file here).
label=linux
root=/dev/sda6
read-only
NOTE: Don’t forget to remove the line that read “initrd=/boot/initrd-2.2.12-20.img” in the “lilo.conf file, since this line is not necessary now (monolithic kernel doesn’t need an initrd file).
Step 2
Once the name of the new kernel version has been put in the “lilo.conf file as shown above, we update our “lilo.conf file for the change to take effect with the following command:
[root@deep /]# /sbin/lilo -v
LILO version 21, [Copyright 1992-1998 Werner Almesberger
Reading boot sector from /dev/sda
Merging with /boot/boot.b
Boot image: /boot/vmlinuz-2.2.14
Added linux *
/boot/boot.0800 exits - no backup copy made.
Writing boot sector.
IMPORTANT NOTE: If you say NO to the configuration option “Unix98 PTY support (CONFIG_UNIX98_PTYS)” during your kernel configuration, you must edit the 7etc/fstab” file and remove the line that read:
none /dev/pts devpts gid=5,mode=620 0 0

Страниц: 1 2

« Kernel configurationa
Delete program, file and lines related to modules »