LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   "Problem with booting the kernel with initrd" (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/problem-with-booting-the-kernel-with-initrd-746643/)

AjayCelst 08-11-2009 02:06 AM

"Problem with booting the kernel with initrd"
 
Hello all,

I am building a custom 2.6.18 kernel and creating initrd image using command mkinitrd.

I am creating a bootdisk out of these 2 through the command mkbootdisk and using that to boot on a different pc.But it throws out an error "Kernel Panic".

Where is the problem Kernel or initrd ??????

Simon1987 08-11-2009 02:52 AM

Hi,

Please check your menu.lst (if you have grub).
It is located in /boot/grub/.

Open it with vi and check if there is an "initrd" entry.

Code:

title openSUSE 11.1 - 2.6.27.7-9
    root (hd0,1)
    kernel /boot/vmlinuz-2.6.27.7-9-pae root=/dev/disk/by-id/ata-Hitachi_HTE543212L9A300_081101FB2B00LGCNR50A-part2 resume=/dev/disk/by-id/ata-Hitachi_HTE543212L9A300_081101FB2B00LGCNR50A-part1 splash=silent showopts
    initrd /boot/initrd-2.6.27.7-9-pae #Here you have initrd

Hope it helps...

byee

konsolebox 08-11-2009 02:59 AM

Also make sure that you are providing the proper argument to root= and that the root device is properly set in /etc/fstab.

AjayCelst 08-11-2009 03:30 AM

I have done that and still it doesnt work .
Can you give a snapshot of ur /etc/fstab

Thanks

AjayCelst 08-11-2009 03:32 AM

Hi Simon,

The entry for initrd is present in /boot/grub/menu.lst
Any other solutions

konsolebox 08-11-2009 03:40 AM

Sorry I can't do that yet for some reasons and I hope somebody else will do that for you instead.

But anyway I just recognized that you already have a working system (sorry 'bout that) and you're just trying to boot a newly built kernel right?; so your /etc/fstab is probably ok. You can know the proper root device that your should pass as an argument to 'root=' by doing 'cat /etc/mtab' or 'cat /proc/partitions' or just running 'mount' to have a list.

AjayCelst 08-11-2009 03:59 AM

No friend,the kernel i build boots up on a working system.
What i am trying is to boot a bare PC(without OS) with a bootdisk created out of my kernel and initrd images.

I am getting error of this kind.

***********************************************************
Red Hat nash version 3.5.14 starting
Mounting /proc filesystem
Creating block devices
Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
pivotroot: pivot_root(/sysroot, /sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
Freeing unused kernel memory: 224k freed
Kernel panic: No init found. Try passing init= option to kernel.

*********************************************************

Do you know why ?

Thanks,
AJ

AjayCelst 08-11-2009 04:06 AM

It would be very helpful if you can provide me a link which explains how to build and boot up a customised kernel

Thanks,
AJ

catkin 08-11-2009 04:44 AM

Maybe the problem is caused by your "working system" and "bare PC" having different hardware and your kernel and/or initrd having hardware-secific stuff in them. How similar/different are the computers?

AjayCelst 08-11-2009 06:13 AM

Both are same

catkin 08-11-2009 06:29 AM

Quote:

Mounting root filesystem
mount: error 6 mounting ext3
I think that means your kernel and/or initrd are looking for a root file system on the "bare PC" in the same place (/dev/sda or some such) as on your "working system" -- and not finding it.

konsolebox 08-13-2009 02:25 AM

Sorry for being offline 3 days.
Quote:

Originally Posted by AjayCelst (Post 3638909)
N
Red Hat nash version 3.5.14 starting
Mounting /proc filesystem
Creating block devices
Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
pivotroot: pivot_root(/sysroot, /sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
Freeing unused kernel memory: 224k freed
Kernel panic: No init found. Try passing init= option to kernel.

If only we can tell what's causing that error. Is the kernel built with support for ext3? Also there's probably a bad parameter for the initrd. For example, in gentoo, real_root needs to have the final root that will be mounted after booting on a temporary ramdisk.


All times are GMT -5. The time now is 04:44 PM.