Kernel build, install and boot question on ram disk image
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok, I copied the existing config files, did make oldconfig, did make and make modules. At the end of make modules, there is a warning:
Code:
Building modules, stage 2.
MODPOST 1910 modules
WARNING: modpost: Found 15 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
What does this mean? Something wrong?
I don't know. I do not compile my kernels with make. You might want to do exactly what it says to see what errors you are getting. What I don't understand is the modules bit. Doing it the Ubuntu/Debian way, the modules statement is only for add-on modules, not the drivers in the kernel itself. Do you have additional modules that you are trying to compile that are not part of the kernel source tree? I only use the kernel_image option. If you can show the exact commands you are using, I suppose I could run that on mine and see what happens. I really suggest you switch to the Ubuntu way, though.
it looks like the warnings are just whines. Here is an expanded example
Code:
WARNING: drivers/net/3c509.o(.devinit.text+0x133): Section mismatch in reference from the function el3_isa_match() to the function .init.text:el3_common_init()
The function __devinit el3_isa_match() references
a function __init el3_common_init().
If el3_common_init is only used by el3_isa_match then
annotate el3_common_init with a matching annotation.
So I went ahead to boot with the newly built kernel. Then I got the exactly same failure as before: it could find the root device. Now I am really puzzled. Maybe I have done something wrong somewhere. Or this thing should have been built the Ubuntu way.
Quote:
Originally Posted by Quakeboy02
it looks like the warnings are just whines. Here is an expanded example
Code:
WARNING: drivers/net/3c509.o(.devinit.text+0x133): Section mismatch in reference from the function el3_isa_match() to the function .init.text:el3_common_init()
The function __devinit el3_isa_match() references
a function __init el3_common_init().
If el3_common_init is only used by el3_isa_match then
annotate el3_common_init with a matching annotation.
What is your root device? Is it /dev/hdx or /dev/sdx? IOW, are you using PATA or SATA? Also, what is your controller, and are you sure it's enabled in the kernel? What are the complete contents of both /boot/grub/device.map and /boot/grub/menu.lst?
Another perhaps key question is what version of gcc are you using? I recently got an error during a kernel compile using gcc 4.3.2-1.
If you're using an initramfs, then did you run "sudo update-initramfs -u -k all" before booting your newly installed kernel?
As to using the Ubuntu way? I'd suggest you give it a try after trying update-initramfs.
I think my root device is /dev/sdx by looking at the "mount" output. / is mounted on /dev/sd.
How do I find out PATA or SATA? How do I find out about the controller? Is "lspci" the right command?
Quote:
Originally Posted by Quakeboy02
What is your root device? Is it /dev/hdx or /dev/sdx? IOW, are you using PATA or SATA? Also, what is your controller, and are you sure it's enabled in the kernel? What are the complete contents of both /boot/grub/device.map and /boot/grub/menu.lst?
Another perhaps key question is what version of gcc are you using? I recently got an error during a kernel compile using gcc 4.3.2-1.
If you're using an initramfs, then did you run "sudo update-initramfs -u -k all" before booting your newly installed kernel?
As to using the Ubuntu way? I'd suggest you give it a try after trying update-initramfs.
Post the outputs of both "lspci -v" and lsmod. Also, try booting with knoppix and tell me what device it sees. Knoppix usually finds anything. I wonder, did you set something on the motherboard BIOS to see SATA as PATA?
Try building and installing the Ubuntu way, and see if the problem remains.
Post the outputs of both "lspci -v" and lsmod. Also, try booting with knoppix and tell me what device it sees. Knoppix usually finds anything. I wonder, did you set something on the motherboard BIOS to see SATA as PATA?
Try building and installing the Ubuntu way, and see if the problem remains.
And also the issue I don't understand is: if I used the old or existing .config to compile my new kernel how would it be possible that the new kernel didn't
include all necessary drivers that were used to boot the existing kernel?
Could I see the complete contents of /etc/fstab, /boot/grub/device.map and /boot/grub/menu.lst as well as .config
Also, do you have the motherboard set to see SATA as PATA?
I notice that you are using UUIDs in your menu.lst. I assume you also have that in /etc/fstab. I don't have any experience with that, but maybe the contents of the two /boot/grub files will help.
Are you 100% certain that there are no differences between your .config and the running config?
And also the issue I don't understand is: if I used the old or existing .config to compile my new kernel how would it be possible that the new kernel didn't
include all necessary drivers that were used to boot the existing kernel?
I wonder if they changed the way the kernel looks at PATA and SATA on that controller in the version of the kernel you're trying to compile. Another option is to download 2.6.23 and see if that will compile and run, as that's right between the two Ubuntu kernels you have.
Now I have read that I need to make an intermediate ram disk image. I finally got a chance to download the mkinitramfs package. It asked me to run "update-initramfs" on the local box. So when I did this I got an error about missing "/etc/modprob.conf" file.
Did you ever get a successful run of update-initramfs? Have we gotten sidetracked from what is your real problem?
Yes I did pass "update-initramfs" by "touch /etc/modprob.conf" which generated the ram fs image. Then I ran into this "root device" problem on booting up.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.