Here in this post I will explain how to compile and install Linux Kernel 3.0 and Linux Kernel 3.1 in Ubuntu. Linux Kernel 3.0.1 is the latest stable release and you can download it from kernel.org. If you are new to Linux then I strongly recommend you try with Linux Kernel 3.0 and you can later patch it with Linux Kernel 3.0.1. If you don’t like to compile the kernel, then you can directly install the debian packages Click Here. Fedora users Click Here. Update: Follow the same steps to compile and install the Linux Kernel 3.1 in your system. To compile Linux Kernel the following are required to be installed. To install the dependencies run the following commands in terminal and type the password for the user, when prompted. For gcc For ncurses development package After installing the above packages then update your system by running the following command Now download the Linux Kernel 3.0 from kernel.org or by using the below command. If you are trying with Linux Kernel 3.1 / 3.0.7 then just replace the name linux-3.0 with linux-3.1 / linux-3.0.7 in all commands below. Download the Kernel source from github, no download link available on kernel.org Click Here for mirror downloads. Once the download complete move to the directory where you have downloaded the kernel package “linux-3.0.tar.bz2“. Now extract the tar file to the location “/usr/src/“. To move to the directory, for example if the downloaded package is in your Downloads directory. Use the below command. To extract the tar file run the following command. Type the password for the user when prompted. Now move to the directory where the extracted file is, or copy and paste the below command in terminal. Now you can configure, compile and install Linux Kernel 3.0 in your system. Run the commands one by one and type the password for the user, when prompted. The above command is used to configure the Linux kernel. Once you execute the command, you will get a pop up window with the list of menus and you can select the items for the new configuration. If your unfamiliar with the configuration just check for the file systems menu and check whether ext4 is chosen or not, if not select it and save the configuration. Check the screen shot below for menuconfig. If you like to have your existing configuration then run the below command. There are other alternate configuration commands are available and you can find them in README file under linux-3.0 directory. The above command is used to compile the Linux Kernel. It will take some time to complete it, approximately 40 min to 50 min it depends on your system configuration. The above command will install the Linux Kernel 3.0 into your system. It will create some files under /boot/ directory and it will automatically make a entry in your grub.cfg. Check whether it made correct entry and check for the files it created. The files under /boot/ directory are, If you unable to find the initrd.img-3.0.0 file then create it. Run the below command to create it. If the above command unable to update / generate the initramfs then run the following command to create new initramfs. Your grub.cfg file should be like the screen shots(example) below if not edit it. For Linux Kernel 3.0 For Linux Kernel 3.0.1 To modify the grub.cfg under “/boot/grub/” directory. Open the file using below command. After modifying your grub.cfg, update your grub by running the following command. Restart your system by default it will boot in Ubuntu 3.0.0, you can able to see while booting. To check after booting open a terminal and type “uname -r“. Check the screen shot below. Hope this will be helpful for you!!!How to Compile and Install Linux Kernel 3.1 / 3.0 in Ubuntu 11.10, 11.04, 10.10 and 10.04
Dependencies
$ sudo apt-get install gcc
$ sudo apt-get install libncurses5-dev
$ sudo apt-get update && sudo apt-get upgrade
Update
$ wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.0.tar.bz2
$ cd Downloads/
$ sudo tar -xvf linux-3.0.tar.bz2 -C /usr/src/
$ cd /usr/src/linux-3.0/
To Configure
$ sudo make menuconfig
$ sudo make oldconfig
To Compile
$ sudo make
To Install
$ sudo make modules_install install
$ sudo update-initramfs -u -k 3.0.0
Update
$ sudo update-initramfs -c -k 3.0.0
$ sudo gedit /boot/grub/grub.cfg
$ sudo update-grub
출처 : http://www.howopensource.com/2011/08/how-to-compile-and-install-linux-kernel-3-0-in-ubuntu-11-04-10-10-and-10-04/
'유용한 지식 자료들 > 기타' 카테고리의 다른 글
Aho Corasick String Matching in Python (0) | 2012.05.17 |
---|---|
리눅스에서 SSD (0) | 2012.05.15 |
PPT 활용에 대한 네이버 카페. (0) | 2012.03.14 |
CPU Register - Trap Flag (0) | 2011.12.19 |
리눅스 시스템(Linux)에서 Windows, VirtualBox 파일공유(shared folders) (0) | 2011.12.06 |