Basic Linux kernel skills-upgrade the kernel and feel the new Linux time and space-general Linux technology-Linux programming and kernel information. For details, refer to the following. Andrew Morton, a Linux 2.6 kernel maintainer, mentioned in the release of the 2.6.0 kernel that nuclear power runs well on server-level machines in 2.6.0, however, there may be some problems in desktop and notebook computers. But in any case, the 2.6 kernel has been officially launched, and various Linux vendors and organizations will gradually upgrade to the 2.6 kernel. Although this change will be gradual for stability and maturity considerations, some competent individual users can try all the new features brought by the 2.6 kernel first.
The first attack to try Linux 2.6 is to upgrade the kernel.
Step 1: download the new kernel
Download the complete source code package for kernel 2.6 From kernel.org:
# Wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.0.tar.bz2
When downloading the source code, it is best to download the corresponding GnuPG signature file to verify that the downloaded source code is secure and prevent malicious code from being added to the source code. For more information, see http://www.kernel.org/signature.html.
Step 2: read the document
Readers who are not familiar with how to compile the Kernel can first read the Linux Kernel HOWTO (http://www.linux.org/docs/ldp/howto/Kernel-HOWTO ). Readers who have compiled the kernel should note that the compiling method of the 2.6 kernel has been improved, which is described in the Readme file attached to the kernel source code. Therefore, after unlocking the kernel source code package, you must first read Readme and other help files.
Step 3: configure the new kernel
In the 2.6 kernel, the kernel compilation system has been improved to accelerate compilation. In addition, the previous Graphical Kernel configuration method "make xconfig" implemented by Tk/Tcl was replaced by the new "make xconfig" method of Qt library in kernel 2.6.
The 2.6 kernel also provides another way to use the Gtk library's Graphical Kernel configuration method "make gconfig". In fact, it is like a clone of "make xconfig, its appearance and operation method are exactly the same as that of "make xconfig.
The preceding two Graphical Kernel configuration methods run in X-Window, which is easier to use than before. If the kernel is configured on the Character interface, "make config", "make menuconfig", and "make oldconfig" are still used ". It is the same as the previous version. Obviously. The "make xconfig" configuration method is more intuitive and easy to use. Therefore, when X-Window is installed, we recommend that you use "make xconfig" for Kernel configuration for beginners.
For general PC users, especially those who use Linux as the desktop operating system, upgrading the kernel does not blindly choose all new features. Because many features targeting high-end servers cannot be enjoyed by common users, the kernel will become larger and errors may be generated during compilation. Therefore, the upgrade focuses on the features that individual users can enjoy in the 2.6 kernel, such as preemptible kernel, support for ALSA, improved NTFS Driver, and support for more mainstream devices. Before you officially start compiling and using the new kernel, prepare data backup and boot disk. Here we will summarize several precautions for Kernel configuration of version 2.6 for your reference:
1. Select the relevant features that individual users can enjoy in the 2.6 kernel.
2. Unused drivers should be deleted as much as possible. Excessive drivers will increase the kernel and affect the speed.
3. For "development", "experimental", or "debugging" options, select "N" to make the generated kernel more stable.
4. You can use "make oldconfig" for local modifications to the Kernel configuration, which is much faster.
5. if the modules mode is used to support devices such as SCSI or RAID, select "RAM Disk support" and "Initial RAM disk" and generate initrd. img to load the driver at startup.
6. Read the online help and find out the correct meaning of the options before selecting them.
Many new or rewritten functions will be found during the configuration of the 2.6 kernel. For example, ALSA and OSS sound systems are supported.
ALSA is a more advanced sound system. This item is mandatory for users with sound cards and sound speakers.
In addition, in the sub-option "NTFS File System support" of "file system" option "DOS/FAT/NT Filesystems, write operations on NTFS are no longer marked as dangerous in previous versions. This is a very considerate improvement. After all, it was too inconvenient to read but not write in the past.
The "Enable different security models" option is added to the 2.6 kernel, which also shows that Linux developers pay attention to operating system security.
During Kernel configuration of version 2.6, a lot of new hardware has been added. For example, if the kernel of version 2.4 does not contain the Promise ide raid driver, you need to install it using the drive floppy disk provided by the manufacturer, now it is no longer necessary. Similar hardware supports many more.
Step 4: Create a New Kernel
After Kernel configuration, Run "make bzImage" to compile and generate a new kernel. Compared with the previous compilation process of the 2.4 kernel, this step of "make dep" is omitted, which is more concise. "Make bzImage" takes some time, but it feels much faster than compiling the 2.4 kernel. At the same time, the screen information in the compilation process is much simpler.
Generally, the "Loadable module support" option is selected, so "make modules" and "make modules_install" also take some time. The specific time depends on the number of modules selected.
Step 5: enable the new kernel
After both the kernel and modules are compiled, modify GRUB or LILO to enable the new kernel. This step is the same as in previous versions. There are many methods. You can manually copy Symtem. map and bzImage to the corresponding directory (such as/boot), and then modify the boot program configuration. For example: