LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-16-2002, 02:44 AM   #1
aditya
Member
 
Registered: Aug 2002
Distribution: RH 7.x
Posts: 71

Rep: Reputation: 15
Arrow Kernel Panic: No init found. ...


Hi,

I've made a boot disk with the kernel in one floppy and root fs in the other. The kernel boots and asks for thr Root filesystem.
On iserting the root fs floppy, I get the message:

RAMDISK: Compressed image found a block 0

For about 30-35 seconds it continues to read the floppy. Then it flashes the message:

Kernel Panic: No init found. Try passing init= option to kernel.

Then my keyboard also stops responding except for the Num lock and Caps Lock keys.

Is it something wong with the libraries.

My 'ldd init' gives
libc.so.6 => /lib/i686/libc.so.6
ld-linux.so.2 => /lib/ld-linux.so.2

So, I've copied my loader to /lib, but the library and its link to /lib/i686 directory. It's too big to be copied twice. So, I didn't copy it in /lib. I also made a soft link from /lib/lic.so.6 to the library in /lib/i686 in the hope of rectifying the error. But it didn't help. I'm using RH 7.3.

Any ideas?
 
Old 09-16-2002, 06:34 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
what's in /etc/inittab

you need to strip the libs so they will fit

you need to have an ld.so.conf file in /etc and run ldconfig to create the cache file
 
Old 09-16-2002, 11:32 PM   #3
aditya
Member
 
Registered: Aug 2002
Distribution: RH 7.x
Posts: 71

Original Poster
Rep: Reputation: 15
My inittab file is:


id:2:initdefault:

# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
l3:3:wait:/etc/rc.d/rc 3
l4:4:wait:/etc/rc.d/rc 4
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6

# Things to run in every runlevel.
ud:nce:/sbin/update

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty 9600 tty1
2:2345:respawn:/sbin/mingetty 9600 tty2
3:2345:respawn:/sbin/mingetty 9600 tty3
4:2345:respawn:/sbin/mingetty 9600 tty4
5:2345:respawn:/sbin/mingetty 9600 tty5
6:2345:respawn:/sbin/mingetty 9600 tty6



Though I haven't seen the update file included anywhere else, when I did 'man update', it said that this is the file that is executed every time by the system irrespective of the runlevel. So, I didn't delete it from inittab.


I had done objcopy --strip-debug for all the libraries, and --strip-all for all the binaries.

I had also done ldconfig. I think it shoukd be some error concerned with /etc/rc.d directory files. I might have not deleted the paths of some files properly, or something like that, because I don't know how to trim those files, all the rc.sysinit, rc, and all other files.

I have included the libraries I think.
 
Old 09-16-2002, 11:37 PM   #4
aditya
Member
 
Registered: Aug 2002
Distribution: RH 7.x
Posts: 71

Original Poster
Rep: Reputation: 15
I don't know how that happened.

It has substituted a string of a ':' and an 'o' by some smiley.

And i'm not writing the exact line again otherwise it will again substite it with the smiley.

