LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-25-2005, 04:14 PM   #1
puishor
Member
 
Registered: Jun 2005
Location: Bucharest
Distribution: Debian,Knoppix,Slackware
Posts: 91

Rep: Reputation: 15
kernel recompilation in details


Hi!

I tried to recompile 2.6.10 kernel not for the first time but always not successfully...
Please help !!
Here is what I did in detail:

1. I use debian system, with 2.4.27-1-386 kernel.
2. I copied /boot/config-2.4.27-1-386 to /usr/src/linux/ and rename it to .config
i.e.
cp /boot/config-2.4.27-1-386 /usr/src/.config
by the way in the first lines of config-2.4.27-1-386 it is said
Code:
#
# Automatically generated make config: don't edit
#
CONFIG_X86=y
# CONFIG_SBUS is not set
CONFIG_UID16=y ...
"don't edit" , could be that a problem ?
3. I run
Code:
  make xconfig
and I didn't modified anything , just left the old settings of 2.4.27 kernel .

4. then
Code:
   make bzImage
   make modules
   make modules_install

  cp arch/i386/boot/bzImage /boot/bzImage-2.6.10
  cp System.map  /boot/System.map-2.6.10
  ln -s /boot/System.map-2.6.10  /boot/System.map
till now all goes OK.

5.next comes my /boot/grub/menu.lst
here is a snippet from it:
Code:
title           kernel 2.4.27-1-386
root            (hd0,0)
kernel          /vmlinuz-2.4.27-1-386 root=/dev/hda2 ro
initrd          /initrd.img-2.4.27-1-386
savedefault
boot

title           kernel 2.6.10
root            (hd0,0)
kernel          /bzImage-2.6.10  root=/dev/hda2 ro
boot
the first part is for my old 2.4.27 kernel , it just loads ok.
the second part is the one I added , and it is supposed to loadnew recompiled kernel ( 2.6.10 ) , it is almost the same as for 2.4.27

6. When I reboot the system , and load 2.6.10 kernel ( from grub menu )
I get the following error:

VFS: Cannot open root device "hda" or unknown-block (0,0).
Please append a correct "root=" boot option: kernel panic: not syncing VFS .Unable to mount root fs on unknown block
 
Old 06-25-2005, 06:20 PM   #2
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Rep: Reputation: 30
Sounds like you're missing a driver for your harddisk or support for one of your filesystems. Hard to see how this would be if it was in your previous config file though. Check it by running make menuconfig or make xconfig again.
Also, you could look for a config file for the 2.6 kernel to use as a template and then add or take stuff out that you need or don't need. I got mine off a slackware mirror.
Cheers
 
Old 06-25-2005, 10:11 PM   #3
Noth
Member
 
Registered: Jun 2005
Distribution: Debian
Posts: 356

Rep: Reputation: 30
Don't steal a 2.4 kernel config and use it in a 2.6 kernel, too many variable names have changed. If you need a 2.6 kernel, just install one of the kernel-image packages already in Debian.
 
Old 06-26-2005, 02:35 AM   #4
puishor
Member
 
Registered: Jun 2005
Location: Bucharest
Distribution: Debian,Knoppix,Slackware
Posts: 91

Original Poster
Rep: Reputation: 15
Quote:
Also, you could look for a config file for the 2.6 kernel to use as a template
Where could I get a template for .config ?
I downloaded new sources , and when I run :
make xconfig
without any .config does it generate a template ?
So I must only save it ?
Am I right ?
 
Old 06-26-2005, 08:16 AM   #5
dcdbutler
Member
 
Registered: Jan 2005
Location: Boston
Distribution: slackware
Posts: 502

Rep: Reputation: 30
I suppose you could do as suggested by noth and install a pre-compiled kernel from the Debian packages. This will generate a .config file automatically which you can then copy and use for your own kernel compilations, Or look for a .config file on the Debian mirrors or use the one I used off the slackware mirrors (don't see why not, there's nothing distro-specific in there as far as I know)
eg
http://public.planetmirror.com/pub/s...e/linux-2.6.x/
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel recompilation ciopi Mandriva 2 11-06-2005 03:18 AM
kernel recompilation sachin_malik Linux - Enterprise 1 05-20-2005 01:57 PM
Recompilation of the kernel s_shenbaga Linux - Newbie 2 04-14-2005 03:06 PM
Kernel Recompilation ... tjrajan Linux - General 3 11-18-2001 04:12 PM
Kernel Recompilation Thomas_Delrue Linux - General 1 08-30-2001 04:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:40 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