Ubuntu compiles Linux kernel process
First, to solve the problem of Ubuntu agent Internet
1, this method to use the/etc/apt/folder under the Apt.conf file. You can use this approach if you want Apt-get (not other applications) to use the HTTP proxy all the time.
Note: In some cases, the apt configuration file is not established during system installation. The following actions modify an existing configuration file or create a new configuration file as appropriate.
sudo gedit/etc/apt/apt.conf add the following line to your apt.conf file (replace yourproxyaddress and ProxyPort according to your actual situation).
Acquire::http::P Roxy "Http://yourproxyaddress:proxyport"; save apt.conf file.
If the proxy server needs to log on, you can specify the proxy server address in the following format (replace Username,password, yourproxyaddress, and proxyport with the appropriate content):
Http_proxy=http://username:password@yourproxyaddress:proxyport
2, then set up in the new HTTP proxy, in the system--system management--The new Package Manager--Settings--preferences--the network also set HTTP proxy
Second, download the source code and compile software preparation
Download Kernel source code: http://www.kernel.org/
Note that click on the 2.6.39.3 kernel of the F version, that is, the full version.
If you're too lazy to go to a site link, run the following command:
Code:
$CD ~
$wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.3.tar.bz2
Install the compile program. Install make, GCC, make-kpkg, run Menuconfig, and so on and compile kernel-related tools.
Not installed, please check the/etc/apt/sources.list file.
Install the required toolkit for commands:
Code:
$sudo apt-get Install build-essential kernel-package libncurses5-dev fakeroot
Third, extract the source code
Note that many tutorials on the internet should be extracted to/USR/SRC, is purely an assertion, Linux boss Linus said to extract to any directory can be. Of course, Linus's statement is correct. First copy the compressed package to the USR/SRC directory, and then unzip the compressed package into the USER/SRC directory.
If the compressed package is now placed on the desktop of your personal home directory, run the following command:
Code:
$sudo CP DESKTOP/LINUX-2.6.39.3.TAR.BZ2/USR/SRC
$ CD USR/SRC
$ tar jxvf linux-2.6.39.3.tar.bz2
Now, the source code is in the usr/src/linux-2.6.39.3.
Enter the source code directory and prepare for the next step. The following are all in this directory.
Code:
$ CD usr/src/linux-2.6.39.3
Start the preparation before compiling.
First, clean up the temporary files that were left at compile time. If the package is just unpacked, you do not need to perform this step. If it is the second or nth compile, then it must be done.
The relevant commands are as follows:
Code:
$ sudo make Mrproper
Many tutorials on the Web refer to the config copy of the kernel currently in use, which, according to the experiment, is not needed, and Ubuntu and Debian will automatically do this step. But this command can be learned. Of course you can copy the previous configuration.
Command:
Code:
Cp/boot/config-2.6.35-22-generic./.config
The red part depends on your operating system
Start configuring kernel options.
Related commands:
Code:
$sudo make Menuconfig
We are using a graphical interface configuration, at the bottom of the configuration option has a load and save options, we first copy the fourth step of the configuration file. config file load come in, save on it.
Six, start compiling the kernel.
The Ubuntu tool is make-kpkg, and the steps are relatively simple compared to other distributions.
Related commands:
Code:
$sudo make-kpkg Clean This command does not seem to have super privileges, a lot of information to say, but this is not a matter of principle.
$sudo make-kpkg--initrd--append-to-version=t61 kernel_image kernel-headers
The t61 in the above commands can be replaced with the characters you like, and the last character must be a number.
After the completion of the above command return, we recommend that the browser and other applications are turned off, the machine began to work more difficult.
Seven, install the kernel
The compilation completes is the installation work. The compiled kernel is in the previous level directory. including Linux-headers-2.6.39.3t61_2.6.39.3t61-10.00.custom_i386.deb and Linux-image-2.6.39.3t61_2.6.39.3t61-10.00.custom. _i386.deb two files, if you do not develop, as long as the installation of the kernel can be, the header file later to use the time to say.
To install the related commands:
Code:
$ cd ...
$ sudo dpkg-i linux-image-(Press the TAB key)
The filename is very long and it is not possible to automatically fill the tab without tabs.
Compare the size with the old kernel after the installation is complete
Code:
$ ls-l/boot/
Eight, restart the validation of the new kernel.
Code:
$ sudo reboot
The new kernel version can be checked after reboot, as follows:
$ uname-a
As the installation of the Linux kernel has been completed, the following steps are personal:
Nine, graphics driver
If your video card is the same as my Nvidia graphics card, it often fails to enter the X-window normally after startup. Even if you can see the GDM login interface, the effect is very poor.
Then you will install NVIDIA drivers.
Enter character command line with CTRL+ALT+F1, enter username, password login.
Command:
Code:
Download driver
$wget Http://us.download.nvidia.com/XFree86/Linux-x86/173.14.12/NVIDIA-Linux-x86-173.14.12-pkg1.run
$sudo-S
Enter the password to obtain super permissions.
#ps Ax
Take a look at the process associated with GDM, turn all these processes off; with SUDO/ETC/INIT.D/GDM stop there is a possibility that a process has not been closed:
#kill Process Number
Then install the Nvidia graphics driver, which, of course, is driven first, into the directory where the NVIDIA driver is running:
# sh./nvidia-linux-x86-173.14.12-pkg1.run
OK after reboot. To use NVIDIA drivers, you do this every time you upgrade the kernel.
Ten, wireless network card
The related kernel options are
Networking--->
Wireless--->
Generic IEEE 802.11 networking Stack (mac80211)
and a 4965 drive.
4965 Wireless network card driver Although has been programmed into the kernel, but no firmware can not be used. Need to copy the original kernel firmware to the new kernel corresponding directory, the name and the kernel, my kernel is linux-image-2.6.25.10dell1400, the directory name is 2.6.25.10dell1400.
Code:
Specific commands:
$ cd/lib/firmware/
$ sudo mkdir 2.6.25.10dell1400
Copy 4965 of the firmware from your old kernel.
$ sudo cp 2.6.24-16-generic/* 2.6.25.10dell1400/
The above command is equivalent to the following command:
$ cd/lib/firmware/
$ sudo cp-r 2.6.24-16-generic/2.6.25.10dell1400/
Reboot the system, the wireless card is normal.
Replication command: sudo cp desktop/linux-2.6.39.3.tar.bz2/usr/src
Decompression command: sudo tar jxvf FileName.tar.bz2