Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 28th April 2007, 01:51 PM
Chelu's Avatar
Chelu Offline
Registered User
 
Join Date: Apr 2007
Posts: 7
Smile Fedora Core V Kernel Build - two questions for you guys

Hi everyone

I have a FC5 distro and i would like to build a custom kernel. Not for a specific purpose, but for gain some experience.

So, I have a few questions for you guys.

1. What rpms do I need to have? And where should I copy them? (please provide a link if possible. It would be too great).

2. What are the commands that should i run?

Thanks in advance,

your friend Chelu.

Last edited by Chelu; 28th April 2007 at 01:55 PM.
Reply With Quote
  #2  
Old 28th April 2007, 05:52 PM
Seve's Avatar
Seve Offline
Retired Community Manager
 
Join Date: Oct 2004
Location: The GTA, Ontario, Canada
Age: 54
Posts: 12,376
Hello:
If you do a quick look through the how-to section here on the forums there are several very good how-to's which you can follow.
Here are a few:
http://forums.fedoraforum.org/showthread.php?t=141782
http://forums.fedoraforum.org/showthread.php?t=29434
http://forums.fedoraforum.org/showth...&highlight=bob

Seve
__________________
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
Reply With Quote
  #3  
Old 28th April 2007, 06:50 PM
lmo Offline
Registered User
 
Join Date: Mar 2007
Posts: 1,047
Since you said:
Quote:
Not for a specific purpose, but for gain some experience.
Here is the way I have been building vanilla kernels from kernel.org. Every unique new kernel build results in a system that is over 1/2 GB larger. The kernel build takes 1-2 hours on my PIII 800.

This is a script I called KMAKE which I put in /root/ which is root's home directory.

Note: replace linux-X.X.X with the real name, e.g., linux-2.6.21

Must manually do the steps up to and including:
make menuconfig

Then, from /usr/src/linux-X.X.X, I either do:
~/KMAKE

or do the steps manually one by one.

The lines beginning with # are comments and are steps that I run before/after the compilation steps.
Code:
# Here, I violate everybody else's idea, but it works for me (I don't fear root)

#Download vanilla sources from www.kernel.org (get the .bz2 -- more compressed)

#Become root with:
#su -

#Copy the downloaded linux-X.X.X.tar.bz2 to /usr/src/
#cd /usr/src/
#tar -xjf linux-X.X.X.tar.bz2
#cd linux-X.X.X

#NOTE: Not use the exact name of "/usr/src/linux" because that historically conflicts

#copy in a .config from a working kernel

#make menuconfig

#compile and make modules with this command (to avoid waiting on each step)

date > World.log && make bzImage >> World.log 2>&1 \
&&  make modules >> World.log 2>&1 \
&& make modules_install >> World.log 2>&1 && date >> World.log

#... check progress now and then from another terminal with tail -f World.log 

if [ -f arch/i386/boot/bzImage ]
then
  VERSION=$(grep "Linux kernel version:" .config | sed "s/^[^0-9]*//")
  read -p "VERSION: [$VERSION]" VERSION_Q
  if [ -n "$VERSION_Q" ]
  then
    VERSION=$VERSION_Q
  fi
  echo "VERSION: $VERSION"
  read -p "OK? " ubok
  if [ "$ubok" = "y" ]
  then
    #I have seen other people say 'make install' instead of these next steps,
    # but I haven't tried that.
    mkinitrd -f /boot/initrd-${VERSION}.img $VERSION
    cp arch/i386/boot/bzImage /boot/vmlinuz-$VERSION
    cp System.map /boot/System.map-$VERSION
    ls -lt /boot | sed 4q 2>&1 >> World.log
  fi
fi

#Remove 1+- GB of interim work files that will never again be used: 
#cd /usr/src/linux-X.X.X
#make clean
Now, one more step is to edit grub to put the new kernel as an option.

Then, after booting into the new kernel, if there are any custom modules you have made, they must be recompiled to the new kernel to use them.
2 examples of modules I have to remake are the martian modem driver and the kqemu module for qemu virtualizaion.

Last edited by lmo; 28th April 2007 at 07:14 PM.
Reply With Quote
Reply

Tags
build, core, fedora, guys, kernel, questions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel core dump questions... Snake-Byte Using Fedora 1 18th August 2006 07:28 PM
Kernel/Video questions. Thanx guys!! joetesting311 Using Fedora 4 29th May 2006 12:31 AM
Fedora Core 5 - Kernel build files? skudder Using Fedora 15 27th April 2006 03:29 AM
AMD build of Fedora Core nodialtone Fedora Focus 2 7th November 2004 08:36 PM


Current GMT-time: 19:41 (Saturday, 18-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat