LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-08-2003, 06:28 AM   #1
fbl
LQ Newbie
 
Registered: Jan 2003
Posts: 2

Rep: Reputation: 0
Unhappy Compiled own kernel and got: Kernel panic: No init found. Try passing init= option to


Dear,

I have installed Red Hat 8.0 , but I needed to build a vanilla kernel because of my network card. It does not seems to work under the RH kernel.

So I downloaded the 2.4.20 sources, roled up my sleeves, and got started. I have to say that I am very new to Linux, so I think everything went OK during the building process, but I can't be very sure of that.

For installing the kernel on the boot partition, I used make install. That did not seem to work with "root=LABEL=/", so I changed that to the boot partition.

That got me to where I am now: stuck on "Kernel panic: No init found. Try passing init=option to kernel".

I found a lot of other postings concerning the "No init found message", but I was not able to get a clear idea of what I should do out of those.

Any help would be greatly appreciated,
Frankie

-> my grub.conf looks like this:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,5)
# kernel /vmlinuz-version ro root=/dev/hda8
# initrd /initrd-version.img
#boot=/dev/hda6
default=1
timeout=10
splashimage=(hd0,5)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20)
root (hd0,5)
kernel /vmlinuz-2.4.20 ro root=/dev/hda6
initrd /initrd-2.4.20.img
title Red Hat Linux (2.4.18-14)
root (hd0,5)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /initrd-2.4.18-14.img
title Windows
rootnoverify (hd0,0)
chainloader +1

-> the df command shows me this:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda8 6905416 5576584 978052 86% /
/dev/hda6 80486 11891 64439 16% /boot
none 256900 0 256900 0% /dev/shm
/dev/hda2 3666980 3641476 25504 100% /mnt/d
/dev/hda5 2784152 2691292 92860 97% /mnt/e

-> my boot partition looks like this:

total 7553
drwxr-xr-x 4 root root 1024 Jan 7 16:20 .
drwxr-xr-x 21 root root 4096 Jan 8 11:07 ..
-rw-r--r-- 1 root root 5824 Sep 5 22:53 boot.b
-rw-r--r-- 1 root root 612 Sep 5 22:53 chain.b
-rw-r--r-- 1 root root 42150 Sep 4 19:47 config-2.4.18-14
drwxr-xr-x 2 root root 1024 Jan 7 16:17 grub
-rw-r--r-- 1 root root 130000 Nov 17 17:05 initrd-2.4.18-14.img
-rw-r--r-- 1 root root 66266 Jan 7 16:17 initrd-2.4.20.img
-rw-r--r-- 1 root root 473 Nov 17 17:05 kernel.h
-rw-r--r-- 1 root root 992256 Jan 7 15:56 linux-2.4.20
drwx------ 2 root root 12288 Nov 17 16:59 lost+found
-rw-r--r-- 1 root root 23108 Sep 6 16:05 message
-rw-r--r-- 1 root root 21282 Sep 6 16:05 message.ja
lrwxrwxrwx 1 root root 21 Nov 17 17:05 module-info -> module-info-2.4.18-14
-rw-r--r-- 1 root root 15436 Sep 4 19:47 module-info-2.4.18-14
-rw-r--r-- 1 root root 640 Sep 5 22:53 os2_d.b
lrwxrwxrwx 1 root root 20 Jan 7 16:20 System.map -> System.map-2.4.18-14
-rw-r--r-- 1 root root 507814 Sep 4 19:47 System.map-2.4.18-14
-rw-r--r-- 1 root root 507356 Jan 7 16:17 System.map-2.4.20
-rwxr-xr-x 1 root root 3236438 Sep 4 19:47 vmlinux-2.4.18-14
lrwxrwxrwx 1 root root 14 Jan 7 16:17 vmlinuz -> vmlinuz-2.4.20
-rw-r--r-- 1 root root 1125194 Sep 4 19:47 vmlinuz-2.4.18-14
-rwxr-xr-x 1 root root 992256 Jan 7 16:17 vmlinuz-2.4.20
 
Old 01-08-2003, 07:50 AM   #2
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Re: Compiled own kernel and got: Kernel panic: No init found. Try passing init= option to

Quote:

kernel /vmlinuz-2.4.20 ro root=/dev/hda6
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/
Shouldn't the new kernel have the same "ro root=LABEL=/"?

And just for grins, what does your /boot/grub/menu.lst show?


John
 
Old 01-08-2003, 08:51 AM   #3
fbl
LQ Newbie
 
Registered: Jan 2003
Posts: 2

Original Poster
Rep: Reputation: 0
Chaging to root=LABEL=/" results in another Kernel panic;

VFS: Cannot open root device "LABEL=/" or 00:00
Please append a correct "root:" boot option
Kernel panic: VFS: Unable to mount root fs on 00:00

But it was indeed the grub.conf that was the problem, it had to be root=/dev/hda8

I got that from somebody in Linuxnewbie, but thanks for your post.

Of course my network card still doesn't work, ..., and although it's hard to believe; I still love learning Linux, "when men where men, and 'compiled' their own device drivers" !
 
Old 01-09-2003, 11:00 AM   #4
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Quote:
Originally posted by fbl
Chaging to root=LABEL=/" results in another Kernel panic;

VFS: Cannot open root device "LABEL=/" or 00:00
Please append a correct "root:" boot option
Kernel panic: VFS: Unable to mount root fs on 00:00

But it was indeed the grub.conf that was the problem, it had to be root=/dev/hda8

I got that from somebody in Linuxnewbie, but thanks for your post.
Excellent! I'm impressed

But when did hda8 come into the picture?


Quote:
Of course my network card still doesn't work, ..., and although it's hard to believe; I still love learning Linux, "when men where men, and 'compiled' their own device drivers" !
Not this one, I'll wait for the next release


John
 
Old 01-09-2003, 05:40 PM   #5
charlie123
Member
 
Registered: Jan 2003
Location: S.E. England
Distribution: Redhat 8.0
Posts: 64

Rep: Reputation: 15
Hi, i have recieved a similar message. I have XP home and RH8.0 on a partition and i am using lilo to boot. After a while booting into linux i get:

***********
Mounting root filesystem
mount: error 6 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
Freeing ununsed kernel memory: 212k freed
Kernel panic: No init found. Try passing init= option to kernel.
***********

i can boot ok with a boot disk, but i dont know what to do to fix this. My lilo.conf file is:

************************
prompt
timeout=50
default=Windows
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.18-14
label=Linux
initrd=/boot/initrd-2.4.18-14.img
read-only
append="hdd=ide-scsi root=LABEL=/"

other=/dev/hda1
optional
label=Windows
table=/dev/hda

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

any help fixing this will be greatly appreciated,

many thanks,

Charlie
 
Old 01-10-2003, 06:26 AM   #6
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Quote:
Originally posted by charlie123
Hi, i have recieved a similar message. I have XP home and RH8.0 on a partition and i am using lilo to boot. After a while booting into linux i get:

***********
Mounting root filesystem
mount: error 6 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
Freeing ununsed kernel memory: 212k freed
Kernel panic: No init found. Try passing init= option to kernel.
***********

i can boot ok with a boot disk, but i dont know what to do to fix this. My lilo.conf file is:

************************
prompt
timeout=50
default=Windows
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
lba32

image=/boot/vmlinuz-2.4.18-14
label=Linux
initrd=/boot/initrd-2.4.18-14.img
read-only
append="hdd=ide-scsi root=LABEL=/"

other=/dev/hda1
optional
label=Windows
table=/dev/hda

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

any help fixing this will be greatly appreciated,

many thanks,

Charlie
After looking about, it would appear that your disk is no longer labeled (whatever that means, SuSE doesn't do this).

http://www.redhat.com/mailing-lists/.../msg09960.html

Boot up and run "e2label /dev/hda?" with "?" replaced by the actual partition number.

Use the link as a guide and label your partitions accordingly. Then re-run "/sbin/lilo" as root.

Let me know if this works (and post your /etc/fstab while you are at it).


John
 
Old 01-10-2003, 07:32 AM   #7
charlie123
Member
 
Registered: Jan 2003
Location: S.E. England
Distribution: Redhat 8.0
Posts: 64

Rep: Reputation: 15
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda5 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0


*********

thats my /etc/fstab. if you gimme a min i will try the other thing. thanks for helping btw .....
 
Old 01-10-2003, 07:44 AM   #8
charlie123
Member
 
Registered: Jan 2003
Location: S.E. England
Distribution: Redhat 8.0
Posts: 64

Rep: Reputation: 15
ok my hard disk has windows xp on hda1, and e2label said the following:

# e2label /dev/hda2
/boot
# e2label /dev/hda3
/

so it appears to be ok?
 
Old 01-10-2003, 10:18 AM   #9
charlie123
Member
 
Registered: Jan 2003
Location: S.E. England
Distribution: Redhat 8.0
Posts: 64

Rep: Reputation: 15
hey i fixed it, i read somewhere to add 'noathlon' to my lilo.conf and it worked. cheers for help though
 
Old 01-10-2003, 02:04 PM   #10
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Quote:
Originally posted by charlie123
hey i fixed it, i read somewhere to add 'noathlon' to my lilo.conf and it worked. cheers for help though
"noathlon"?

Good grief!

Good to hear that it's working, BTW, did you have to re-run lilo?


John
 
Old 01-10-2003, 02:33 PM   #11
charlie123
Member
 
Registered: Jan 2003
Location: S.E. England
Distribution: Redhat 8.0
Posts: 64

Rep: Reputation: 15
i dont know if i had to, but i did just in case, then rebooted and all was fine. still not sure why i had to add noathlon tho, lol.
 
Old 01-12-2003, 07:26 AM   #12
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
I found a bit of info on "noathlon" problem:
http://www.redhat.com/support/resources/gotchas/7.2/


John
 
Old 01-14-2003, 03:38 AM   #13
d_daywalker
LQ Newbie
 
Registered: Jan 2003
Location: Philippines
Distribution: Red Hat
Posts: 6

Rep: Reputation: 0
I believe that the error:

Mounting root filesystem
mount: error 6 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/proc failed: 2
Freeing ununsed kernel memory: 212k freed
Kernel panic: No init found. Try passing init= option to kernel.

has something to do with your root partition not being mapped properly in your lilo bootloader's config file.

Boot your system to linux using the bootdisk, login as root and verify check the mounted filesystems in your machine by executing this command:

df

Check the device that is pointing to the / partition.

After that, edit your lilo bootloaders config file (lilo.conf) using your favorite text editor and change the entry fo this line:

append="hdd=ide-scsi root=LABEL=/"

to this

append="hdd=ide-scsi root=<device>

e.g.

append="hdd=ide-scsi root=/dev/hda3

Save the file and reinstall the LILO Bootloader by executing this command:

lilo -v -v

I hope these help....
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel panic: no init found. Try passing init= option to kernel. ericb Slackware - Installation 3 10-20-2005 11:03 AM
Kernel panic: no init found. Try passing init= option to kernel tulip4heaven Linux - Newbie 1 10-14-2005 01:33 AM
Kernel Panic: No init found. Try passing init=option to Kernel ridak Fedora 5 09-08-2004 01:25 AM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:37 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