LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 11-09-2005, 05:49 AM   #1
greythorne
Member
 
Registered: Apr 2004
Posts: 363

Rep: Reputation: 30
building kernel?


Hello,

i would like to know how to build kernel then installing its as rpm instead of just compiling?

its like building and the resulting kernel should be in rpm so that i can easily uninstall it later.

is there any guides for suse linux?

thnx.
 
Old 11-09-2005, 06:14 AM   #2
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
Instead of a plain 'make', run 'make rpm' and you get a kernel rpm package.
 
Old 11-09-2005, 06:40 AM   #3
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
this is my short howto. It may help
http://forums.suselinuxsupport.de/in...howtopic=13704
 
Old 11-10-2005, 05:40 AM   #4
greythorne
Member
 
Registered: Apr 2004
Posts: 363

Original Poster
Rep: Reputation: 30
ok, thats a good howto but do i need to edit the Make file?

thnx
 
Old 11-10-2005, 05:47 AM   #5
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
no you don't need to edit make file
you need to edit .config afer you finish configuration. I explained in the howto why.

in the case of kernel, rpm is only a form of packaging sources or compiled kernel + script that will install kernel and create initrd. If you install your kernel as rpm, it will replace your current kernel. That would be dangerous because unless you terst custom kernel you have no idea if it will work or not.
If you need sources kernel as rpm, you may consider SuSE HEAD

Easy uninstall kernel build from sources:
su to root and assuming that your kernel name is linux-2.6.x-custom_name
#rm /boot/*-custom_name
#/ rm -rf /lib/modules/*-custom_name
#rm -rf /usr/src/*-custom_name

edit GRUB either using YAST or manualy:
vi /boot/grub/menu.lst

Last edited by broch; 11-10-2005 at 05:59 AM.
 
Old 11-10-2005, 06:20 AM   #6
greythorne
Member
 
Registered: Apr 2004
Posts: 363

Original Poster
Rep: Reputation: 30
well it will only replace the original kernel if i upgrade. i should do "rpm -ivh .rpm"
 
Old 11-10-2005, 06:36 AM   #7
greythorne
Member
 
Registered: Apr 2004
Posts: 363

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by abisko00
Instead of a plain 'make', run 'make rpm' and you get a kernel rpm package.
so all i need to do after configuring is to issue "make rpm"?

in ubuntu after configuring the kernel all we need to issues is "make kpkg --initrd --append-to-version=-.... kernel_image kernel_headers".

is this the same as "make rpm" in suse?

thnx
 
Old 11-10-2005, 06:42 AM   #8
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
Quote:
well it will only replace the original kernel if i upgrade.
This is in fact bad idea. Check any SuSE forums and you will find a lot of complains about boot problems after kernel upgrade.
Noboidy will give you 100% certainty, that your kernel will boot succesfully.
SuSE realises that many users don't know how to up[grade kernel, so the easiest way would be replacement. However in fact the script should work different way: add new kernel and remove old after succesful boot of new one.
 
Old 11-10-2005, 07:22 AM   #9
greythorne
Member
 
Registered: Apr 2004
Posts: 363

Original Poster
Rep: Reputation: 30
yes you are right, anyway i just managed to make an rpm by "make rpm" but at first it failed to boot then i relieased that there was no initrd so when back to create one after that the new kernel boots correctly.

thnx.

P.S : i want to know what patches does SUSE use in its kernel?
 
Old 11-10-2005, 08:02 AM   #10
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
you can download rpm sources and unpack them. That is all you need.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Building kernel module from multiple source file in 2.6 kernel yogeshwar_s Programming 1 12-20-2004 09:31 AM
Problems building a simple kernel module for kernel 2.6.7 atticman Linux - Software 2 12-13-2004 03:35 PM
Building a Kernel DB03 Linux - Newbie 6 06-12-2004 08:41 AM
building a kernel mindcry Linux - Software 2 05-11-2004 12:06 PM
Building kernel mods for an existing kernel ugenn Linux - Software 2 10-06-2003 01:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 07:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration