ADSL Network Protocol PPPOE

Source: Internet
Author: User

As the last test version of 2.6.0, the 2.6 test version has gone through more detector tests, especially at present, it is of great significance for developers to further pursue kernel bugs and stability. Once the development tree of version 2.7 is launched, it will surely bring about a new feature research boom.
This article

The purpose is to provide some tips for upgrading the 2.4 kernel to the 2.6 kernel. Because the 2.6 kernel is still a developing kernel, you may encounter some problems during running, but its overall performance and stability are still very good.
Knowledge: Linux uses a dual-tree system. One tree is a stable tree (stable tree) and the other is a non-stable tree (unstable tree) or a development tree (development tree ). Some new features and experimental improvements will be implemented in the Development tree first. If the improvements made in the Development tree can also be applied to the stability tree, the same improvements will be made in the stability tree after tests in the Development tree. Once the development tree has been sufficiently developed, the development tree will become a new stable tree.
Target User
This article is intended for Lunix2.4 kernel users. If not, see The Linux Kernel HOWTO)
Preparations: first, back up important data
Before you begin, make sure that all your data has been backed up.
Step 1: Install and obtain the 2.6 kernel)
First, all Linux kernel official versions can be found in http://kernel.org. You can download the kernel program from the image site quickly and quickly. Kernel.org mirror site list: http://kernel.org/mirrors.
Then download GnuPG, which is mainly used to verify the authenticity and legitimacy of the new kernel program. Http://www.kernel.org/signature.html .)
Step 2: familiarize yourself with existing files

At least you need to be familiar with the change files in the top-level README files and Documentation directories. They are all distributed Linux kernel source code.
Because 2.6.0-test is a phase in kernel development, 2.6.0 does not have the extension-test, that is, the initial version of 2.6), so its top-level README file is derived from the README file of the 2.5 development kernel. You will get a lot of tips for successfully compiling the Linux kernel from this file. For details, see Appendix 1)
The "Documentation/Changes" file lists new requirements for developing the 2.5 kernel and a list of software for upgrading the new kernel program. For details, see Appendix 2)
Step 3: Upgrade the version of each change file in the system

The upgrade of the new 2.6 kernel involves upgrading many utilities. Do not worry about the utilities listed in some change files. They may be just a special example of a file system. However, the following files must meet at least the minimum version given in the following table:
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
[Procps 2.x] [procps. x]
If there is any Change, see the latest update in "Documentation/Change. For details, see Appendix 2)
The following Utility is a special program in the file system. If you run ext2 or ext3, you must upgrade e2fsprogs. To run jfs, you must upgrade jfsutils. For example:
Name: Minimum version: How to find version:
E2fsprogs 1.29 tune2fs
Jfsutils 1.0.14 fsck. jfs-V
Reiserfsprogs 3.6.3 reiserfsck-V 2> & 1 | grep reiserfsprogs
Xfsprogs 2.1.0 xfs_db-V
Nfs-utils 1.0.5 showmount -- version
In addition, a few utilities need to be upgraded when you use them:
Name: Minimum version: How to find version:
Pcmcia-cs 3.1.21 Cardmgr-V
Quota-tools 3.09 Quota-V
PPP 2.4.0 ppd -- version
Isdn4k-utils 3.1pre1 Isdnctrl 2> & 1 | grep version
Oprofile 0.5.3 oprofiled -- version
If you run ALSA for the first time, visit http://www.alsa-project.org/to obtain the latest alsa-lib and alsa-utils.
Step 4: configure the new kernel

Here, one of the first changes you have noticed is the formation of a new structural system. The old TK/Tcl "xconfig" structure is replaced by the new QT "xconfig. Of course, GTK "gconfig" is fine.
2.6 kernel configurations include:
Make config
Similar to the 2.4 kernel configuration "config", as a simple configuration method, it only requires you to select each configuration option. Bash is required ".
Make menuconfig
Similar to the "menuconfig" configured in the 2.4 kernel.
Make xconfig
The new default graphical configuration system uses the QT library. It is very convenient and easy to use.
Make gconfig
This option is a new clone of xconfig, replacing the QT library with the GTK library. Unfortunately, a bug was found during the test. The same error message will be repeatedly displayed during running.
Make oldconfig
This option is very useful in kernel upgrade. At first glance, it is a bit like a simple "make config". In fact, oldconfig is used to read and automatically respond to the current. config settings. It prompts you about the new configuration option function. To use this function, simply copy your old. config file and run "make oldconfig.
Note: When you configure the 2.6 kernel for the first time, pay attention to the following tips when viewing the top-level README file of Linux code: ① excessive drivers will increase the kernel, which may cause problems under certain conditions.
② The selection of kernel hacking configuration information often leads to a larger and slower kernel, and even leads to unstable kernel. Therefore, when answering the "development", "experimental", or "debugging" features, most choose "N ".)
ALSA:
From version 2.4 to version 2.6, ALSAAdvanced Linux Sound Architecture is the new Linux audio Architecture ). It replaces OSSOpen Sound System ). When configuring the kernel, select the alsa oss api imitation options SND_OSSEMUL, SND_MIXER_OSS and SND_PCM_OSS) and appropriate audio-driven PCI driver ). Finally, download and install the latest alsa-lib and alsa-utils.

