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 trying to compile Linux kernel 3.2.36 with its source code on the x86_64 architecture. I followed the following set of commands under my Linux source distribution directory:

make defconfig  
make -j8
make install
make modules_install
update-initramfs -c -k 3.2.36 
update-grub

I have updated my grub.cfg file to load another Linux pointing to the new initrd3.2.36.img file.

Now when I restart my machine, I went to boot options and loaded the compiled kernel 3.2.36. It boots successfully and stops and a prompt with,

<initramfs>

Few lines above that I am getting following messages,

mount: mounting udev on /dev failed: No such device
w: devtmpfs not available falling back to tmpfs for /dev
BusyBox v 1.185

I just entered ls, I am able to find very limited set of commands.

I am not able to find useful help from Google.

My grub.cfg content

export linux_gfx_mode
if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.2.36' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 40ac3762-2ffb-4aec-9e5d-f782f2b50b7e
        linux   /boot/vmlinuz-3.2.36 root=UUID=40ac3762-2ffb-4aec-9e5d-f782f2b50b7e ro   quiet splash $vt_handoff
        initrd  /boot/initrd.img-3.2.36
}
menuentry 'Ubuntu, with Linux 3.2.36 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 40ac3762-2ffb-4aec-9e5d-f782f2b50b7e
        echo    'Loading Linux 3.2.36 ...'
        linux   /boot/vmlinuz-3.2.36 root=UUID=40ac3762-2ffb-4aec-9e5d-f782f2b50b7e ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.2.36
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 3.2.0-35-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 40ac3762-2ffb-4aec-9e5d-f782f2b50b7e
        linux   /boot/vmlinuz-3.2.0-35-generic root=UUID=40ac3762-2ffb-4aec-9e5d-f782f2b50b7e ro   quiet splash $vt_handoff
        initrd  /boot/initrd.img-3.2.0-35-generic
}
menuentry 'Ubuntu, with Linux 3.2.0-35-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos1)'
        search --no-floppy --fs-uuid --set=root 40ac3762-2ffb-4aec-9e5d-f782f2b50b7e
        echo    'Loading Linux 3.2.0-35-generic ...'
        linux   /boot/vmlinuz-3.2.0-35-generic root=UUID=40ac3762-2ffb-4aec-9e5d-f782f2b50b7e ro recovery nomodeset 
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initrd.img-3.2.0-35-generic
}
}

Can someone help me on how to obtain a Linux shell and add user authentication to my compiled Kernel?

I am ready to read any materials or books even, please suggest me.

share|improve this question
    
It seems that /dev does not exist in initram image or root partition. Is update-initramfs -c -v -k 3.2.36 provide more information? Does boot option in grub.cfg contain initrd string. –  dchirikov Jan 13 '13 at 13:51
    
I have tried with update-initramfs -c -v -k3.2.36 . It didnt work. I have edited the post with grub.cfg content. It has initrd string. Not sure where the actual mistake is. :( –  Rengasami Ramanujam Jan 13 '13 at 16:05
    
I just noticed that when I gave update-initramfs it is not listing /dev directory in it. How to fix this? –  Rengasami Ramanujam Jan 13 '13 at 16:30
2  
You're getting the initramfs prompt because your kernel doesn't have a necessary driver for your root filesystem, or (less likely, since you used the standard tool) your initramfs isn't able to find it. The interesting lines are the ones before the initramfs prompt. What kind of disk is your root filesystem on (disk driver, filesystem, RAID, LVM, …)? Post your .config (did you reuse the one from a working kernel?). Also, maybe your initramfs assumes that devtmpfs is present, add it to your kernel (CONFIG_DEVTMPFS=y). –  Gilles Jan 13 '13 at 22:26
1  
I didnt try to reuse. Now I tried, it worked, I just gave make localmodconfig and it worked. I checked the .config file for previous version, it didnt have CONFIG_DEVTMPS=y. It worked. Thanks guys. –  Rengasami Ramanujam Jan 14 '13 at 9:58

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.