how to compile a kernel suse 2

9

Click here to load reader

Upload: jomarequena

Post on 18-Jul-2015

247 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: How to compile a kernel   suse 2

Options For This HowtoFree Support

Paid Support

Navigation

Howtos

Linux

CentOS

Debian

Fedora

Kernel

Mandriva

PCLinuxOS

SuSE

Ubuntu

Apache

Backup

Control Panels

DNS

Desktop

Email

Anti-Spam/Virus

Postfix

Procmail

Sendmail

FTP

High-Availability

Lighttpd

Monitoring

MySQL

Programming

C/C++

PHP

Samba

Security

Anti-Spam/Virus

Virtualization

Other

FreeBSD

Commercial

Mini-Howtos

Forums

Contribute

Subscription

Login

Site Map/RSS Feeds

User loginUsername:

Password:

FAQForgeSubscriptionContributeSearchNewsForumsHowtos

How To Compile A Kernel - The SuSE Way - Page 2 | HowtoForge - L... http://www.howtoforge.com/kernel_compilation_suse_p2

1 de 9 02/12/2009 11:45

Page 2: How to compile a kernel   suse 2

Remember Me?

Create a new account

Request new password

Ads by Google

Linux Setup

Linux Tutorial

Mosix Kernel

Openmosix 2.6

Who's onlineThere are currently 19 users and 2765 guests online.

HowtoForge ForumsHow to setup

getmail to

download just some

...

Troubleshoot

network problems

VLC player -For

all format media

file.

Cronjob problem

Downloadable

Vmware Images

ERROR: Connection

dropped by IMAP

server

Roundcube emails

In

Centos-installing

Courier-IMAP-Authl

ib,And ...

GlusterFS write

issue

Internet

acceleration and

cashing

NewsDE: Open source professorship at University of Erlangen-Nuremberg

Firefox most used browser in Germany

Don't need groupware? Organize your life with Osmo

SugarCRM Gets a True Open Source Visionary in Larry Augustin

What Kind Of Bird Are You Booting?

HD-ready smartphone supports Linux and Android

Nokia Releases Qt 4.6

Howto setup Wireless on Chrome OS

Security in Linux and how to optimise it

The Phoronix Kernel Test Farm Is Alive

more

How To Compile A Kernel - The SuSE Way - Page 2 | HowtoForge - L... http://www.howtoforge.com/kernel_compilation_suse_p2

2 de 9 02/12/2009 11:45

Page 3: How to compile a kernel   suse 2

Recent comments100% useful.

1 hour 7 min ago

you should also mention that

1 hour 30 min ago

Re: Re: Re: Re: Error moving the bind folders/files

3 hours 27 min ago

Trouble Intsalling the Kernel.

6 hours 11 min ago

Perfect Desktop that is?

9 hours 7 min ago

linux desktop

9 hours 8 min ago

Please, do not use the word

9 hours 32 min ago

I have followed the

12 hours 51 min ago

Thanks

14 hours 23 min ago

Re: How will I know if a virus is found? and ...

16 hours 31 min ago

NewsletterSubscribe to

HowtoForge

Newsletter

and stay informed

about our latest

HOWTOs and

projects.

(To unsubscribe from

our newsletter, visit

this link.)

Syndicate

HowtoForge Feed for Facebook®"Facebook" is a registered trademark of Facebook, Inc. All rights reserved.

English | Deutsch | Site Map/RSS Feeds | Advertise

You are here: Home » How To Compile A Kernel - The SuSE Way » How To Compile A Kernel - The SuSE Way - Page 2

How To Compile A Kernel - The SuSE Way - Page 2

gmx.es Ads by Google

How To Compile A Kernel - The SuSE Way - Page 2 | HowtoForge - L... http://www.howtoforge.com/kernel_compilation_suse_p2

3 de 9 02/12/2009 11:45

Page 4: How to compile a kernel   suse 2

tweet

0tweets

Do you like HowtoForge? Please consider supporting us by becoming a

subscriber.

Submitted by falko (Contact Author) (Forums) on Sun, 2006-11-19 18:24.

::

5 Configure The Kernel

It's a good idea to use the configuration of your

current working kernel as a basis for your new

kernel. Therefore we copy the existing configuration to

/usr/src/linux:

make mrpropercp /boot/config-`uname -r` ./.config

Then we run

make menuconfig

which brings up the kernel configuration menu. Go to Load an Alternate Configuration File and choose

.config (which contains the configuration of your current working kernel) as the configuration file:

atmail.com/mail-server-appliance/ Ads by Google

How To Compile A Kernel - The SuSE Way - Page 2 | HowtoForge - L... http://www.howtoforge.com/kernel_compilation_suse_p2

4 de 9 02/12/2009 11:45

Page 5: How to compile a kernel   suse 2

Then browse through the kernel configuration menu and make your choices. Make sure you specify a kernel

version identification string under General Setup ---> (-default) Local version - append to kernel

release. The standard string is -default so our kernel rpm package will be named kernel-

