LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 04-22-2013, 01:51 AM   #1
JD Nimavat
LQ Newbie
 
Registered: Apr 2013
Posts: 15

Rep: Reputation: Disabled
Question Creating RPM of compiled kernel


I have Files & Directories as shown below,


kernel-smp-2.6.39.4-1
|
|- boot
| |
| |-System.map-2.6.39.4-1smp
| |-vmlinuz-2.6.39.4-1smp
|
|
|- lib
| |
| |-modules
| | |
| | |-2.6.39.4-1smp
| | | |
| | | |-Here is all the modules.


Now, I want to create RPM of above data. so, whenever I install Linux, This rpm will install and My older kernel will replaced by newer.
I don't know how to create rpm of above...
I know rpmbuild command, but it requires Makefile and spec file,
I don't know what to write in Makefile and spec file for kernel rpm.


Thanks.

Jayadip Nimavat.
 
Old 04-22-2013, 06:21 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,010

Rep: Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003
I think you need to use kernel development tools and that will be able to create a package for you
 
1 members found this post helpful.
Old 04-24-2013, 02:12 AM   #3
JD Nimavat
LQ Newbie
 
Registered: Apr 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
Where is lilo.conf in linux disk image?

Thanks for your reply,

I have successfully created kernel RPM, Now I want to add this RPM to disk-Image of linux operating System. so that , whenever I install this modified linux, my new kernel will be automatically installed. and I want to modify lilo.conf, so that, by default this newly created kernel can boot.

I know how to extract and recreate disk-Image, but I can't find lilo.conf from this Image. but I can find lilo.conf after installing linux, I want to modify this file in disk-image before installing it.

For that I have some questions:
-------------------------------

When we installs any linux os, is lilo.conf automatically generates?
If yes, then who generates it?
If no, then where to write lilo.conf in disk-image?


Thanks.
JD Nimavat.
 
Old 04-24-2013, 02:30 AM   #4
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,010

Rep: Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003
I think that works in the reverse order:
first you choose a distro, usually it has a kernel. You install it together with a boot manager. The boot manager will detect runnable OSs (like linux or windows) and will create config file. Adding a new kernel will lead to a new session (or more) in that config file. Usually during the installation of the kernel the boot manager will be updated, but you can always ask the boot manager to reconfigure itself and you can also do it by hand.
 
1 members found this post helpful.
Old 04-24-2013, 07:31 AM   #5
JackHamm3r
LQ Newbie
 
Registered: May 2012
Distribution: OpenSUSE, Sabayon, RHEL
Posts: 23

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
I think you need to use kernel development tools and that will be able to create a package for you
@pan64: Is it possible with rpmbuild in RHEL6?
 
1 members found this post helpful.
Old 04-24-2013, 07:44 AM   #6
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,010

Rep: Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003Reputation: 1003
yes, rpmbuild is used to create rpm
 
2 members found this post helpful.
Old 04-24-2013, 08:51 AM   #7
JD Nimavat
LQ Newbie
 
Registered: Apr 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
Updating hdlist and hdlist2

Thanks for your reply.

Now, I have added kernel-rpm into RPMS directory in my disk-image, but I have to update hdlist and hdlist2, which are in base directory.

If I do not update hdlist and hdlist2, the newly added kernel rpm will not install with the customised Linux os.

So, any idea how to recreate hdlist and hdlist2?

Thank you so much.

Jayadip Nimavat
 
Old 04-25-2013, 05:19 AM   #8
JackHamm3r
LQ Newbie
 
Registered: May 2012
Distribution: OpenSUSE, Sabayon, RHEL
Posts: 23

Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
yes, rpmbuild is used to create rpm
I'll try it out. I didn't knew even kernel packages can be compiled like that. So what if I try to sign it with my GPG signature? I mean, is there any legal issue or not.
 
1 members found this post helpful.
Old 04-25-2013, 06:55 AM   #9
JD Nimavat
LQ Newbie
 
Registered: Apr 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
Smile

I have solved this problem using genhdlist command.

Thank you so much for your guidance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Kernel Rpm jancat Linux - Software 1 01-16-2009 01:29 PM
Creating RPM for customized kernel in 10.3 swampdog2002 Suse/Novell 1 04-01-2008 04:37 AM
How to build a pre compiled kernel with source as a single rpm? sundarhere Linux - Kernel 0 10-26-2006 02:27 AM
The kernel I compiled reads my sata drives as hda even though the rpm kernel read sda abefroman Linux - Software 5 07-10-2006 04:42 PM
Update a compiled kernel with rpm? monster8 Linux - Software 0 07-07-2004 03:07 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration