Re: kernel panic with insmod errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sarath Kamisetty wrote:

I downloaded 2.6.10 kernel source tarball and compiled it successfully
by doing the following:

make xconfig
make mrproper


The make mr_proper removes the .config file as well so it must be done before xconfig/menuconfig

make dep


make dep is not needed now in 2.6 series

make clean


make clean is not required as make mr_proper takes care of all aspects related to cleaning

make bzImage
make modules_install (this one dumped bunch of depmod: errors about


You have to do a make modules before doing make modules_install

some symbols but copied the files properly to /lib/modules/2.6.xxx/)
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.xxx
cp System.map /boot/System.map-2.6.xxx


So in short follow this sequence for compiling
The sequence to be followed.
make mrproper
make xconfig
make bzImage
make modules
make modules_install

Follow this by the copies you have done. i.e for bzImage and System.map

After that I have added an entry grub.conf file to point to my new
kernel. However, I am not sure about the initrd line so I just left it
unchanged (same as old entry I had already - so it was pointing to old
initrd.img file still).


after compiling the modules and installing them in  /lib/modules/2.6.xxx
( I have assumed 2.6.10 here assuming you have not added your
extraversion in the Makefile)
goto /boot partition and type the following
mkinitrd initrd-2.6.10.img  2.6.10
add the initrd line in grub.conf
(Even if this is not done it should work with old initrd image)

After this when I rebooted, I chose the kernel that I just compiled
from the GRUB menu but while booting it, there were few insmod errors
and then kernel panics saying it was unable to mount the root fs (/).



goto the /etc/fstab file you will find an entry /dev/hdaXX / ............

I think you have a line
       kernel /boot/vmlinuz-2.6.10 ro root=LABEL=/
replace it
   kernel /boot/vmlinux-2.6.10 ro root=/dev/hdaXX
where hdaXX is the partition for / in the fstab file

Is this because the new grub is pointing to old initrd line ?

No.

How do I
make new initrd.img for the kernel I just compiled ? I have compiled
the kernel with SCSI drivers builtin along with loop back support. How
do I know whether all needed modules are compiled ? I see that some
modules that I have compiled into the kernel also are failing with
insmod before the kernel panics.




Can someone help me out or point me to the proper news group ? Please
let me know if you need more information.

Thanks,
Sarath



Regards,
Ashwin

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/






--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux