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 am using ubuntu 11.04

I have a custom 2.6.36.4 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-2.6.36.4rr 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-2.6.36.4rr

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-2.6.36.4rr I used cd /boot && sudo mkinitramfs -k -o initrd.img-2.6.36.4rr 2.6.36.4rr

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

share|improve this question
    
What happens if you remove quiet and slash from the kernel command line, and add init=/bin/sh? –  Gilles 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). –  rozcietrzewiacz Sep 20 '11 at 6:23

1 Answer 1

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.

share|improve this answer
    
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? –  rozcietrzewiacz Sep 20 '11 at 6:19

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.