LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-19-2006, 11:29 AM   #1
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Rep: Reputation: 30
Non Modular Kernel RPM


Hi

Trying to build a new kernel but all the stuff I need is built in, no modules after make menuconfig I run make rpm.. I forgot how to make an RPM out of it actually but when I do a make rpm it goes thru the entire process but at the end it errors


Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.67514
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd kernel-2.6.17.5
+ mkdir -p /var/tmp/kernel-2.6.17.5-root/boot /var/tmp/kernel-2.6.17.5-root/lib /var/tmp/kernel-2.6.17.5-root/lib/modules
+ INSTALL_MOD_PATH=/var/tmp/kernel-2.6.17.5-root
+ make modules_install

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

make[2]: *** [modules_install] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.67514 (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.67514 (%install)
make[1]: *** [rpm] Error 1
make: *** [rpm] Error 2

root@partners [/usr/src/linux-2.6.17.5]# cat /var/tmp/rpm-tmp.67514
#!/bin/sh

RPM_SOURCE_DIR="/usr/src/linux-2.6.17.5/.."
RPM_BUILD_DIR="/usr/src/redhat/BUILD"
RPM_OPT_FLAGS="-O2 -g -march=i386 -mcpu=i686"
RPM_ARCH="i386"
RPM_OS="linux"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/usr/share/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="kernel"
RPM_PACKAGE_VERSION="2.6.17.5"
RPM_PACKAGE_RELEASE="1"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
RPM_BUILD_ROOT="/var/tmp/kernel-2.6.17.5-root"
export RPM_BUILD_ROOT


set -x
umask 022
cd /usr/src/redhat/BUILD
cd kernel-2.6.17.5
mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules
INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install
cp $KBUILD_IMAGE $RPM_BUILD_ROOT/boot/vmlinuz-2.6.17.5
cp System.map $RPM_BUILD_ROOT/boot/System.map-2.6.17.5
cp .config $RPM_BUILD_ROOT/boot/config-2.6.17.5

The spec file is made after I "make rpm"
 
Old 07-19-2006, 01:06 PM   #2
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Rep: Reputation: 45
Check the .spec, disable the make modules or modules_install steps, and rebuild.
 
Old 07-19-2006, 01:06 PM   #3
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
Why would you disable loadable modules support? I don't like modules either, but even with everything compiled into the kernel you should have this on. Now I don't know anything about about making an .rpm, but to me it looks like it is calling make modules_install and this fails because your kernel doesn't have support for modules. go back to make menuconfig and under 'Loadable module support' I would a least enable these 3:

Code:
[*] Enable loadable module support               
[*]   Module unloading
[*]     Forced module unloading                                       
[ ]   Module versioning support                                       
[ ]   Source checksum for all modules                                
[ ]   Automatic kernel module loading
Some things you just can't do without modules; like the nvidia driver for example or my wifi driver: it's unstable and causes the kernel to crash so I load the module to go online then unload it when I'm done for stability. If you have loadable module support it just means the kernel can load a module. If you compile everything into the kernel 'make modules_install' won't even install any modules.

Last edited by johnson_steve; 07-19-2006 at 01:09 PM.
 
Old 07-19-2006, 01:16 PM   #4
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
I run servers, not desktops thats why I build my kernels statically... less attempts at exploits, all my hardware is the same so I can interchange drives and chassis around without hiccups and I know exactly what needs to be built into kernels when I load the previous config file.

Yes if I was running a desktop enviroment I would have a modulated kernel but statically built I know what I need, and takes less time to boot

Quote:
Originally Posted by Thetargos
Check the .spec, disable the make modules or modules_install steps, and rebuild.
I figured as much, the spec file is above I cat the output of the spec file I guess all I need to do is just remove the lines and run make rpm again but I think ill just have the same problem again. The spec file only shows up after I make rpm, not before... i'll find out
 
Old 07-19-2006, 01:22 PM   #5
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Rep: Reputation: 45
You should then modify the macros for the spec generation in the topo most Makefile.
 
Old 07-19-2006, 03:14 PM   #6
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Ok, modified I havent got a test system I can try it on yet so I wont know for sure anyone wanna test it ? lol http://stlhosting.com/kernel-2.6.17.5-2.i386.rpm

This is a intel based config, with some scsi/smp support mostly generic.

If I have to edit the macro file every time that could be a headache
 
Old 07-19-2006, 03:22 PM   #7
Thetargos
Senior Member
 
Registered: Mar 2003
Location: Mexico City
Distribution: Fedora, Ubuntu & Mint
Posts: 1,679

Rep: Reputation: 45
Quote:
Originally Posted by DigiCrime
Ok, modified I havent got a test system I can try it on yet so I wont know for sure anyone wanna test it ? lol http://stlhosting.com/kernel-2.6.17.5-2.i386.rpm

This is a intel based config, with some scsi/smp support mostly generic.

If I have to edit the macro file every time that could be a headache
I use the rpmbuild system, and actually have the spec under my SPECS directory of my defined rpmbuild environment (which in my case is not /usr/src/redhat, but ~/rpmbuild). You can define your build environment in the .rpmmacros file and set your path and what not, just you will have to replicate the /usr/src/redhat tree, then manage all through .specs, build with rpmbuild $RPMBUILD/SPECS/<your_kernel>.spec and make sure you have all you need in $RPMBUILD/SOURCES, including .configs and what not. That should work well for you.
 
Old 07-19-2006, 03:41 PM   #8
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
yup, kinda figured just dont have a whole lot of spare time lol some day ill get it fixed up for everything
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
counter part of "rpm -ivh --force kernel....rpm in slackware b0nd Slackware 2 01-28-2006 08:46 PM
Non-modular Kernel from scratch Help shotokan Linux From Scratch 6 09-18-2005 10:12 AM
how to compile a kernel with modular sound? darkleaf Linux - Software 3 07-07-2004 04:38 PM
Network doesn't start on Laptop boot (modular NIC / pcmcia kernel drivers) Swad Debian 1 11-09-2003 09:46 AM
ALSA and Kernel Modular Drivers digital abuzer Linux - Hardware 1 10-09-2003 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:48 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration