LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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
  Search this Thread
Old 02-18-2008, 01:09 PM   #1
sagsriv
LQ Newbie
 
Registered: Jan 2008
Location: Kolkata India
Distribution: fedora 6
Posts: 21

Rep: Reputation: 15
Problem in booting from compiled linux kernel in Fedora Core


I have Fedora Core installed in my machine. Recently I thought of compiling a new kernel source so I downloaded, compiled and installed the letest kernel source available. I followed the procedure

1.Downloaded sourcecode and unziped.

2.make mrproper

3.cp /boot/config-`uname -r` ./.config

4.make menuconfig
which brings up the kernel configuration menu. I Loaded an Alternate Configuration File and choose .config (which contains the configuration of my current working kernel) as the configuration file.

5.Then finished with Yes (Should I make some changes in .config?).

6.Then I used
make all
make modules_install
make install

Before that, my grub.conf looked like

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,6)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,6)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,6)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-1.2798.fc6.img

title Windows XP
rootnoverify (hd0,0)
chainloader +1

After that, I see following lines appended in my grub.conf
title Fedora Core (2.6.24.2 : Compiled version)
root (hd0,6)
kernel /vmlinuz-2.6.24.2 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.24.2.img

I have vmlinuz-2.6.24.2 and initrd-2.6.24.2.img file along with their previous(2.6.18-1.2798.fc6) versions in my /boot. But I have a symvers-2.6.18-1.2798.fc6.gz file whose 2.6.24.2 version is not available. Is that needed? If yes, how do I get that?

Now, the problem.

When I try to boot from my new kernel, after some normal outputs(ome messages and a few errors, which also come in my fc6 2.18 version booting) I get the following message:

RedHat nash version 5.1.19.03 starting
Reading all physical volumes. This may take long time.....
No volume groups found.
Volume group "VolGroup00" not found.
mount: could not find filesystem /dev/root
setuproot: mounting /dev failed : No such file or directory
setuproot: error mounting /proc No such file or directory
setuproot: error mounting /proc No such file or directory
setuproot: error mounting /sys No such file or directory
switchroot: mount failed No such file or directory
Kernel panic not syncing: Atempted to kill init!

After that the cursor goes blinking.But I can successfully boot from my fc6 2.18 version after restarting.

Can anyone help me?(I appologize if u feel I got too much expressive)
 
Old 02-18-2008, 01:23 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Try again, this time;

make clean
make oldconfig
make menuconfig
make
make modules_install
make install

Far to many changes from the 2.6.18 kernel (as supplied by Fedora) to use the supplied kernel config file.

No, you do not need a symvers-<version-number>.gz file when you compile your own kernel.

Last edited by Lenard; 02-18-2008 at 01:32 PM.
 
Old 02-18-2008, 01:34 PM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Just make sure that when you compile the kernel you either compile the filesystem support you use in your disk into the kernel (not as a module), or use initrd file; otherwise there will be problems mounting the filesystem (because it's module can't be loaded before the filesystem is mounted, and it can't be mounted before the module is loaded). It depends, but it's not uncommon that ext3 is used as filesystem, and kernel has by default only ext2 support marked to be compiled in, and ext3 is marked to be compiled as a module (or even worse, not at all).

You don't need all the files possibly created by the make procedure, namely only the vmlinuz file is really needed (the kernel itself). The rest depend on your kernel configuration. It's a good idea to also copy the .config file to /boot/config-your-new-kernel-version to spare it, in case you compile a new kernel later and need the file (and you can use it <=> the new kernel version doesn't differ too much).
 
Old 02-18-2008, 01:39 PM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,472

Rep: Reputation: 189Reputation: 189
It obviously can't find your root filesystem and kernel panics as a result. That's usually because either the kernel does not have the necessary built in support to find and mount the root filesystem or the kernel has the necessary module support to do that but that initrd was not built with the necessary modules to find and mount your root filesystem. You have to go back and check your kernel configuration. I would suspect the module support is there but that initrd needs to be rebuilt. Exactly which modules you need to include in initrd is a function of your hardware and software environment.

Just a side note, I've tried using several distros .config files when compiling a new kernel to add some additional support and in every case but slackware, I've run into problems. Distro kernels are so heavily patched these days that it seems impossible to use this technique any more.
 
  


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
Fedora Core 5 Booting problem Jamier101 Fedora 2 08-12-2006 07:02 AM
pre-compiled 2.6.6 kernel (fedora core 2) with 8k stack? jeffreybluml Linux - Newbie 2 06-09-2004 03:30 PM
Fedora Core 2 test 1- No sound module compiled in kernel? frontier1 Fedora 1 02-14-2004 09:51 AM
Compiled Custom Kernel booting problem _flaab_ Mandriva 3 11-13-2003 07:34 AM


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