Upgrade RH92.4 kernel to 2.6 in Virtual Machine

Source: Internet
Author: User
Upgrade the RH92.4 kernel to 2.6 in the Virtual Machine -- general Linux technology-Linux programming and kernel information. For details, refer to the following section. Preparations:

1. Go to the linux official website to get the next linux 2.6 kernel! Http://www.kernel.org;

2.install A modules-init-tools-3.0.tar.gz toolkit. Because the 2.4.x modutils toolkit is no longer compatible with the new 2.6.x kernel, you must upgrade it to the modele-init-tools toolkit.

You can download from http://www.kernel.org/pub/linux/... it-tools-3.0.tar.gz

3. Install the modele-init-tools toolkit.
# Configure -- prefix =/
# Make moveold (rename the original tool program so that you can continue to use the original 2.4.x kernel)
# Make all install

#./Generate-modprobe.conf/etc/modprobe. conf (new configuration file for 2.6.x kernel generation)

4. install the Mkinitrd 4.1.18-2 toolkit, switch the current directory to the download directory for the mkinitrd-4.1.18-2.i386.rpm, device-mapper-1.00.19-2.i386.rpm, and lvm2-2.00.25-1.01.i386.rpm (the three files are better under the same directory), and execute the following commands in sequence (note, this is an ordered execution ):

Rpm-ivh -- nodeps -- force device-mapper-1.00.19-2.i386.rpm

Rpm-ivh -- nodeps -- force lvm2-2.00.25-1.01.i386.rpm

Rpm-ivh -- nodeps -- force mkinitrd-4.1.18-2.i386.rpm

5.install binutils-2.17.tar.gz (this is essential for upgrading LINUX in the Virtual Machine) and execute the following commands in sequence:

Tar zxf binutils-2.17.tar.gz

Cd binutils-2.17

./Configure

Make

Make install

6. Before upgrading, make sure that the following software versions are not lower:
Name: Minimum version: How to find version:
Gnu C Compiler 2.95.3 gcc -- version
Gnu Make 3.78 make -- version
Binutils 2.12 ld-v
Util-linux 2.10o fdformat -- version
Module-init-tools 0.9.9 depmod-V
Procps 2.0.9 ps -- version
(See the latest update in "Documentation/Change)

Next we will officially start the upgrade:
1. # tar xzvf linux-2.6.20.tar.gz/usr/src/
#./Configure // generate the Makefile file. This step is unnecessary if Makefile already exists.
# Make menuconfig // start to configure the kernel

The configuration in menuconfig is worth noting as follows:

O For the "Loadable Module support" option, you must select the "Module unloading" and "Automatic kernel module loading" options.

For the "Processor type and features" option, you must select the "Preemptible Kernel" option, which is one of the important reasons that 2.6.x Kernel is better than 2.4.x Kernel.

Configure the following content in the main menu of "Device Driver:

O For "Block Devices" configuration, You must select loopback and ramdisk support.
O For "Multi-device support (RAID and LVM)", select "device mapper ".
O For "Input device support", select "Keyboards" and "Mice.
O For "Graphics support", select the frame buffer support.

O For ALSA-related sound options, select the "oss api emulation" option. The OSS does not need to be used.

O for USB, select all options

O file systems must be selected. For example

Ext2 extended attributes
Ext2 POSIX Access Control Lists
Ext2 Security Labels
Ext3 journalling file system support
Ext3 extended attributes
Ext3 POSIX Access Control Lists
Ext3 Security Labels

Note 1: If you use a virtual machine, you must select the sics driver.

After the kernel is prepared, save and exit (the default name is recommended for saving. config. The benefit of doing so is that it will automatically load the next time menuconfig again. configuration in config), and then you can compile it directly. The "make dep" step is no longer needed in 2.6.

Next we can start compiling:
# Make bzImage

Note 2: The following error message may appear when this step is about to be completed:

....
OBJCOPY arch/i386/boot/compressed/vmlinux. bin
BFD: Warning: Writing section '. bss' to huge (ie negative) file offset 0xc0277000.
Objcopy: arch/i386/boot/compressed/vmlinux. bin: File truncated
Make [2]: *** [arch/i386/boot/compressed/vmlinux. bin] Error 1
Make [1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
Make: *** [bzImage] Error 2

Solution:
Make some modifications in arch/i386/Makefile:

Change OBJCOPYFLAGS to the following:
OBJCOPYFLAGS: =-O binary -- change-section-lma. bss-0xc0000000-R. note-R. comment-S

Then re-make bzImage OK!

# Make modules
# Make modules_install

# Cp/usr/src/linux-2.6.18/drivers/scsi/BusLogic. o/lib/modules/2.6.18/kernel/drivers/scsi

NOTE 3: This step is used in the SCSI hard drive + VMWARE + REDHAT architecture, because BusLogic is compiled into the kernel rather than a module (even if the Buslogic module of the 2.4 kernel is statically compiled into the kernel ). The solution is to directly copy the BusLogic. o file. (if it is not a SCSI hard disk, the copy in the VMWARE + REDHAT architecture can be omitted)

# Make install

Restart the system
The kernel compilation has been completed. You can restart the linux system.

# Reboot
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.