Jump to content


2
[Offer]

How To Compile Linux Kernel



6 replies to this topic

#1 spatel

spatel

    Linux TE

  • Technical Expert
  • PipPipPip
  • 322 posts
  • 574 thanks

Posted 29 April 2010 - 02:50 AM

Compiling custom kernel has its own advantages and disadvantages.Compiling kernel needs to understand few things and then just type couple of commands. This step by step howto covers compiling Linux kernel version 2.6.xx under Debian GNU Linux.

Few step to compile kernel.

# cd /usr/src
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz2

Notes : Make sure GCC and GNU make utility installed on your system before compile kernel.

# tar cvjf linux-x.y.z.tar.bz2
# cd linux-x.y.z

Compile kernel

# make menuconfig

Start compiling to create a compressed kernel image, enter:
# make

compiling to kernel modules
# make modules

Install kernel modules
# make modules_install

To install kernel
# make install

It will install three files into /boot directory as well as modification to your kernel grub configuration file

System.map-2.6.25
config-2.6.25
vmlinuz-2.6.25

Create an initrd image for new installed kernel
# cd /boot
# mkinitrd -o initrd.img-2.6.25 2.6.25

Modify Grub configuration file - /boot/grub/menu.lst
# vi /boot/grub/menu.lst

title Debian GNU/Linux, kernel 2.6.25 Default
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
initrd /boot/initrd.img-2.6.25
savedefault
boot

Note: its hard to edit this file without knowledge of options so better way is use update-grub command it will do it automaticaly for you.

# update-grub

Now time comes up for testing reboot your system and boot with new kernel and enjoy your system. Good Bye
"The quieter you become, the more you are able to hear..."  - BT

#!/bin/bash
for qw in `cert.txt`
do
echo "Certification passed: $qw"
done

root#./cert.sh
Certification passed: CCNA|RHCE|Solaris|Security+|CEH

Thanked by 5 Members:
pirate1 , dodoblota , wfsec2012 , SharadBhabad , netbot

#2 GhostProtocol

GhostProtocol

    Security TE

  • Technical Expert
  • PipPipPip
  • 51 posts
  • 1657 thanks

Posted 01 September 2010 - 05:13 PM

nice info brother......
thanx once again

#3 Dangelweed

Dangelweed

    Junior Member

  • Members
  • PipPip
  • 7 posts
  • 49 thanks

Posted 06 September 2010 - 08:59 PM

thanks for this. Really usefull

#4 Jagrene

Jagrene

    Member

  • Members
  • PipPip
  • 24 posts
  • 4 thanks

Posted 08 September 2010 - 01:25 AM

Nice one - thanx!

Jag

#5 arvindsony

arvindsony

    Member

  • Members
  • PipPip
  • 23 posts
  • 18 thanks

Posted 19 January 2011 - 06:04 AM

thanks dude .....

#6 jcayab

jcayab

    Junior Member

  • Members
  • PipPip
  • 1 posts
  • 0 thanks

Posted 24 September 2017 - 02:17 PM

Third command is wrong. You need to extract the archive, not create it.

#7 ashish1984

ashish1984

    Junior Member

  • Members
  • PipPip
  • 6 posts
  • 9 thanks

Posted 19 April 2019 - 09:26 AM

You can check this :

http://vlinux-freak.blogspot.com/2019/03/compiling-and-installing-latest-kernel.html




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Organization

Community

Downloads

Test Providers

Site Info


Go to top