0

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 ...

  • 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 'SO- stop being evil' 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) – daisy Oct 8 '13 at 8:22
2

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.

| 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. – a CVn 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
0

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.

| improve this answer | |
0

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)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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