Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-24-2006, 06:24 PM   #1
Registered: Sep 2003
Posts: 76

Rep: Reputation: 15
Compile kernel


I have problem in compiling the kernel.
I compile kernel 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-
root (hd0,0)
kernel /bzImage- 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, 07:46 PM   #2
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 272Reputation: 272Reputation: 272
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, 08:01 PM   #3
Senior Member
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2
Posts: 2,265

Rep: Reputation: 54
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, 02:34 AM   #4
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, 08:45 AM   #5
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

I tried to create initrd as follows but error message received:
# mkinitrd /boot/initrd-
No module sd_mod found for kernel, aborting.
Old 04-25-2006, 02:17 PM   #6
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 02:19 PM.
Old 04-25-2006, 03:57 PM   #7
Senior Member
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,491

Rep: Reputation: 52

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.

Old 04-25-2006, 05:51 PM   #8
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.


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 07: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 03:37 PM
compile a new kernel with setting default to current kernel mrpc_cambodia Red Hat 6 07-06-2004 12:32 PM
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 07:02 AM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 02:40 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration