I compiled and installed a custom Linux kernel using Debian kernel-package. Everything went OK: .deb files were created and custom vmlinuz and initrd.img were created in /boot and /boot/grub/menu.lst were modified automatically. But after I boot into the custom kernel, here is what happens:

After some progress, writes the following:

Begin: Waiting for root file system

and waits for a while. And then prints this:

Gave up waiting for root device. Common problems:
    - Boot args (cat /proc/cmdline)
        - Check root delay= (did the system wait long enough?)
        - Check root= (did the system wait for the right device?)
    - Missing modules (cat /proc/modules; ls /dev)

ALERT! doesn't exist. Dropping to a shell!


and jumps to shell in the RAM. When I tried mount /dev/hda6 /tmp/hda6, there really is no hda6. hda6 is the partition running my Debian and including the custom initrd.img.

Please help me guys!

  • Is it maybe because I have small space left in my partition? The free space left is about 600MB. – user18800 Nov 22 '09 at 16:01
  • when the custom kernel drops you to a shell, you need to look in /dev to find the right hard drive device. if this is a recent kernel with udev, there should be some symlinks in /dev/disk/by-UUID that will help identify the new device. – quack quixote Dec 23 '09 at 17:18

This problem happens when the root= line in your kernel boot options doesn't match the hardware.

Probably, your new kernel isn't giving your boot device the /dev/hda device node. There are a couple of possibilities.

  1. It may be that your device is now /dev/hdb or some such.

  2. It may be that your kernel is now using a newer driver for the device, and your boot device is now /dev/sda or some such. /dev/hd{a..z} devices use the older PATA driver. This became prevalent for SATA devices, but older PATA interfaces can be accessed this way as well. (Ubuntu, for example, uses this by default, except for PATA optical drives.)

The easiest way to fix it is to boot the kernel, wait for it to drop you to a shell, and check /dev/disk/by-uuid or /dev/disk/by-label to figure out the correct device. Then you can mount the device, correct the root= argument in your Grub configuration, and reboot.

Consider using a UUID or partition label in your root= argument instead of a specific device; this way kernel driver changes that rename your device won't affect boot. You can find UUIDs and labels with tune2fs -l <device>, and you can add a label with sudo tune2fs -L <label> <device>.

Here's the root= argument each way (note no quotes):

| improve this answer | |
  • I did as you said. But it couldn't help. – user18800 Nov 22 '09 at 20:00

First thing you need to check is does your kernel even recognize your hardware.

  • First, check the type of your hard drive and ensure that it is enabled in kernel configuration. This is most likely the cause of your problem.
  • I don't remember if there is a dmesg program included in Debian default initramfs, but you can check your kernel debug output typing dmesg | less. Then try to find lines that are related to your hard drive. Also, it is useful to know vendor or at least interface of the drive.
  • At last, you can remove the quiet boot option from kernel commandline if any and then simply scroll up debug output with Shift+PgUp/PgDn keys searching same info as in previous paragraph.

Also it will be probably a good idea to provide some information about hard drive in HD-related question.

| improve this answer | |

Your Answer

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