Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've been trying to build a new kernel for Red Hat Enterprise Linux virtual installs under VM Ware. I've followed these steps so far:

  1. Download the kernel from kernel.org.
  2. Extract the downloaded file.
  3. make menuconfig
  4. make -j8
  5. make modules
  6. make -j8 modules_install install

And everything seems to work ok, however, when I reboot and access to the kernel version built, I get a kernel panic screen, and pressing F1 I get messages like:

Could not load /lib/modules/3.10.14/modules.dep No such file ...

share|improve this question
    
Does the root filesystem get mounted, or is that the cause for the panic? If the root filesystem isn't mounted, it's usually because you compiled something as a module but it was required to mount the root filesystem. –  Gilles Oct 3 '13 at 23:07
    
Why don't you use the standard rpmbuild system to build a RPM package (which would do everything for you) –  warl0ck Oct 8 '13 at 8:22
add comment

3 Answers

You also need to run depmod -a $NEWKERNELVERSION after installing the kernel and modules. This is indicated by the kernel complaining about no modules.dep file.

Once you run depmod -a and reboot, assuming the kernel itself has everything needed, it should work (although it's been a while since I actually manually built and installed a custom kernel image).

See for example Why is depmod necessary for building and working with kernel modules? on Stack Overflow and the Debian Wiki 'depmod' page.

share|improve this answer
    
So, I should access through the older kernel version which is actually working and run depmod -a 3.10.14 there or should I repeat the whole steps again including this last one? –  diegoaguilar Oct 3 '13 at 13:28
1  
@Diego Just booting into the old kernel and running depmod -a 3.10.14 as root should work. –  Michael Kjörling Oct 3 '13 at 13:43
    
I just tried and didn't work. Are there any comments about method I mentioned for building the kernel? I –  diegoaguilar Oct 3 '13 at 14:57
add comment

May be your root file system is not mounted. There are two solutions:

Regular one: Make and install an init ramfs image.

Simple one: Choose Y (not M) for your SCSI Host / SCSI device / Root file system drivers at the stage make menuconfig. In other words: Let your kernel mount your rootfs independently.

share|improve this answer
add comment

Missing module dependency file shouldn't matter at all.

Did you build an initrd image after the installation? If certain modules are required but not statically built into the kernel, you would need an initrd image, e.g file system modules

If this is not the case, try boot without the quiet parameter, and see what kernel says.

P.S where does your kernel configuration come from? Did you start modification from the old config file (just ensure all needed modules are present)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.