I am using ubuntu 11.04

I have a custom kernel source (say in linux_src)

Did make mrproper Copied my current configuration from /boot to linux_src/.config Did a make menuconfig, instructed it to load the configuration file .config. In general setup, I added the string rr to the kernel version number. Exited the configuration.

Did a make && make modules_install && make install as superuser. This created the vmlinuz- image in /boot; the corresponding directory in /lib/modules. System.map in /boot, but not initrd image

So I ran the following command :

cd /boot && sudo mkinitramfs -k -o initrd.img-

Finally I ran sudo update-grub. Grub found my new linux image and the new initrd image.

On booting, the newly installed kernel was listed in my boot options. I selected it, and then the screen went blank (but not black, it just showed some default ubuntu theme colored blank screen) and stuck there.

I suspect the makeinitramfs process was the culprit.

On the other hand when I had installed the same kernel using make-kpkg and dpkg I had to do no other thing, (not even initramfs) and the kernel had booted perfectly (I don't want to use this method to install kernel).

Please help.

EDIT : I made some progress

Instead of using :

cd /boot && sudo mkinitramfs -k -o initrd.img- I used cd /boot && sudo mkinitramfs -k -o initrd.img-

which i believe is the correct way to use mkinitramfs.

However, now my boot process ends at "gave up waiting for the root device" and an initramfs prompt

  • What happens if you remove quiet and slash from the kernel command line, and add init=/bin/sh? Sep 19 '11 at 23:05
  • @Giles do I need to configure 1) /etc/default/grub; or 2) /boot/grub/grub.cfg to make the above changes ?
    – AnkurVj
    Sep 20 '11 at 2:37
  • 1
    @AnkurVj You don't need to permanently edit grub menu file (which is No 2 from your question). You can modify the kernel command line by pressing c while in grub boot menu (when booting). Sep 20 '11 at 6:23

Reading your description, I see you did not do one important thing in the configuration phase: make oldconfig after copying the .config file, but before doing make menuconfig (BTW, if the configuration is saved in .config file in the sources directory, you don;t need to explicitly load it - that is done by default). This is needed in all cases when the new kernel version is at least a bit different then the one where .config came from.

I'm not sure about your initramfs creation method - the only one I've ever used was with genkernel. But to determine if the initramfs is the culprit, you can just modify grub entry to point to the old initramfs file (the one used by your current system). Also, When the system is booting, you can often press F1 to see the boot messages (might need to remove quiet from bootloader menu entry first).

Edit: Just a thought: there could be a problem with your grub menu entry (found in /boot/grub/grub.cfg or /boot/grub/grub.conf) - compare the old and new one, maybe the kernel parameters are wrong (like wrong real_root). Simply speaking, the lines after kernel should be the same apart from the kernel location and initrd.

  • I have edit my question. Please have a look
    – AnkurVj
    Sep 20 '11 at 2:36
  • Yes, I see... But did you try any of the things suggested in my answer? Sep 20 '11 at 6:19

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.