LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernel panic: no init found (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-panic-no-init-found-78307/)

E-Rick 08-02-2003 09:32 AM

Kernel panic: no init found
 
Hi,

I have a disk with several partitions (two with Windows XP, one for data only, and one for Linux Red Hat 8). I don't want Linux to mess up my MBR, so I executed grub to install on the partition where Linux is; /dev/hda7. I get errors however when I boot to my Linux partition with grub:

the parameters I give to grub are:

root (hd0,6)
kernel /boot/vmlinuz
initrd /boot/initrd.img
boot

all this works ok, until I get the errors:

mounting root file system
EXT2-fs: unable to read superblock
mount: error 22 mounting ext2
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
kernel panic: no init found

I tried to put init=/bin/bash, init=/sbin/init, and init=bin/sh on the kernel command, without any success. I used Red Hat 2.4.18-14.

Now, when I boot from my startup floppy disk, everything works smoothly! So I presume it's not really a problem with the filesystem, but with the configuration. Does anyone have an idea?

Thanks!

E-Rick

ksgill 08-02-2003 09:37 AM

Install it on the MBR and make windows bootable. The problem here is that it cant find your init. ITs definately a problem with your bootloader. Read on:
http://www.redhat.com/docs/manuals/l...ootloader.html
http://www.denniswarner.net/lfp/configuring_grub.html

TheWalkingDead 08-02-2003 12:23 PM

well i always use lilo because it's easier. first of all, lilo will not screw up your MBR. lilo is a better bootloader than windows uses. hell NTloader doesn't even recognize linux! i would suggest putting lilo in your MBR. if you have problems, you can always fdisk mbr and lilo is gone. its that simple.
but since you used grub, lets see what we can do. i'm no expert on grub but if you look at your file, you said you installed linux on /dev/hda7 yet you are telling grub root is on /dev/hd06??? so my guess is you are getting errors because grub is looking for root on /dev/hd06 when it's really on /dev/hda7.
also, if your system boots properly from your bootdisk, take a look at the config files on the bootdisk and see where it's telling the loader to look for root.

DrOzz 08-02-2003 12:56 PM

hd0,6 is correct in grubs terms, grub starts counting at zero, so this would be correct for /dev/hda7

E-Rick 08-03-2003 04:39 PM

Hi guys, thanks a lot for your help.

Ok about hd0,6: i also wanted to mention that it is actually pointing to /dev/hda7, but that's already done.

I looked at the boot files on the floppy disk, and they point to the same partition and files as I've put in grub.

I use BootMagic of PowerQuest, and I prefer to keep this one because it's so easy to add and delete boot partitions.

I don't want to install the boot on the mbr neither.

I will have a look at the proposed manuals tomorrow. If anyone else has an idea, please do not hesitate!

E-Rick

E-Rick 08-05-2003 08:08 AM

Ok, it works now. I just stopped trying doing it manually, and created the grub.conf file, which I customized as follows:

default=0
timeout=0
splashimage=(hd0,6) /boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
root (hd0,6)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-14.img

Everything works now, and the MBR was not touched - all's done on the hda7 partition only.

E-Rick


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