LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 08-11-2009, 02:06 AM   #1
AjayCelst
LQ Newbie
 
Registered: Jul 2009
Location: Bangalore, INDIA
Distribution: Centos 5.2
Posts: 20

Rep: Reputation: 0
Post "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 ??????
 
Old 08-11-2009, 02:52 AM   #2
Simon1987
LQ Newbie
 
Registered: Aug 2009
Posts: 8

Rep: Reputation: 0
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
 
Old 08-11-2009, 02:59 AM   #3
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
Also make sure that you are providing the proper argument to root= and that the root device is properly set in /etc/fstab.
 
Old 08-11-2009, 03:30 AM   #4
AjayCelst
LQ Newbie
 
Registered: Jul 2009
Location: Bangalore, INDIA
Distribution: Centos 5.2
Posts: 20

Original Poster
Rep: Reputation: 0
I have done that and still it doesnt work .
Can you give a snapshot of ur /etc/fstab

Thanks
 
Old 08-11-2009, 03:32 AM   #5
AjayCelst
LQ Newbie
 
Registered: Jul 2009
Location: Bangalore, INDIA
Distribution: Centos 5.2
Posts: 20

Original Poster
Rep: Reputation: 0
Hi Simon,

The entry for initrd is present in /boot/grub/menu.lst
Any other solutions
 
Old 08-11-2009, 03:40 AM   #6
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
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.
 
Old 08-11-2009, 03:59 AM   #7
AjayCelst
LQ Newbie
 
Registered: Jul 2009
Location: Bangalore, INDIA
Distribution: Centos 5.2
Posts: 20

Original Poster
Rep: Reputation: 0
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
 
Old 08-11-2009, 04:06 AM   #8
AjayCelst
LQ Newbie
 
Registered: Jul 2009
Location: Bangalore, INDIA
Distribution: Centos 5.2
Posts: 20

Original Poster
Rep: Reputation: 0
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
 
Old 08-11-2009, 04:44 AM   #9
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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?
 
Old 08-11-2009, 06:13 AM   #10
AjayCelst
LQ Newbie
 
Registered: Jul 2009
Location: Bangalore, INDIA
Distribution: Centos 5.2
Posts: 20

Original Poster
Rep: Reputation: 0
Both are same
 
Old 08-11-2009, 06:29 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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.
 
Old 08-13-2009, 02:25 AM   #12
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
Sorry for being offline 3 days.
Quote:
Originally Posted by AjayCelst View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Alert! /dev/sda1 does not exist" when booting a new kernel accordionforever Linux - Kernel 11 12-16-2008 07:37 AM
problems put linux on pc, "booting the kernel" hangs chuckd2 Linux - Newbie 7 08-17-2007 04:22 PM
"booting kernel" then nothing. Sort of works after rebooting from Windows gosport1 Ubuntu 11 12-02-2006 10:38 AM
Kernel Panic - Missing "initrd.img-2.6.8-2-686" in /boot MKSrivastava Debian 2 12-02-2005 03:09 PM
Struck at "Configuring Kernel Parameters " in Fedora core 3 booting infantpapa Linux - Software 12 06-03-2005 05:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 11:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration