LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-24-2006, 05:24 PM   #1
eyt
Member
 
Registered: Sep 2003
Posts: 76

Rep: Reputation: 15
Compile kernel


Hi,

I have problem in compiling the kernel.
I compile kernel 2.6.16.9 on Mandrake 10.1.
When the machine boots to the new kernel and gives the messages below:

FS: Cannot open root device "sda6" or unknown-block(0,0)
lease append a correct "root=" boot option
kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(0,0)


# cat /boot/grub/menu.lst
title linux-2.6.16.9-New
root (hd0,0)
kernel /bzImage-2.6.16.9new root=/dev/sda6

title linux
kernel (hd0,0)/vmlinuz root=/dev/sda6 acpi=ht resume=/dev/sda5 splash=silent vga=788
initrd (hd0,0)/initrd.img

title linux-nonfb
kernel (hd0,0)/vmlinuz root=/dev/sda6 acpi=ht resume=/dev/sda5
initrd (hd0,0)/initrd.img

title failsafe
kernel (hd0,0)/vmlinuz root=/dev/sda6 failsafe acpi=ht resume=/dev/sda5
initrd (hd0,0)/initrd.img
 
Old 04-24-2006, 06:46 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 271Reputation: 271Reputation: 271
The only thing different I see is that your new grub entry is different in format to the others. Also, you don't seem to have an initrd this time (which maybe fine as long as you built the filesystem into the kernel).

I guess one thing that is confusing me is the root (hd0,0). Do you have your kernel installed to a separate boot partition? Because it seems like (hd0,0) is the boot partition and then you're booting the root filesystem at /dev/sda6. Is that correct?
 
Old 04-24-2006, 07:01 PM   #3
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2 Solus
Posts: 2,264

Rep: Reputation: 51
Look at the kernel line and you should be able to spot the obvious difference between it and the ones that work.
 
Old 04-25-2006, 01:34 AM   #4
The-Archangel
LQ Newbie
 
Registered: Apr 2006
Location: London, UK
Posts: 8

Rep: Reputation: 0
As one of you said - you're missing initrd. Type in console mkinitrd and follow help that you've given.
In the basics you should have folder that matches your new kernel's name in /lib, like /lib/2.6.9-new for example. If so, you should do 'mkinitrd 2.6.9-new'
 
Old 04-25-2006, 07:45 AM   #5
eyt
Member
 
Registered: Sep 2003
Posts: 76

Original Poster
Rep: Reputation: 15
The kernel is installed to a separate boot partition

/dev/sd16 /
/dev/sda1 /boot

# ls /lib/modules
2.6.16.9-2.6.16.9new/ 2.6.8.1-12mdk/

I tried to create initrd as follows but error message received:
# mkinitrd /boot/initrd-2.6.16.9new 2.6.16.9-2.6.16.9new
No module sd_mod found for kernel 2.6.16.9-2.6.16.9new, aborting.
 
Old 04-25-2006, 01:17 PM   #6
rconan
Member
 
Registered: Jun 2005
Distribution: Debian Unstable (Sid)
Posts: 63

Rep: Reputation: 15
You should first check you enabled ramdisks and initrds in the kernel config and if not change that.

Then try remaking your initrd for the kernel.

I know when i made my kernels for Fedora the initrd was made for me by the "make install" command (this might not be the same for mandrake)

Last edited by rconan; 04-25-2006 at 01:19 PM.
 
Old 04-25-2006, 02:57 PM   #7
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Rep: Reputation: 51
Hi

Just wanted to relate that I had the same errors recently when building a new kernel for Slackware. It turned out that the I had not configured the correct SATA support in the kernel. It is not enough to simply select SATA support, but the correct chipset for your mobo is also necessasry. I also had a minor error in the name of the kernel as it was shown in /boot directory causing a similar error. If your kernel is on sda6 of your first hard drive (hd0) and it is named exactly the samein your grub.conf file, it should boot even with an initrd.

Don't know if it will, but I hope this helps.

Bob
 
Old 04-25-2006, 04:51 PM   #8
eyt
Member
 
Registered: Sep 2003
Posts: 76

Original Poster
Rep: Reputation: 15
I recompile the kernel and enable the ramdisk and initrd. Then I create the initrd.
The new kernel boots up fine . Thanks you all for your help.
 
  


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
How to restore out-of-box kernel settings if my kernel compile fails? brgr88 Slackware 8 04-18-2006 06:51 AM
upgraded kernel, won't let me compile kernel once Suspend2 patches are applied microsoft/linux Linux - Laptop and Netbook 3 10-02-2005 02:37 PM
compile a new kernel with setting default to current kernel mrpc_cambodia Red Hat 6 07-06-2004 11:32 AM
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 06:02 AM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:01 PM.

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