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 - 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 07-29-2005, 01:08 AM   #1
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Rep: Reputation: 30
Kernel compile error


I had compiled a kernel and when I boot up it shows the folling message, could anyone advice what's wrong with it.

MP-BIOS bug: 8254 timer not connected to IO-APIC
audit (1122643422.130:0): initialised
can't register device seq
specify port
kernel panic - not syncing: VFS: Unable to move fs on unknown-block (0,0)

I am a newbie so please advise if more information is needed. I am running Ubuntu 5.04. I have downloaded the kernel 2.6.12.3 from www.kernel,org (not sure if it is the right one).

Hardware is as follows:

AMD Athlon 64 2800+
768MB of RAM
nForce 3 chipset with LAN
Sapphire Radeon 9550
Soundblaster Live! Value
2 IDE, 1 SATA and 2 optical drives

Thanks.
 
Old 07-29-2005, 04:05 AM   #2
shrey_j
Member
 
Registered: Jul 2004
Location: Delhi
Distribution: FC3, RH 9.0
Posts: 39

Rep: Reputation: 16
> kernel panic - not syncing: VFS: Unable to move fs on unknown-block (0,0)

I am not sure about the other errors, but this might be a problem of wrong partition number being given at the mount time.

The /dev/xxx which is given at the Grub should contain the rootfs. For this, you will have to loginto a pre existing installation and check which partition has been mounted as /

what you can do is, run 'fdisk -l' and see the various partitions ...again here there would be no indication for a rootfs.

After selecting the parition, change the grub entry to root=/dev/xxx where xxx is your device.

ALTERNATIVELY, in case you know you partition, just press e on grub prompt and change the parition.

If this works, it would be great, else it seems some other kernel geek would have to help you out (coincidentaly even I am a newbie)

Shrey
 
Old 07-29-2005, 11:01 AM   #3
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Hi,

Thanks fro your inputs.

I have my whole Ubuntu installed on hda1. The GRUB entry is a copy and paste duplicate from a default and working option with just the kernel name changed, the the new kernel is sitting right next to the original kernel at the same folder. And the fact that GRUB found and loaded the kernel make me thinks that it has nothing to do with GRUB at all.

New kernel entry

title Ubuntu, kernel 2.6.12.3 Customised
root (hd0,0)
kernel /boot/vmlinuz-2.6.12.3-customised root=/dev/hda1 ro console=tty0 quiet splash
initrd /boot/initrd.img
savedefault
boot

Default and working kernel entry

title Ubuntu, kernel 2.6.10-5-amd64-k8
root (hd0,0)
kernel /boot/vmlinuz-2.6.10-5-amd64-k8 root=/dev/hda1 ro console=tty0 quiet splash
initrd /boot/initrd.img-2.6.10-5-amd64-k8
savedefault
boot
 
Old 07-29-2005, 11:14 AM   #4
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Shrey,

You made me took a second look on the GRUB menu.lst and I realised there is something wrong. Thanks.

Any kind soul could tell me what is the initrd entry for?
 
Old 07-29-2005, 11:33 AM   #5
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
I think I have found the culprit for this message:

kernel panic - not syncing: VFS: Unable to move fs on unknown-block (0,0)

I removed the initrd line for the working GRUB entry and it shows the same message. I guess you are right Shrey. It is not pointing at the right place. Where should I point for my new kernel?

I have made some modification to the kernel, the above error message is replaced the following error message that keeps flooding the screen:

modprobe: FATAL: Could not load/lib/modules/2.6.12.3/modules
dep: no such file

When I hit Ctrl-C, it halted after saying this:

The device node /dev/hda1 for the root filesystem is missing,
incorrect, or there is no entry for the root filesystem
listed in /etc/fstab

The system is also unable to create a temporary node in
/dev/sda to use as a work around.

Someone please save me from this mess.
 
Old 07-29-2005, 12:32 PM   #6
shrey_j
Member
 
Registered: Jul 2004
Location: Delhi
Distribution: FC3, RH 9.0
Posts: 39

Rep: Reputation: 16
Hi NavyBlue,

It seems that you are pointing to a wrong initrd.
Firstly 'initrd' or initialized Ramdisk is supposedly the life of a starting kernel having lots of drivers which could not be packed into the kernel (modules to be precise). So this is really necessary until and unless the kernel has been compiled with all the necessary drivers inbuilt (rare and bad chance).

Secondly, you need to get your files for kernel and initrd right. I mean GRUB should know the correct files. What you can do is, start afresh. here we go (see, I might be wrong in perceiving the answer, cause even I am new . but procedure below works for me):
> First step is compile your kernel [which you have done]

