LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-17-2004, 08:47 AM   #1
Teukka
LQ Newbie
 
Registered: Aug 2003
Location: Finland
Distribution: Debian, Fedora, FreeBSD, OpenBSD
Posts: 22

Rep: Reputation: 15
Kernel compiling


Hi

I have compiled kernel in Debian boxes many times, but still I don't get howto do it in FC2 by the right way. Since 2.6.x kernels dont need make dep etc.

The machine is now in that condition how the installer lefts it (ookay i have updatet packages to newer versions) and i have downloaded the kernel source to /usr/src and unzipped it /usr/src/linux-2.6.8.1 directory and after that i have
run command
Code:
make menuconfig
and choosed what i need and after that compiled the kernel & modules whit no errors
Code:
make bzImage && make modules && make modules_install
So now I have the bzImage and System.map (and vmlinuz old is 1.3M and new is 3.3M?) files waiting for.. what?
Do I copy & link them like:

pwd
/usr/src/linux-2.6.8-1

mv arch/i386/boot/bzImage /boot/bzImage-2.6.8.1
mv System.map /boot/System.map-2.6.8.1
cd /boot
rm System.map
ln -s System.map-2.6.8.1 System.map

(how about the vmlinuz)

But how about the old initrd and vmlinuz files in /boot directory? what to do with them? Where do I get new initrd (vmlinuz)?

and finally the grub.conf... now the machine has boot images named like this:

kernel /vmlinuz-2.6.5-1.358smp ro root=/dev/md7
initrd /initrd-2.6.5-1.358smp.img


So can somebody give me good hints howto continue after compiling, I'v looked many pages but every page says so different things ? I'm totally confused....

Last edited by Teukka; 08-17-2004 at 09:00 AM.
 
Old 08-17-2004, 12:51 PM   #2
cincindie
Member
 
Registered: Jul 2004
Location: Zinzinnati, OH
Distribution: RH, FC 1-6, F 7-21, Debian, LinuxPPC, Knoppix, Ubuntu, Yellow Dog
Posts: 176

Rep: Reputation: 31
Just copy the bzImage file from the source directory into the boot directory, and name it as vmlinuz-version-name. you also have to do a mkinitrd /boot/initrd-version-name.img version-name to create the initrd image file. Don't worry about the old initrd and vmlinuz files. They don't take up that much space. Add the vmlinuz and initrd files you created to your grub.conf file. You should be all set.
 
Old 08-17-2004, 02:19 PM   #3
Teukka
LQ Newbie
 
Registered: Aug 2003
Location: Finland
Distribution: Debian, Fedora, FreeBSD, OpenBSD
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by cincindie
you also have to do a mkinitrd /boot/initrd-version-name.img version-name to create the initrd image file.
What do i extacly must type in this situation to make that initrd?

/sbin/mkinitrd /boot/initrd-what-do-i-put-here.img and-what-here

I'm not following
 
Old 08-17-2004, 02:33 PM   #4
cincindie
Member
 
Registered: Jul 2004
Location: Zinzinnati, OH
Distribution: RH, FC 1-6, F 7-21, Debian, LinuxPPC, Knoppix, Ubuntu, Yellow Dog
Posts: 176

Rep: Reputation: 31
You seem to be compiling kernel version 2.6.8-1. For this, type the following command: "mkinitrd /boot/initrd-2.6.8-1.img 2.6.8-1". That should produce the requisite initrd file. Your vmlinuz should be named as vmlinuz-2.6.8-1.
 
Old 08-18-2004, 01:45 AM   #5
Teukka
LQ Newbie
 
Registered: Aug 2003
Location: Finland
Distribution: Debian, Fedora, FreeBSD, OpenBSD
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by cincindie
You seem to be compiling kernel version 2.6.8-1. For this, type the following command: "mkinitrd /boot/initrd-2.6.8-1.img 2.6.8-1". That should produce the requisite initrd file. Your vmlinuz should be named as vmlinuz-2.6.8-1.
OK just one question more (hope just one), i typed accidentally wrong one point my first message.. I unzipped the new kernel to (default)

/usr/src/linux-2.6.8.1 not /usr/src/linux-2.6.8-1 directory so the vmlinuz prolly sould named anyway vmlinuz-2.6.8.1

Code:
mv arch/i386/boot/bzImage /boot/vmlinuz-2.6.8.1
or ?

I'm so nervous because the machine is "somewhere" and my job is "just upgrade it" :P

Last edited by Teukka; 08-18-2004 at 01:55 AM.
 
Old 08-18-2004, 05:28 AM   #6
cincindie
Member
 
Registered: Jul 2004
Location: Zinzinnati, OH
Distribution: RH, FC 1-6, F 7-21, Debian, LinuxPPC, Knoppix, Ubuntu, Yellow Dog
Posts: 176