Just replace the smiley with one clolon, and one o. So, the string becomes:
ud (then 2 colons) (then the word 'once) (then a colon) (then/sbin/update)
 
Old 09-17-2002, 03:40 AM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you don't need all that for a root floppy

I would trim it way down

# /etc/inittab Davix Root Boot
id:3:initdefault:
si::sysinit:/etc/rc.d/rc.sysinit
1:2345:respawn:/bin/agetty tty1 9600
2:2345:respawn:/bin/agetty tty2 9600
3:2345:respawn:/bin/agetty tty3 9600
4:2345:respawn:/bin/agetty tty4 9600
5:2345:respawn:/bin/agetty tty5 9600
6:2345:respawn:/bin/agetty tty6 9600

Last edited by DavidPhillips; 09-17-2002 at 03:46 AM.
 
Old 09-17-2002, 03:48 AM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
[root@Firedragon root]# cat etc/rc.d/rc.sysinit
#!/bin/sh
# /etc/rc.d/rc.sysinit Davix Root Boot
/bin/syslogd
/bin/klogd
/bin/mount -av
/bin/hostname Davix
/etc/rc.d/rc.local
 
Old 09-17-2002, 03:51 AM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
[root@Firedragon etc]# cat fstab
# /etc/fstab Davix Root Boot
#filesystem mount-point fs-type options dump fsck-order
/dev/ram0 / ext2 defaults 0 0
/proc /proc proc defaults 0 0
 
Old 09-18-2002, 01:04 AM   #8
aditya
Member
 
Registered: Aug 2002
Distribution: RH 7.x
Posts: 71

Original Poster
Rep: Reputation: 15
No change in the result.

What files do I have to add in support of the /sbin/syslogd and /sbin/klogd? (On my system, it's /sbin and not /bin for these 2 files).
Don't we need the script of rc.sysinit?

What files do you have in /etc/rc.d/init.d? I've deleted almost all. It has all have script files, and they were either manipulating or using some files of /etc that I hadn't added, so I deleted those script files from init.d.

I've also made changes to my lilo.conf stored on the hard disk so that I can test my kernel and FS from there also.

When I boot from floppy, after giving kernel panic it doesn't respond to my alr+ctrl+del. But when I boot the same kernel and fs from the hard disk, it does give the same kernel panic, but when I press alt+ctrl+del it gives the message:
<6>keyboard: unknown scancode e0 7a

It's all boggled up. The main problem is either with /etc or /lib.
What to do?
 
Old 09-18-2002, 01:06 AM   #9
exigent
Member
 
Registered: Aug 2002
Distribution: damnsmalllinux
Posts: 205

Rep: Reputation: 30
Re: Kernel Panic: No init found. ...

Quote:
Originally posted by aditya
Hi,

I've made a boot disk with the kernel in one floppy and root fs in the other. The kernel boots and asks for thr Root filesystem.
On iserting the root fs floppy, I get the message:

RAMDISK: Compressed image found a block 0

For about 30-35 seconds it continues to read the floppy. Then it flashes the message:

Kernel Panic: No init found. Try passing init= option to kernel.

Then my keyboard also stops responding except for the Num lock and Caps Lock keys.

Is it something wong with the libraries.

My 'ldd init' gives
libc.so.6 => /lib/i686/libc.so.6
ld-linux.so.2 => /lib/ld-linux.so.2

So, I've copied my loader to /lib, but the library and its link to /lib/i686 directory. It's too big to be copied twice. So, I didn't copy it in /lib. I also made a soft link from /lib/lic.so.6 to the library in /lib/i686 in the hope of rectifying the error. But it didn't help. I'm using RH 7.3.

Any ideas?


call me a simpilton (no, don't really), but it sounds like you didn't actually write the image to the floppy, but just copied the image straight to the disk.
 
Old 09-18-2002, 02:14 AM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
I posted my rc.sysinit above

you don't need the logging daemons if you don't want them

All you should need is /etc/inittab

which points to the init script which mounts proc and the rootfs

this tells you everything you need to know

http://www.tldp.org/HOWTO/Bootdisk-HOWTO/

Last edited by DavidPhillips; 09-24-2002 at 09:46 PM.
 
Old 09-18-2002, 02:22 AM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
drwxr-xr-x 2 root root 2048 Sep 17 15:02 bin
drwxr-xr-x 3 root root 16384 Aug 10 07:30 dev
drwxr-xr-x 3 root root 1024 Sep 17 22:56 etc
drwxr-xr-x 2 root root 1024 Aug 10 07:30 lib
drwxr-xr-x 2 root root 1024 Aug 10 07:30 proc
lrwxrwxrwx 1 root root 1 Aug 10 07:30 root -> .
lrwxrwxrwx 1 root root 3 Aug 10 07:30 sbin -> bin
 
Old 09-18-2002, 02:23 AM   #12
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
[david@www dvx]$ ls -l etc
total 15
-rw-r--r-- 1 root root 91 Sep 17 15:05 filesystems
-rw-r--r-- 1 root root 151 Sep 17 15:05 fstab
-rw-r--r-- 1 root root 125 Sep 17 15:05 group
-rw-r--r-- 1 root root 332 Sep 17 15:05 inittab
-rw-r--r-- 1 root root 1097 Sep 17 22:56 ld.so.cache
-rw-r--r-- 1 root root 0 Sep 17 22:56 ld.so.conf
-rw-r--r-- 1 root root 0 Sep 17 22:55 login.defs
lrwxrwxrwx 1 root root 14 Sep 17 15:05 mtab -> ../proc/mounts
-rw-r--r-- 1 root root 198 Sep 17 15:05 nsswitch.conf
-rw-r--r-- 1 root root 31 Sep 17 15:05 passwd
-rw------- 1 root root 31 Sep 17 15:05 passwd-
lrwxrwxrwx 1 root root 2 Sep 17 15:05 rc.d -> ./
-rwxr-xr-x 1 root root 92 Sep 17 15:05 rc.local
-rwxr-xr-x 1 root root 202 Sep 17 15:05 rc.sysinit
-r-------- 1 root root 38 Sep 17 15:05 shadow
-rw------- 1 root root 38 Sep 17 15:05 shadow-
drwxr-xr-x 2 root root 1024 Sep 17 15:05 sysconfig
-rw-r--r-- 1 root root 311 Sep 17 15:05 syslog.conf
 
Old 09-18-2002, 02:24 AM   #13
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
[david@www dvx]$ ls -l etc/sysconfig
total 2
-rw-r--r-- 1 root root 156 Sep 17 15:05 ifcfg-lo
-rw-r--r-- 1 root root 81 Sep 17 15:05 network
lrwxrwxrwx 1 root root 2 Sep 17 15:05 network-scripts -> ./
 
Old 09-18-2002, 02:24 AM   #14
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
[david@www dvx]$ ls -l lib
total 1943
-rwxr-xr-x 1 root root 97640 Aug 10 07:30 ld-2.2.5.so
lrwxrwxrwx 1 root root 11 Aug 10 07:30 ld-linux.so.2 -> ld-2.2.5.so
-rwxr-xr-x 1 root root 1395576 Aug 10 07:30 libc-2.2.5.so
lrwxrwxrwx 1 root root 17 Aug 10 07:30 libcom_err.so.2 -> libcom_err.so.2.0
-rwxr-xr-x 1 root root 8228 Aug 10 07:30 libcom_err.so.2.0
-rwxr-xr-x 1 root root 23680 Aug 10 07:30 libcrypt-2.2.5.so
lrwxrwxrwx 1 root root 17 Aug 10 07:30 libcrypt.so.1 -> libcrypt-2.2.5.so
lrwxrwxrwx 1 root root 13 Aug 10 07:30 libc.so.6 -> libc-2.2.5.so
lrwxrwxrwx 1 root root 13 Aug 10 07:30 libe2p.so.2 -> libe2p.so.2.3
-rwxr-xr-x 1 root root 18549 Aug 10 07:30 libe2p.so.2.3
lrwxrwxrwx 1 root root 16 Aug 10 07:30 libext2fs.so.2 -> libext2fs.so.2.4
-rwxr-xr-x 1 root root 99718 Aug 10 07:30 libext2fs.so.2.4
lrwxrwxrwx 1 root root 16 Aug 10 07:30 libmisc.so -> libmisc.so.0.0.0
lrwxrwxrwx 1 root root 16 Aug 10 07:30 libmisc.so.0 -> libmisc.so.0.0.0
-rwxr-xr-x 1 root root 72967 Aug 10 07:30 libmisc.so.0.0.0
-rwxr-xr-x 1 root root 42190 Aug 10 07:30 libnss_files-2.2.5.so
lrwxrwxrwx 1 root root 21 Aug 10 07:30 libnss_files.so.1 -> libnss_files-2.2.5.so
lrwxrwxrwx 1 root root 21 Aug 10 07:30 libnss_files.so.2 -> libnss_files-2.2.5.so
-rwxr-xr-x 1 root root 103896 Aug 10 07:30 libpthread-0.9.so
lrwxrwxrwx 1 root root 17 Aug 10 07:30 libpthread.so.0 -> libpthread-0.9.so
-rwxr-xr-x 1 root root 34725 Aug 10 07:30 librt-2.2.5.so
lrwxrwxrwx 1 root root 14 Aug 10 07:30 librt.so.1 -> librt-2.2.5.so
lrwxrwxrwx 1 root root 18 Aug 10 07:30 libshadow.so -> libshadow.so.0.0.0
lrwxrwxrwx 1 root root 18 Aug 10 07:30 libshadow.so.0 -> libshadow.so.0.0.0
-rwxr-xr-x 1 root root 53371 Aug 10 07:30 libshadow.so.0.0.0
lrwxrwxrwx 1 root root 14 Aug 10 07:30 libuuid.so.1 -> libuuid.so.1.2
-rwxr-xr-x 1 root root 14175 Aug 10 07:30 libuuid.so.1.2
 
Old 09-18-2002, 02:25 AM   #15
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
[david@www dvx]$ ls bin
[ dmesg id mkfs.ext3 reboot tr
agetty dos2unix ifconfig mkfs.jfs reset traceroute
ash du init mkfs.minix rm true
basename dumpkmap kill mkfs.msdos rmdir tty
bsh echo killall mkfs.reiserfs route umount
busybox ed klogd mkfs.vfat rpm2cpio uname
cat env ldd mknod sed uniq
chgrp expr linuxrc mkswap sh unix2dos
chmod false ln mktemp sleep uptime
chown fbset loadacm modprobe sort uudecode
chroot fdflush loadfont more stty uuencode
chvt fdformat loadkmap mount swapoff wc
clear fdisk logger msh swapon wget
cmp find login mv sync which
cp free ls nc syslogd whoami
cpio freeramdisk lsmod nslookup tail xargs
cut grep makedevs pidof tar yes
date gunzip md5sum ping tee zcat
dc gzip mkdir pivot_root telinit
dd halt mke2fs poweroff telnet
deallocvt head mkfs ps test
df hostid mkfs.bfs pwd tftp
dirname hostname mkfs.ext2 readlink touch
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 ridak Fedora 0 07-14-2004 07:23 PM
Kernal Panic: No init found. Try passing init= option to kernel raees Linux - General 12 03-18-2004 11:10 PM
Kernel Panic: No Init Found Try Passing Init=option To Kernel Bakame Mandriva 7 03-14-2004 02:37 PM
error "Kernel panic: No init found. Try passing init= option Anauj0101 Linux - Newbie 3 05-06-2003 10:18 PM
Compiled own kernel and got: Kernel panic: No init found. Try passing init= option to fbl Linux - General 12 01-14-2003 03:38 AM

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

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