Hongqi 3.0Server service configuration tutorial Kernel upgrade
Source: Internet
Author: User
Article title: Hongqi Server Service Configuration tutorial Kernel upgrade. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The kernel can be regarded as one ?? What is the interface operation between the program and the hardware ?? Leaving the core? Nothing can be used.
How well does the kernel compile? Will it also affect the system performance? Even? Some system functions (such as TCP/IP )? It must also be compiled into the core.
Is the operating system stable? Among them ?? The key factor is that the core is short and concise.
1 ?? Bloated core ???] ??? What functions can be provided? But it also sacrifices system performance and stability.
So in the compilation of core? R? 'The core size should be as small as possible '? Is it the highest original? T.
Before upgrading the kernel, you must ask yourself why you want to upgrade the kernel !?
A. for fun, catch up with the trend or do experiments, you can perform the following operations boldly!
B. to support new hardware and improve performance, have you backed up the system!
1. select to download the kernel version.
Http://www.kernel.org/pub/linux/kernel/ here comes the latest kernel version
Because the red flag 3.0 kernel version for the V2.4.17-1 we choose a V2.4.20 latest stable kernel to upgrade
Download an internal audit file named linux-2.4.20.tar.bz2
A) in any sub-directory (but usually under/usr/src/, we will first unlock it under/root) to unlock the new kernel source code:
# Bzip2-d linux-2.4.20.tar.bz2 unzip will generate linux-2.4.20.tar in the current directory
# Tar xvf linux-2.4.20.tar; unpack
# Mv linux-2.4.20/usr/src; move the unlocked data to the/usr/src Directory
B) create a symbol to connect to your new kernel Directory. This step is not required, just for ease of operation.
# Ln-s/usr/src/linux-2.4.20/usr/src/linux; later access to the new kernel through the linux connection
C) preparations before kernel configuration
# Cd/usr/include
# Rm-rf asm linux scsi
# Ln-s/usr/src/linux/include/asm-i386 asm
# Ln-s/usr/src/linux/include/linux
# Ln-s/usr/src/linux/include/scsi
D) configure the kernel
I compile without deleting the original kernel. if you do not want to keep the original kernel, we recommend that you first make the boot disk ready.
Boot disk creation: # mkbootdisk -- device/dev/fd0 'uname-R'; 'uname-R' indicates that the current kernel version is obtained.
For Hongqi 3.0, we can use # mkbootdisk -- device/dev/fd0 2.4.17-1.
Restart the host? Make sure that the boot disk can be correctly booted.
Go to the/usr/src/linux directory for compilation configuration.
1) # make mrproper; clear any additional source code that will cause the problem
2) # make xconfig; this is the graphic interface under X window, which is very convenient.
Or make menuconfig. if it is a character, we recommend that you use
Or make config; this method is not recommended to be troublesome and is not easy to use!
Select the option to be enabled in the new kernel. in this step, a configuration file. config file is generated in the/usr/src/linux directory.
3) # make dep; determine the files that have been modified and those that need to be re-compiled; ensure that the key files are in the correct position.
4) # make clean; delete unnecessary old files (for example, the original copy of the kernel); ensure that everything is up-to-date.
5) # make zImage; create a new kernel in a compressed file (the/usr/src/linux/arch/i386/boot/zImage file will be generated)
; Case Sensitive
If System is too big is prompted, use make bzImage to compress and create the file (the/usr/src/linux/arch/i386/boot/bzImage file is generated)
E) If you use a module, you also need to build and install the module.
Make modules
Make modules-install
Depmod-
F) install the new kernel.
Copy the kernel file to the/boot directory
# Cp/usr/src/linux/System. map/boot/System. map-2.4.20
# Cp/usr/src/linux/arch/i386/boot/bzImage/boot/vmlinuz-2.4.20
Edit/etc/lilo. conf file to add
Image =/boot/vmlinuz-2.4.20
Label = linux-2.4.20
Root =/dev/hda1; refer to the original root item.
# Lilo; after the lilo command is executed? LILO will be on the system.
G) restart
# Shutdown-r now
Tip: boot LILO, select "linux-2.4.20" when system selection appears to start our Linux with the new kernel
You can use # uname-r to view the current kernel version.
H) problem
It is possible that if the system cannot be started normally or some devices do not recognize it, it may be that some of the options are incorrect when we make menuconfig. we only need to take this step one time!
The Kernel upgrade cannot be successful once, unless you are familiar with every option in the kernel
The stability after upgrade is also a problem because some problems cannot happen at once and may take a long time to be exposed!
However, during the Kernel upgrade process, you will have a better understanding of the Linux workflow. I hope the above content will help you in your learning!
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.