2.6.18.2default-1.i386.rpm. You can leave the string as it is or specify a different one which helps you

identify the kernel (e.g. -custom or whatever you like).

I will use the string -default in this tutorial.

Please note: After you have installed kernel-2.6.18.2default-1.i386.rpm and decide to compile another

2.6.18.2 kernel, it is important to use a different version string, e.g. -default1, -default2, etc., because

otherwise you can't install your new kernel because rpm complains that kernel-2.6.18.2default-

1.i386.rpm is already installed!

How To Compile A Kernel - The SuSE Way - Page 2 | HowtoForge - L... http://www.howtoforge.com/kernel_compilation_suse_p2

5 de 9 02/12/2009 11:45

Page 6: How to compile a kernel   suse 2

When you are finished and select Exit, answer the following question (Do you wish to save your new

kernel configuration?) with Yes:

How To Compile A Kernel - The SuSE Way - Page 2 | HowtoForge - L... http://www.howtoforge.com/kernel_compilation_suse_p2

6 de 9 02/12/2009 11:45

Page 7: How to compile a kernel   suse 2

6 Build The Kernel

To build the kernel, simply execute this command:

make rpm

Now be patient, the kernel compilation can take some hours, depending on your kernel configuration and your

processor speed.

7 Install The New Kernel

After the successful kernel build, a src.rpm and an rpm package have been created. The src.rpm package can

be found in the /usr/src/packages/SRPMS/ directory, you can find out about its name by running

ls -l /usr/src/packages/SRPMS/

On my system it was called kernel-2.6.18.2default-1.src.rpm.

The rpm package can be found in /usr/src/packages/RPMS/i386/, /usr/src/packages/RPMS/i586/,

/usr/src/packages/RPMS/i686/, /usr/src/packages/RPMS/x86_64/, etc., depending on your architecture.

On my system it was located in /usr/src/packages/RPMS/i386/, and by running

ls -l /usr/src/packages/RPMS/i386/

I found out that its name was kernel-2.6.18.2default-1.i386.rpm.

Now we can install our kernel rpm package like this:

cd /usr/src/packages/RPMS/i386/rpm -ivh kernel-2.6.18.2default-1.i386.rpm

(You can now even transfer the kernel rpm package to other SuSE systems and install it there exactly the same

way, which means you don't have to compile the kernel there again.)

Next we create a ramdisk for our new kernel, because otherwise the system will most likely not boot our new

kernel:

How To Compile A Kernel - The SuSE Way - Page 2 | HowtoForge - L... http://www.howtoforge.com/kernel_compilation_suse_p2

7 de 9 02/12/2009 11:45

Page 8: How to compile a kernel   suse 2

previous next

How To Compile A Kernel - The SuSE Way How To Compile A Kernel - The SuSE Way - Page

3

mkinitrd

(Actually this command will create new ramdisks for all installed kernels which is fine.)

up

Copyright © 2006 Falko Timme

All Rights Reserved.

add comment | view as pdf | print: this | all page(s) |

Related Tutorials

How To Compile A Kernel - The Fedora Way

How To Compile A Kernel - The Ubuntu Way

Compile Kernel 2.6 under Debian Sarge

Debian-Kernel-Compile-Howto (Kernel 2.6)

Debian-Kernel-Compile-Howto (Kernel 2.4)

Please do not use the comment function to ask for help! If you need help, please use our forum.

Comments will be published after administrator approval.

Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions

Join the discussion.

www.seamlessenterprise.com

IP Convergence

Integrate your wireless and wireline networks.

Learn how from the experts at Sprint.

www.seamlessenterprise.com

Wireless & Wireline Integration

Thoughts, strategies and solutions: join the discussion

www.seamlessenterprise.com

Unified Communications 2009

Join the Discussion. Now.

www.seamlessenterprise.com

Red Hat Virtual Experience - a free virtual event. Dec. 9th

Trial: IBM Cognos Express Reporting, Analysis & Planning

Free White Papers

The Agile Heartbeat

In this whitepaper I argue that the person most

affected by the introduction ...

Enterprise Authentication: Increasing Security

Without Breaking The Bank

Experts agree that username/password

authentication does not provide enough p...

Partitioning with Oracle Database 11g Release

2

Database partitioning can greatly enhance the

manageability, performance, and...

How To Compile A Kernel - The SuSE Way - Page 2 | HowtoForge - L... http://www.howtoforge.com/kernel_compilation_suse_p2

8 de 9 02/12/2009 11:45

Page 9: How to compile a kernel   suse 2

More White Papers

Howtos | Mini-Howtos | Forums | News | Search | Contribute | SubscriptionSite Map/RSS Feeds | Advertise | Contact | Disclaimer | Imprint

Copyright © 2009 HowtoForge - Linux Howtos and TutorialsAll Rights Reserved.

How To Compile A Kernel - The SuSE Way - Page 2 | HowtoForge - L... http://www.howtoforge.com/kernel_compilation_suse_p2

9 de 9 02/12/2009 11:45