Rep: Reputation: 31
No. It depends on the version mentioned in the first four lines of your Makefile in your linux source directory (in your case /usr/src/linux-2.6.8.1/Makefile). In your case, the version is 2, Patchlevel is 6, Sublevel is 8 and Extraversion is -1. Hence, it should be initrd-2.6.8-1.img. vmlinuz can be named anything as long as you refer to the proper image file in your grub.conf. For consistency sake, I'd name it vmlinuz-2.6.8-1 too.
 
Old 08-18-2004, 06:00 AM   #7
Teukka
LQ Newbie
 
Registered: Aug 2003
Location: Finland
Distribution: Debian, Fedora, FreeBSD, OpenBSD
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by cincindie
No. It depends on the version mentioned in the first four lines of your Makefile in your linux source directory (in your case /usr/src/linux-2.6.8.1/Makefile). In your case, the version is 2, Patchlevel is 6, Sublevel is 8 and Extraversion is -1. Hence, it should be initrd-2.6.8-1.img. vmlinuz can be named anything as long as you refer to the proper image file in your grub.conf. For consistency sake, I'd name it vmlinuz-2.6.8-1 too.

I'm stupid Makefile says:

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 8
EXTRAVERSION = .1

so there is dot not dash.... aaaargh *getting grazy*
 
Old 08-19-2004, 01:47 AM   #8
Teukka
LQ Newbie
 
Registered: Aug 2003
Location: Finland
Distribution: Debian, Fedora, FreeBSD, OpenBSD
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Teukka
I'm stupid Makefile says:

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 8
EXTRAVERSION = .1

so there is dot not dash.... aaaargh *getting grazy*

My solution is now to install testbox and have a try with it that thing and after i succeeded
move to that real critical machine..
 
Old 08-19-2004, 04:57 AM   #9
cincindie
Member
 
Registered: Jul 2004
Location: Zinzinnati, OH
Distribution: RH, FC 1-6, F 7-21, Debian, LinuxPPC, Knoppix, Ubuntu, Yellow Dog
Posts: 176

Rep: Reputation: 31
Good luck!
 
Old 08-20-2004, 01:00 AM   #10
Teukka
LQ Newbie
 
Registered: Aug 2003
Location: Finland
Distribution: Debian, Fedora, FreeBSD, OpenBSD
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by cincindie
Good luck!
nooooonow when I run:

Code:
/sbin/mkinitrd /boot/initrd-2.6.8.1.img 2.6.8.1
it says

No module ata_piix found for kernel 2.6.8.1, aborting.

no matter if I chooce it as module or * or without ??

lspci says
....
00:1f.2 IDE interface: Intel Corp. 82801EB (ICH5) Serial ATA 150 Storage Controller (rev 02)
....

So I think I need that module but how??

In menuconfig

Device Drivers --> ATA/ATAPI/MFM/RLL support --->

< > Intel PIIXn chipsets support is this the problem entry ??

Current lsmod says
...
ata_piix 9348 0
...

after running make bzImage && make modules && make modules_install
it says

if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.6.8.1; fi

what that means?

Like I before say Makefile's fourth line says .1 not -1 ( EXTRAVERSION = .1 )
so should I name bzImage vmlinuz-2.6.8.1 and also run initrd like i typed this message before....?

Last edited by Teukka; 08-20-2004 at 01:04 AM.
 
Old 08-20-2004, 03:35 AM   #11
Teukka
LQ Newbie
 
Registered: Aug 2003
Location: Finland
Distribution: Debian, Fedora, FreeBSD, OpenBSD
Posts: 22

Original Poster
Rep: Reputation: 15
Problem solved, common typo
 
Old 08-23-2004, 09:03 PM   #12
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
Just curious, why didn't you try 'make install'? The makefile does everything for you. I've done this with 2.6.7 and 2.6.8.1.
 
Old 08-24-2004, 12:49 AM   #13
Engmar
Member
 
Registered: Oct 2003
Location: The Forest
Distribution: Ubuntu, LFS, DSL
Posts: 127

Rep: Reputation: 16
There is an alternative method, that won't be suitable for every environment - but as long as you are using an RPM based distro, you might look into taking advantage of your ability to compile and package your kernel with RPM.

Here is a link.
 
  


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
Compiling kernel = kernel panic Tons of Fun Debian 5 07-02-2005 01:59 PM
Compiling kernel module for linux kernel 2.4 in 2.6 guam Linux - Software 0 01-13-2005 02:02 AM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 04:17 AM
Compiling new kernel joseph Linux - Software 2 10-14-2003 07:26 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 04:59 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
Open Source Consulting | Domain Registration