Kernel panic

Stuart Sears stuart at sjsears.com
Mon Jun 21 15:19:43 UTC 2004


On Mon, 2004-06-21 at 13:02, spchen at juno.com wrote:
> Hi Manuel,
> 
> >I know that this is a obviously question but...are you
> >sure that your linux is on /dev/hda2 and you have got
> >your filesystem supported on Kernel?>
> >
> >Best regards.
> 
> Thanks for your response. I am sure my linux is on /dev/hda2 
> and my filesystem is supported on Kernel. Thanks.
right, this has not been explained to you correctly! (sorry guys)
the init=... bit tells your kernel where to find /sbin/init.

<man bootparam excerpt>

GENERAL NON-DEVICE SPECIFIC BOOT ARGS
   ‘init=...
This sets the initial command to be executed by the kernel.  If this is
not set, or cannot be  found,  the  kernel  will  try  /etc/init,  then
/bin/init,  then  /sbin/init,  then  /bin/sh  and  panic if all of this
fails.

</man bootparam excerpt>

the most common use is to make the kernel run a shell (e.g.
init=/bin/tcsh) instead of the 'init' process.

the message
kernel panic, no init found
usually means that the kernel is looking in the wrong place for
/sbin/init, usually on the wrong root filesystem, which is an argument
you may need to alter in your bootloader configs.

in grub, the kernel line needs to be changed to read (roughly)
</boot/grub/grub.conf>
kernel /vmlinuz-2.4.21-4.EL ro root=/dev/hda2

(this of course is dependent on your kernel version)

a common problem here is the use of filesystem labels instead of
specifying the root fs device specifically
[although I don't know if fslabels worked on RH7]

if you use lilo the settings will be different.

the relevant section in /etc/lilo.conf should contain something like:

image=/boot/vmlinuz...
label=<whatever>
root=/dev/hda2
read-only

do not forget to run /sbin/lilo -v after editing lilo.conf.

HTH

Stuart

--
Stuart Sears RHCE, RHCX






More information about the redhat-list mailing list