> 2. create initrd (if you are NOT doing 'make install')
>> if above is the case, initrd is made by cmd : mkinitrd <where to create , generally it is /boot/<any file name>> <kernel version>
>> Here kernel version is supposed to be a directory which has to appear in /lib/modules/<kernel version> . This is the kernel which you are trying to compile. This would appear in case you have done 'make modules_install' [OK, please do check with 2.6 compiling - I am new for it]

>3. reboot

>4. At GRUB, select the kernel, and press e/c [which ever you like] [if pressing c, pen the commands down]

>5. In case it is c, first set root by
>> root (hd0,0) <-- here hd0 is the first disk, 0 is the first partition which is also called hda1 -- counting starts from 0. Tabs also works here which will give you the complete disk image (with partitions)

>6. then you chose the kernel (again tabs works showing the path of the kernel file like in bash - ofcourse root should be the true fs only then .. this would also provide you a check whether the root fs is right)
>> kernel /boot/<kernel image name>

>7. similarly select initrd
>> initrd /boot/<initrd file>

>8. finally
>> boot

If all's fine till now, you should have your kernel up and running. Hope this text helps cause this is something that even I had to suffer while compiling-booting my first kernel.

All the best,
Shrey
>7.
 
Old 07-30-2005, 12:05 PM   #7
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Hi Shrey,

I really appreciate your helpfulness.

However I met some problem here, on the step 1 that you mentioned, here is what I typed and what the system says:

root@PC:/boot # mkinitrd -o /root/initrd.img 2.6.12.3
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory

I have also tried "mkinitrd -o /root/initrd.img lib/modules/2.6.12.3", but it says the same thing. What should I do?

Thanks again.
 
Old 08-01-2005, 12:21 AM   #8
shrey_j
Member
 
Registered: Jul 2004
Location: Delhi
Distribution: FC3, RH 9.0
Posts: 39

Rep: Reputation: 16
hi NavyBlue,

>>> root@PC:/boot # mkinitrd -o /root/initrd.img 2.6.12.3
I am not sure whether this command is right. Because I just cross-checked the man page for mkinitrd, and there seems to be no option with 'o'.
Anyways, this is what I tried and it worked fine.

> [root@shrey]#mkinitrd /boot/initrd-2.6.9.img 2.6.9
where 2.6.9 is my kernel., And I am placing my image file in /boot as initrd-2.6.9.

What I perceive of the errors that you got, is : that mkinitrd is trying to search an object file because you have used a -o option in front of it.
Remove that and use this syntax instead

mkinitrd <path where you wan the initrd, generally in /boot by any name> <kernel version which should be same as that in /lib/modules, just the version number.>

Hopefully this should work.

Cheers,
Shrey
 
Old 08-01-2005, 01:12 AM   #9
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Hi Shrey,

I typed in the followings and this is what the system says:

Code:
root@PC:/boot # mkinitrd /root/initrd.img 2.6.12.3

$Id: mkinitrd,v 1.201 2004/05/16 22:00:48 herbert Exp $

Usage: /usr/sbin/mkinitrd [OPTION]... <-o outfile> [version]

Options:
  -d confdir  Specify an alternative configuration directory.
  -k          Keep temporary directory used to make the image.
  -m command  Set the command to make an initrd image.
  -o outfile  Write to outfile.
  -r root     Override ROOT setting in mkinitrd.conf.

See mkinitrd(8) for further details.
Earlier on I did type this command and I thought it didn't work, so is it working? I've noticed some difference on the error message during booting, the partition number change from (0,0) to (3,1).

kernel panic - not syncing: VFS: Unable to move fs on unknown-block (3,1)

What's happening?

Last edited by Navyblue; 08-01-2005 at 01:14 AM.
 
Old 08-01-2005, 01:33 AM   #10
shrey_j
Member
 
Registered: Jul 2004
Location: Delhi
Distribution: FC3, RH 9.0
Posts: 39

Rep: Reputation: 16
This is what my machine is printing for mkinitrd

Code:
root@shrey#]$ /sbin/mkinitrd --help
usage: mkinitrd [--version] [-v] [-f] [--preload <module>]
       [--omit-scsi-modules] [--omit-raid-modules] [--omit-lvm-modules]
       [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]
       [--builtin=<module>] [--nopivot] <initrd-image> <kernel-version>

       (ex: mkinitrd /boot/initrd-2.2.5-15.img 2.2.5-15)

root@shrey#]$ /sbin/mkinitrd --version
mkinitrd: version 3.5.14
there seems to be some mismatch in the versions of mkinitrd.

