Chinaunix首页 | 论坛 | 博客
  • 博客访问: 350316
  • 博文数量: 93
  • 博客积分: 4578
  • 博客等级: 上校
  • 技术积分: 1005
  • 用 户 组: 普通用户
  • 注册时间: 2010-10-13 08:12
文章分类
文章存档

2012年(2)

2011年(45)

2010年(46)

分类: LINUX

2011-08-16 19:32:57

How to Install / Compile Linux Kernel 3.0 / 3.0.1 in Fedora 15 and 14

Here in this post I will explain how to compile and install Linux Kernel 3.0 and Linux Kernel 3.0.1 in Fedora 15. Linux Kernel 3.0.1 stable version has released yesterday and you can download it from kernel.org. If your new to Linux then I strongly recommend you try with Linux Kernel 3.0 and not with Linux Kernel 3.0.1. You can later it to Linux Kernel 3.0.

Ubuntu and Debian users

You can also follow the same steps to compile and install Linux Kernel 3.0.1 in your system.

Dependencies

To compile Linux Kernel the following are required to be installed.

  • gcc latest version,
  • ncurses development package and
  • system packages should be up-to date

To install the dependencies run the following commands in terminal and type the password for the user, when prompted.

For gcc

$ sudo yum install gcc

For ncurses development package

$ sudo yum install ncurses-devel

After installing the above packages then update your system by running the following command

$ sudo yum update

Now download the Linux Kernel 3.0 from kernel.org or by using the below command. If your trying with Linux Kernel 3.0.1 then just replace the name linux-3.0 with linux-3.0.1 in all commands below.

$ wget 

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.

$ cd Downloads/

To extract the tar file run the following command. Type the password for the user when prompted.

$ sudo tar -xvf linux-3.0.tar.bz2 -C /usr/src/

Now move to the directory where the extracted file is, or copy and paste the below command in terminal.

$ cd /usr/src/linux-3.0/

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.

To Configure

$ sudo make menuconfig

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.

$ sudo make oldconfig

There are other alternate configuration commands are available and you can find them in README file under linux-3.0 directory.

To Compile

$ sudo make

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.

To Install

$ sudo make modules_install install

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.conf.

The files are,

  • System.map-3.0.0
  • vmlinuz-3.0.0
  • initramfs-3.0.0.img

To make it default just modify the grub.conf or menu.lst under “/boot/grub/” directory. Open the file using below command.

$ sudo gedit /boot/grub/menu.lst

Just check the entry for fedora 3.0.0, if it is in first place then change default=0, if not check for the exact position and give the corresponding value in default. Restart your system by default it will boot in fedora 3.0.0, you can able to see while booting if not press any key to change it. To check after booting open a terminal and type “uname -r“. Check the screen shot below.

Hope this will be helpful for you!!!

阅读(2163) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~