LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-21-2004, 02:51 AM   #1
guam
LQ Newbie
 
Registered: Feb 2004
Location: Korea
Posts: 25

Rep: Reputation: 15
Kernel 2.4.28 Compile


Hello World,

I am trying to compile Kernel 2.4.28. The compilation goes fine, no errors.
And the configuration of grub is also good. On reboot I can see the new kernel option to load on. I am using the same config.in which was present earlier.

But when I choose the newly compiled kernel, I get the following kernel panic message:

No socket drivers loaded!
Cannot open device "LABEL=/" or 00:00
Please append a correct "root=" boot option
Kernel Panic: VFS: Unable to mount root fs on 00:00

I am using the following procedure to compile and configure grub.

$ make dep
$ make clean
$ make bzImage
$ make modules
$ make modules_install
$ mkinitrd /boot/initrd-2.6.0.img 2.6.0
$ mkinitrd -k vmlinux-VERSION -i initrd-VERSION
$ cp arch/i386/boot/bzImage /boot/bzImage-KERNEL_VERSION
$ cp System.map /boot/System.map-KERNEL_VERSION
$ ln -s /boot/System.map-KERNEL_VERSION /boot/System.map

The additional line in /etc/grub.conf:

title Test Kernel (2.6.0)
root (hd0,1)
kernel /boot/bzImage-2.6.0 ro root=LABEL=/
initrd /boot/initrd-2.6.0.img


I think the steps I followed are fine. What I can guess is I am missing some module or component to compile. The kernel source is downloaded from kernel.org site.

Can someone kindly provide the insight to this problem and some fix to it?

The sole intent for kernel compilation is to modify the networking part i.e. the TCP/IP stack for testing. The change includes adding some custom info to the IP header (option field in IP header). I think this is not possible without the kernel compilation. What is your suggestion?


Thanks for the help

Regards

Devel.
 
Old 11-21-2004, 08:57 AM   #2
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
Your initrd is bad. either it is not named correctly and does not match the grub entry or it was not created right. look at the size of your initrd and make sure it is big enough. On debian you can create a initrd by using this command
"mkinitrd -k -o /boot/initrd-2.4.28 2.4.28"
 
Old 11-21-2004, 09:04 AM   #3
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
I forgot to tell you that you can mount your initrd to see what is inside of it by mounting it to a directory.
"mount -t cramfs -o loop initrd.img-2.6.8-1-k7 initrd" you may need to gunzip it or bunzip it before actually mounting it.
 
Old 11-21-2004, 09:45 AM   #4
guam
LQ Newbie
 
Registered: Feb 2004
Location: Korea
Posts: 25

Original Poster
Rep: Reputation: 15
Hello Peacebwitchu,

Thanks for the reply.

I checked the size of initrd-2.4.28.img file it is 83.2 KB which is almost half of the original initrd-2.4.20-8.img file. And I mounted the initrd.2.4.28 after the gunzipping. The dirs bin, dev, et, lib loopfs, proc and sysroot are present. Sbin dir is a soft link to bin dir and a file named linuxrc is also present. Most of these dirs are empty. Is this normal?

I am not much aware of the content of these directories.

What is your suggestion? Should I compile the kernel again?

Ah, one more question. How can I find out the info about the components and modules to be choose while doing the make config? study: As usual I want the basic components to be present that is available on a new Linux installation.

Thanks again.

Devel.
 
Old 11-21-2004, 10:02 AM   #5
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
Look in lib of the intrd there should be a directory of your kernel version. All your modules should be there that are needed to boot the system. So if you have ext3 filesystems but you compiled ext3 as a module that needs to be there if you have a scsi controller that needs to be there etc... There is a easy way of fixing this and that would be not to use initrd. To accomplish this you would need to find the modules that your system needs to boot and then recompile the kernel with these modules builtin to the kernel. The default initrd on Debian is 4.5 MB.
 
Old 11-22-2004, 02:38 AM   #6
guam
LQ Newbie
 
Registered: Feb 2004
Location: Korea
Posts: 25

Original Poster
Rep: Reputation: 15
Hello Peacebwitchu,

I have compiled the source couple time more but I am getting the same error. When I compared the lib dir in the mounted initrd file with the original initrd from the installation, the ext3.o and jdb.o files are not present. I guess I am making some mistake while I was doing make xconfig.

The size of initrd image is something around 83.2 KB.

Any other suggestions.

Thanks anyways

Regards

Devel
 
Old 11-22-2004, 06:05 AM   #7
peacebwitchu
Member
 
Registered: Apr 2004
Distribution: Debian
Posts: 185

Rep: Reputation: 30
Make sure they are not compiled into the kernel.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
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
I want to compile 2.6 kernel and keep everything from 2.4 intact (dual kernel system) sina_kish Linux - Software 7 02-02-2005 09:01 AM
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 06:02 AM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 03:05 PM
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 - General

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