Also, on doubt /root/initrd.img , why are you trying to put it in /root .. though I am not sure whether this would create any problem, but still, keep you login-account away from booting process. <- this is just a suggestion.

Code:
kernel panic - not syncing: VFS: Unable to move fs on unknown-block (3,1)
this means that the initrd file is wrong, and at bootup time the partition being searched for , for /, is wrong.

I fear, you will have to tinker a bit with the mkinitrd command, and the initrd image. From all I can say is, that your initrd is failing for sure.

Do cross-check whether you have a directory named after the kernel you are trying to reboot - in /lib/modules/.

Also, there is one more option for booting your kernel. You will have to re-compile the kernel with NO drivers as modules. set all the required drivers as 'Inbuilt'. this way you won't even require initrd image. OK, this way the kernel image would be quite large, but hey, you have enough RAM. For this, you will have to go through the comlete menuconfig process and deselect all the unnecessary studd, and select all required drivers to be compiled with the kernel.

Again, by the above way, you would be able to boot successfully, but this means bypassing the initrd image problem, NOT solving it in case you are keen to do that.

All the best,
Shrey
 
Old 08-01-2005, 03:28 AM   #11
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
By the way, would there be theoretical or practical performace difference between:

- default kernel vs self compiled kernel
- functions compiling into the kernel vs compiled as module

If I were to update mkinitrd to the latest version could Synaptic or apt-get command do the job? I have been checking update almost everyday lately and there is not prompt to this update.

If I were to leave out the initrd thingie, should I just leave out the initrd line in the /boot/grub/menu.lst?

Actually I don't meant to save the initrd file into the /root directory, it was actally a typo error and I meant to put it in the /boot directory with the rest of the initrd files.
 
Old 08-01-2005, 03:41 AM   #12
d0tc0mguy
Member
 
Registered: Apr 2005
Location: India
Distribution: Fedora
Posts: 35

Rep: Reputation: 15
did u copy the System.map to the /boot
just give it a try... iam not sure..
 
Old 08-01-2005, 04:04 AM   #13
Razze
Member
 
Registered: Dec 2004
Location: Espoo, Finland
Distribution: Gentoo, 2.6.16-gentoo-r11
Posts: 108

Rep: Reputation: 15
I don't use initrd or ramdisk at all. I have compiled all the necessary stuff such as support for the file system of your /boot and /, and then I have the other drivers as modules (sound, usb, other file systems etc). My kernel is 1 MB, and the total system is something like 4 MB.

There certainly can be differences between a default kernel and a custom one. In your own kernel you only add support for what you really need whereas default kernels are compiled so that almost everything you throw at it should work. You can also compile your own kernel optimized for your specific processor whereas default kernels are usually compiled for i586 (or even i386)
 
Old 08-01-2005, 05:42 AM   #14
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by d0tc0mguy
did u copy the System.map to the /boot
just give it a try... iam not sure..
Nope, I didn't. I assume this is the one which is at the directory that the kernel is decompressed to?
 
Old 08-01-2005, 05:49 AM   #15
Navyblue
Member
 
Registered: Jul 2005
Posts: 161

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Razze
I don't use initrd or ramdisk at all. I have compiled all the necessary stuff such as support for the file system of your /boot and /, and then I have the other drivers as modules (sound, usb, other file systems etc). My kernel is 1 MB, and the total system is something like 4 MB.

There certainly can be differences between a default kernel and a custom one. In your own kernel you only add support for what you really need whereas default kernels are compiled so that almost everything you throw at it should work. You can also compile your own kernel optimized for your specific processor whereas default kernels are usually compiled for i586 (or even i386)
Through Synaptic, I have actually downloaded the kernel specifically for my processor, AMD K8. I'm not sure if what I am dealing is worth the effort, to be frank, I think my system is rather snappy with KDE, just that i thought I would get even better performance.

Another intention of doing it is actually to enable the ATI 3D driver. I read somewhere that the Ubuntu default 3D driver does not work with nVidia 2 chipset. Mine is nVidia 3, and I am not sure if the same thing will happen.
 
  


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
Error during the kernel (2.6.10) compile. Whynot Debian 1 03-03-2005 07:34 PM
Kernel 2.6.9 compile error burn0ut Linux - General 3 12-08-2004 08:05 AM
error 2 trying to compile 2.4 kernel TonyJ Fedora 2 09-15-2004 07:51 PM
Kernel 2.6.4 compile error kkiedrowski Slackware 3 04-30-2004 09:37 AM
Kernel compile error theabyyss Linux - General 4 04-08-2002 04:36 AM

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

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