Step 5: Create a New Kernel
It is easier to create a 2.6 kernel than a 2.4 kernel. You do not need to perform the "make dep" step. Create a new kernel and run "make bzlmage ". If you select the compilation module, you also need to run "make modules" and "make modules_install ". "Make bzlmage & make modules & make modules_install" can be performed together ".
Step 6: install the new kernel
After the kernel is created, you need to copy it to a location. If the x86 host is located, the path is "arch/i386/boot ". Copy the file and the new system. map it to the root directory/boot. For example:
# Pwd
/Usr/src/linux-2.6.0-test4
# Mv arch/i386/boot/bzImage/boot/bzImage-2.6.0-test4
# Mv System. map/boot/System. map-2.6.0-test4
# Cd/boot
# Rm System. map
# Ln-s System. map-2.6.0-test4 System. map
After the new kernel is copied, configure the root loader using grub and lilo. It is found that the new 2.6 kernel is larger than the 2.4 kernel compiled with the same version of gcc, maybe because more options are selected during compilation.
-Rw-r -- 1 root 1094390 Aug 12 bzImage-2.4.21-ck3
-Rw-r -- 1 root 1639129 Aug 27 bzImage-2.6.0-test4
Step 7: Confirm Data Backup
In this step, you do not need to do anything that may damage the hard disk data, but the next step is to start the new kernel. The last time please confirm that the important data on the hard disk has been backed up. Step 8: try the new kernel
Now, restart the computer and test the newly compiled 2.6 kernel. If all the steps are correct, the kernel startup information will appear: initstate = 3, and the new kernel will soon appear. If ALSA is installed, you can check the sound driver: 'cat/proc/asound/cards '. For example:
$ Cat/proc/asound/cards
0 [Live]: EMU10K1-Sound blster Live!
Sound Blaster Live! (Rev.5) at 0x18e0, irq 11
If the above information appears, it indicates that the sound program is not running, start "alsamixer" and confirm that the driver is enabled. In addition, it is found that the "Master" and "PCM" (/dev/dsp) must be enabled for sound Programs to operate normally.
Appendix 1
README -- Linux kernel 2.5.xx data)
Describes the kernel installation and error handling methods.
Kernel Installation
After all necessary resources are installed, decompress the kernel in the license directory, such as the main directory ):
Gzip-cd linux-2.5.XX.tar.gz | tar xvf-XX New kernel version)
Note:/usr/src/linux is not allowed.
Upgrade 2.5.xx with patches.
Gzip-cd ../patch-2.5.xx.gz | patch-p1 or bzip2-dc ../patch-2.5.xx.bz2 | patch-pl or linux/scripts/patch-kernel linux
Delete old. o files and their affiliated files
Cd linux
Make mrproper
Software requirements
To compile and run the 2.5.xx kernel, you must upgrade the new versions of various software packages. See the minimum version required in./Documentation/change.
Compile the kernel
(1) Determine gcc 2.95.3 or later
(2) make bzImage (if it is started with A disk, Insert disk A and then make bzdisk)
(3) make modules if some modules are compiled, run the command after "make modules_install)
(4) Keep a kernel backup file
⑸ Start new kernel
Copy of the new kernel. The new kernel after compilation can be found in ../linux/arch/i386/boot/bzImage and copied to the start location. If it is a floppy drive, copy the bzImage file of the kernel to/dev/fd0 to form a bootable soft drive. If the hard disk is started, use LILO/etc/lilo. conf ). Kernel image files are often/vmlinuz,/boot/vmlinuz,/bzImage, or/boot/bzImage. Save the new kernel image file and overwrite the old one. Then run LILO to enable the new kernel.
Resetting LILO is the key to running/sbin/lilo. You can edit/etc/lilo. conf to specify the exit of the old kernel image "/vmlinux. old" to avoid problems in running the new kernel. After LILO resetting, all preparations are done, and then the system is shut down and the computer is restarted.
Note: If you need to change the default root driver, video mode, ramdisk size, and so on, you can use the "rdev" program or LILO boot option in the kernel image ). You do not have to re-compile the kernel to change these parameters.
Restart to restart the new kernel.

Appendix 2
Some data in the Documentation/Changes file)
The minimum version required by the software:
Gnu C2.95.3 # gcc -- version
Gnu make 3.78 # make -- version
Binutils2.12 # ld-v
Util-linux 2.10o # fdformat -- version
Module-init-tools 0.9.9 # depmod-V
E2fsprogs 1.29 # tune2fs
Jfsutils 1.0.14 # fsck. jfs-V
Reiserfsprogs3.6.3 # reiserfsck-V 2> & 1 | grep reiserfsprogs
Xfsprogs 2.1.0 # xfs_db-V
Pcmcia-cs 3.1.21 # cardmgr-V
Quota-tools 3.09 # quota-V
PPP 2.4.0 # pppd -- version
Isdn4k-utils 3.1pre1 # isdnctrl 2> & 1 | grep version
Nfs-utils1.0.5 # showmount -- version
Procps 2.0.9 # ps -- version
Oprofile 0.5.3 # oprofiled -- version
Kernel Compilation
GCC: 2.95.x (x> = 3)
Gnu make: 3.78
Others
Ppp: 2.4.0
......
Appendix 3
Other Tips: how to upgrade a running kernel 2.6.x to its next version
For example, to upgrade 2.6.0-test5, the general steps are as follows: Back up data -- get 2.6.0-test5 patch -- apply 2.6.0-test5 patch, patch the kernel -- delete old. o files and their subordinate files use "# make mrproper") -- New Kernel configuration -- create new kernel -- import and try the kernel.


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.