LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   kernel panic while booting my own built kernel in fedora13 using grub (http://www.linuxquestions.org/questions/linux-newbie-8/kernel-panic-while-booting-my-own-built-kernel-in-fedora13-using-grub-866610/)

RajuLinux 03-05-2011 11:24 AM

kernel panic while booting my own built kernel in fedora13 using grub
 
Hi,
I am new to linux kernel development and this is my first post.
I have a laptop with Intel core i3 processor. I made a dual boot with windows 7 and Fedora 13.I am attempting to build my own kernel and boot with my laptop with it.
I have downloaded kernel 2.6.34.8 from kernel.org. followed the following steps to boot with my new kernel.

make defconfig
make -j8
make modules_install

copied the file arch/x86/boot/bzImage to /boot directory and renamed it to vmlinuz-2.6.34.8
I have added an entry for my new kernel in grub.conf file and modified as follows.

working grub configuration:

title Fedora (2.6.34.7-66.fc13.i686.PAE)
root (hd0,5)
kernel /vmlinuz-2.6.34.7-66.fc13.i686.PAE ro root=/dev/mapper/vg_rajuslinux-lv_root rd_LVM_LV=vg_rajuslinux/lv_root rd_LVM_LV=vg_rajuslinux/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.34.7-66.fc13.i686.PAE.img

I have made a copy of the above line and modified as shown below -- reading some posts in web

title Fedora (2.6.34.8)
root (hd0,5)
kernel /vmlinuz-2.6.34.8 ro root=/dev/mapper/vg_rajuslinux-lv_root rd_LVM_LV=vg_rajuslinux/lv_root rd_LVM_LV=vg_rajuslinux/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet

deleted the line initrd, as I read initrd is not required for my new kernel.

I am facing the following error
Root-NFS: No NFS server available, giving up.
VFS:unable to mount root fs via NFS, trying floppy.
Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(2,0)

then i tried with following grub.conf
title Fedora (2.6.34.8)
root (hd0,5)
kernel /vmlinuz-2.6.34.8 ro root=/dev/mapper/vg_rajuslinux-lv_root

There were few messages which scrolled through the screen. I dont know how to capture them !
At the end i see the following error:
Please append a correct "root=" boot option;here are available partitions
800 sda
801 sda1
802 sda2
803 sda3
804 sda4
805 sda5
806 sda6
807 sda7
Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block(2,0)

df -k command gives the following output:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg_rajuslinux-lv_root
51606140 4189948 44794752 9% /
tmpfs 1957544 420 1957124 1% /dev/shm
/dev/sda6 495844 59835 410409 13% /boot
/dev/mapper/vg_rajuslinux-lv_home
71796064 1035648 67113340 2% /home

hdparm -I /dev/sda gives the following output
hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
Model Number: WDC WD5000BEVT-75A0RT0
Serial Number: WD-WX91C8000774
Firmware Revision: 01.01A01
Transport: Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
Supported: 8 7 6 5
Likely used: 8


Anybody please help me solving this problem.
thanks in advance

Raju

alan99 03-05-2011 11:42 AM

I have never used lvm, but I would say that it was a big mistake not using a initrd as this probably contains the modules and scripts to set up the logical volumes before you can mount your root file system.

RajuLinux 03-05-2011 09:57 PM

Hi Alan,
Thanks for the reply.
I have added initrd to my configuration. Now my configuration looks
title Fedora (2.6.34.8)
root (hd0,5)
kernel /vmlinuz-2.6.34.8 ro root=/dev/mapper/vg_rajuslinux-lv_root
initrd /initramfs-2.6.34.8.img

now, i see some green ok while booting the system.
But, it doesnt boot up completely. gives the following error.
/usr/sbin/ksmtuned line 61: /sys/kernel/mm/ksm/run no such file or directory. I found the file at the specified location.

One more question, how to capture all the bootup log ?

regards,
Raju


All times are GMT -5. The time now is 10:31 AM.