nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

mini HOWTO - Linux Kernel Compilation

This is a discussion on mini HOWTO - Linux Kernel Compilation within the Getting started tutorials forums, part of the Linux Getting Started category; Ok monk thanx for updating my info repos The thread has been updated...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #11 (permalink)  
Old 12-17-2006, 04:18 AM
Senior Member
User
 
Join Date: Dec 2006
Location: /B!n@ry
My distro: openSuSE 10.2
Posts: 127
Rep Power: 0
B!n@ry
Send a message via MSN to B!n@ry
Default

Ok monk thanx for updating my info repos
The thread has been updated
__________________
LivE Free 0r DiE
L!nux rul3z aLL
Reply With Quote
Sponsored Links
  #12 (permalink)  
Old 12-19-2006, 01:03 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,060
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Monk,

Good point. Topic is moved to Linux tutorial section
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #13 (permalink)  
Old 12-20-2006, 12:49 AM
Junior Member
 
Join Date: Dec 2006
Posts: 3
Rep Power: 0
SoFy
Default

gr8 tutorial . but there's no need to do the point N6.

y0 can just type :

Code:
make install
Reply With Quote
  #14 (permalink)  
Old 12-20-2006, 12:59 AM
Senior Member
User
 
Join Date: Dec 2006
Location: /B!n@ry
My distro: openSuSE 10.2
Posts: 127
Rep Power: 0
B!n@ry
Send a message via MSN to B!n@ry
Default

Quote:
Originally Posted by SoFy
gr8 tutorial . but there's no need to do the point N6.

y0 can just type :

Code:
make install
Yep, but I think a copy is much faster than an INSTALL
Thanx for joining Sofy ... I really appreciate it
__________________
LivE Free 0r DiE
L!nux rul3z aLL
Reply With Quote
  #15 (permalink)  
Old 12-20-2006, 01:02 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,060
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Hi Welcome to nixCraft forum!

Yup you can run make install; few distro such as Debian or Fedora can make changes to grub.conf file as well. However some distro cannot make all modification. In such case this last 3 steps will do the job
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #16 (permalink)  
Old 06-15-2007, 01:07 PM
diptanjan's Avatar
Junior Member
User
 
Join Date: May 2007
Location: Hyderabad
My distro: Redhat, Suse
Posts: 12
Rep Power: 0
diptanjan is on a distinguished road
Send a message via MSN to diptanjan Send a message via Yahoo to diptanjan Send a message via Skype™ to diptanjan
Default

Hi B!n@ry,

I am very new to Linux world. I am trying to learn by experimenting and trying to follow all tutorials that I come accross with. As the best way to learn is by practicing.

I am trying to Upgrade my kernel from 2.6.16.X to 2.6.21.X in Suse Linux 10 desktop version.

I have followed the steps you have mentioned here.

Now I am little confused about the boot loader :

Configuration on /etc/grub.conf file here is not what I am used to with Redhat Linux grub.conf file.

Here is my grub.conf file details :

Quote:
root (hd0,1)
install --stage2=/boot/grub/stage2 /grub/stage1 (hd0,1) /grub/stage2 0x8000 (hd0,1)/grub/menu.lst
quit
Now please suggest where should I put those lines that you mentioned. should I comment out the above lines?

TIA.

Diptanjan
Reply With Quote
  #17 (permalink)  
Old 06-15-2007, 04:22 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,060
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

I'm not sure but try following

SuSELinuxSupport: HowToBuildingacustomKernel

SuSELinuxSupport: How To: Safe Kernel Upgrade For SuSE
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #18 (permalink)  
Old 09-12-2007, 01:27 PM
Junior Member
User
 
Join Date: Sep 2007
My distro: Debian and FC &RHEL
Posts: 2
Rep Power: 0
khadar is on a distinguished road
Default Problem in my Kernel-2.6.12 after rebooting......Please Help me.

Hello!
I am new to Linux kernel compilation. you miniHOW to is very helpful to me. I followed all the steps you given.And also built the "initrd".I compiled linux kernel and initrd in DEBIAN system.I also edited the /grub/menulist also.


After rebooting it is displaying existing kernels in the system.After selecting my newly compiled kernel,it is not booting and displaying following messages

The messages are given below:
**************************************************
Booting 'Debia GNU/Linux, Kernel 2.6.12'

root (hd0,0)
Filesystem type is ext2fs,partition type 0x83
Kernel /boot/vmlinuz-2.6.12 root=/dev/hd1 ro single
[Linux-bzImage , setup=0x1400 , size=0x121673]
initrd /boot/initrd.img-2.6.12
[Linux-initrd@0x13ce3000,0x30a000 bytes]
save default
boot
Un compressing Linux...OK , booting the Kernel

************************************************** **
After that is displaying blank screen...

What is the problem in my kernel ? Please help me!

Thanks in advance !.







Quote:
Originally Posted by B!n@ry View Post
Hello All,

I told you I shall be back with a new idea Today this article came to my mind to write about because when ever I go to a forum I see the same question: How can I compile a Kernel ?

Really this questions is asked by lots of people not just newbie's but even intermediate users. So I decided to write this short article to help out.

Important Note:
Do not run a command as root until I say so.

1st: you download the latest Kernel version from here: The Linux Kernel Archives

2nd: Move the file you downloaded into a directory change to it and if the kernel is downloaded in a gz file type ? you extract it like this:
Code:
tar xvfz kernel-package.gz
if its a bz2 type you extract it like this:
Code:
tar xvfj kernel-package.bz2
3rd: Enter the directory you just extracted and run any of the following kernel configuration types:
1. make config
2. make oldconfig
3. make menuconfig
4. make gconfig
5. make xconfig
Note:- Not all of them exist by default on a Linux System, you need to install them.

the "make config" is a Q&A configurator. "make oldconfig" is used when you have a pre-config file and want to reuse it in compiling the new Kernel. "make menuconfig" is just like the netconfig that runs under CLI and you choose the needed options by marking them with a correct sign. "make gconfig" is a configurator running under GTK+. "make xconfig" is also a configurator run under QT.

4th: Now run
Code:
make
inside the directory of the kernel. This shall build the bzImage.

Important Note:
Now continue to run the commands as root.

5th: Install the needed modules for the kernel. Run this:
Code:
make modules_install
6th: Install the new Kernel, by doing the following:
Code:
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.0
Code:
cp System.map /boot/System.map-2.6.0
7th: All you have to do now is edit the boot loader used, here I use GRUB. Add the following lines to the end of the file:
Code:
title SUSE Linux 10.1 using Kernel vmlinuz-2.6.0
    root (hd0,0)
    kernel /vmlinuz root=/dev/hda3 vga=0x317 splash=silent showopts
    initrd /initrd
Finally: Reboot your machine you shall have a new running Kernel.

I hope you like this mini HOWTO - Linux Kernel Compilation

Regards 2 all,
B!n@ry
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Mini How to :: How to configure ssh keys on Linux Ashish Pathak Getting started tutorials 3 08-31-2008 03:18 PM
Linux kernel deleted from /boot - how do I resinstall the kernel vaibhav.kanchan Getting started tutorials 2 03-25-2008 01:31 AM
Display Linux kernel information sweta Getting started tutorials 0 07-27-2007 08:00 AM
Smart mini HowTo B!n@ry Getting started tutorials 4 12-17-2006 04:23 AM
Is Linux kernel is monolithic or modular kernel? chiku Linux software 2 06-02-2005 04:40 PM


All times are GMT +5.5. The time now is 02:05 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36