LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2004, 07:21 AM   #1
dr_mandarin
LQ Newbie
 
Registered: Oct 2004
Posts: 7

Rep: Reputation: 0
kernel panic: no init found


I recently installed Slackware 10.0 on my laptop. My partitions are set up as follows:
/dev/hda1 /boot
/dev/hda2 windows
/dev/hda3 swap
/dev/hda4 (extended)
/dev/hda5 spare
/dev/hda6 /

Lilo is the default bootloader.
When booting Linux, the boot process ends with the following message:
Kernel panic: No init found, try passing init= to the kernel

I've examined the lilo and lilo.conf man pages, also googled and searched these forums for similar errors. Most of the responses I've seen on these forums suggest using rescue disk.
I can boot my system with the bootdisk floppy created during the installation.

What is the cause of this error, and how can I fix it?
 
Old 10-01-2004, 07:22 AM   #2
Boudewijn
Member
 
Registered: Nov 2003
Location: The Netherlands
Distribution: MDK: 10,10.1,10_amd64,9.2,9.1 . Debian: sarge,woody, Gentoo (X86 amd64 Sparc)
Posts: 219

Rep: Reputation: 30
Shouldn't /boot be on the same partitions as / ?

(Just a guess, although I do not ahve a lot of experience with this kind of trouble)
 
Old 10-01-2004, 07:24 AM   #3
dr_mandarin
LQ Newbie
 
Registered: Oct 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Nope, /boot doesn't have to be on the same partition as / - at least, AFAIK. My understanding is that /boot can be placed on its own partition so that it falls within the BIOS boot sector limit. Also, several of the Linux distros with GUI installers allow you to choose a partition specifically for /boot from a dropdown list.

Last edited by dr_mandarin; 10-01-2004 at 07:28 AM.
 
Old 10-01-2004, 07:32 AM   #4
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
The Linux kernel tries to start an init process from the file
/sbin/init
This is an absolute requirement for Linux to boot. Do you have any such file?

Do you miss this line in lilo.conf?
image = /boot/vmlinuz
label = linux
...
append = "root=/dev/hda6"

Martin
 
Old 10-01-2004, 07:41 AM   #5
dr_mandarin
LQ Newbie
 
Registered: Oct 2004
Posts: 7

Original Poster
Rep: Reputation: 0
There's a line that says:
root=/dev/hda6

Is that sufficient, or must there be append = "root = /dev/hda6"
 
Old 10-01-2004, 07:43 AM   #6
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
I really don't know the difference, I've seen both. It's probably sufficient if it came from the installer. Do you have an init in /sbin?

Martin
 
Old 10-01-2004, 07:49 AM   #7
dr_mandarin
LQ Newbie
 
Registered: Oct 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Yup, /sbin/init exists
 
Old 10-01-2004, 07:55 AM   #8
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30


Maybe the lilo.conf settings haven't been written to the MBR. Try the command
/sbin/lilo
to write the configuration.

Otherwise, I'm running out of ideas.
Martin
 
Old 10-01-2004, 09:20 AM   #9
RestInPieces
Member
 
Registered: Aug 2004
Location: In front of a CRT monitor
Distribution: Slackware-current
Posts: 108

Rep: Reputation: 15
well..of what i know... that error can apper if.. lilo can't find the root partition... but i've heard something about old modutils taht give the same error...
opinions are shared but i suspect faulty instalation
 
Old 10-01-2004, 10:01 AM   #10
DarkstarNL
LQ Newbie
 
Registered: Oct 2003
Location: The Netherlands
Distribution: Debian Sarge
Posts: 22

Rep: Reputation: 15
HEy, i would like to see a dmesg output and your lilo.conf. I think i can help if a got those files!!
 
Old 10-03-2004, 04:02 AM   #11
dr_mandarin
LQ Newbie
 
Registered: Oct 2004
Posts: 7

Original Poster
Rep: Reputation: 0
MartinN:
I've run /sbin/lilo, so the configuration has been written.

RestInPieces:
You cite faulty installation as a cause - what have I done wrong?

DarkstarNL:
How do you suggest I run dmesg if the system doesn't boot?
 
Old 10-17-2004, 03:34 PM   #12
klaxyn
LQ Newbie
 
Registered: Oct 2004
Distribution: CentOS
Posts: 4

Rep: Reputation: 0
Question PXE Boot, kernel panic no init found

I have a similar problem only I'm booting over the network using PXE. The linux client downloads the vmlinuz and initrd image files from the PXE server - downloads rootfs.gz which is the root filesystem image. The clients are diskless so it loads the image into ram and mounts it.

default pxe config:

KERNEL vmlinuz
APPEND initrd=rootfs.gz root=/dev/ram

When the client boots it reports a no init found error and panics. What is the syntax for using init= ?? I've tried setting the value to /sbin/init, rootfs.gz, initrd.img with no luck. I had this problem before after upgrading my kernel on another server but it was just missing the /initrd diretory. I created an emtpy /initrd and it booted from then on, but that did help here. Also some of my other servers have files in /initrd and other don't but they both seem to boot ok. I'm not at work now and the clients are on a priv net so I'll post some logging and config info later when I have access to it - Thanks for any ideas you may have.
 
Old 10-21-2004, 09:50 PM   #13
klaxyn
LQ Newbie
 
Registered: Oct 2004
Distribution: CentOS
Posts: 4

Rep: Reputation: 0
Re: PXE Boot, kernel panic no init found

This is what I've learned since posting the previous message. I haven't tested the linux dhcp server with this method yet, but it works with using windows dns.


PXE Boot Linux+Windows Implementation
The goal is to boot a minimized operating system on a diskless server. For this experiment. I have chosen to boot a minimal installation of RedHat Enterprise EL 3 over the network from a windows server.
Install On Linux Server:
Install 'syslinux' - Inlucdes the pxelinux and memdisk utilities.

Install On Linux Or Windows Server:
Install 'dhcpd' - Assigns client an ip address used for the PXE boot
Install 'tftpd' - Trivial ftp server. The client connects to this to download the image files.

Install TFTP Service
Install the tftp service on the windows or linux server of your choice. Create the directories /tftproot (place your images here) and /tftproot/pxelinux.cfg (place your pxelinux config files here). The initrd (initial ram disk image)is a basic root file system needed to boot the os. The initrd image is stored in ram and disposed when the real root file system (usually either C:\ or /dev/hda1) is ready to mount.

Install SYSLINUX On Linux Server
On a Linux box install PXELINUX. Copy the pxelinux.0 file to your tftp server root directory (usually /tftproot) and the ‘default’ file to the pxelinux.cfg sub-directory in /tftproot.

Edit /tftproot/pxelinux.cfg/default
The default pxelinux config file defines your boot menu choices,the kernels and initrd images for each boot configuration.

default 0
prompt 1
timeout 60

label localboot
LOCALBOOT 0

label 0
kernel vmlinuz-2.4.21-15.ELsmp
append ramdisk_size=819200 initrd=rootfs0.img.gz root=/dev/ram0

label 1
kernel vmlinuz-2.4.21-15.ELsmp
append ramdisk_size=819200 initrd=rootfs1.img.gz root=/dev/ram0


NIC Configuration
Configure the network interface card to boot over the network using PXE. This is done in the bios if the nic supports it, otherwise you will need a boot floppy. For diskless servers set the default boot device to the network interface card.

Windows DHCP Scope Options


DHCP Server (LINUX) Setup your /etc/dhcpd.conf

allow booting;
option subnet-mask 255.255.255.0;

group {
next-server 192.168.168.12; #IP address of the tftp server
#PXE boot image filename located in /tftpboot, comes with syslinux distribution.
filename "pxelinux.0"; }

subnet 192.168.168.0 netmask 255.255.255.0 {
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.168.255;
option domain-name-servers 192.168.168.12;

#entry for dhcp server. dhcpd complains without it.
host client-1 {
hardware ethernet 00:02:B3:EE:F8:FC; #mac address of dhcpd server
fixed-address 192.168.168.12; #ip address of dhcp server
filename "/tftpboot/client01";
}

#The client you want to boot over the network
host client-2 {
hardware ethernet 00:09:6B:FF:15E;
fixed-address 192.168.168.101;
filename "pxelinux.0";
}
}

Creating the rootfs#.img file:

The image file must fit into memory so start with a minimal installation of linux and instsall only the software you are going to use. The minimal installation of RedHat Enterprise EL3 take about 700MB.

PXELINUX doesn't limit the size of an initrd or memdisk; in practice, they
need to fit into memory uncompressed. If you're using a Linux kernel,
it needs to specifically fit into the "kernel" part of the memory space, which
is usually just under 1 GB. There must be enough memory for the compressed and uncompressed initrd image.

dd if=/dev/zero of=/rootfs1.img bs=1024 count=819200

mkfs –t ext2 –i 1024 –b 1024 –F /rootfs1.img


Copy Files To Your New Image File

mount –o loop /rootfs1.img /rootmount

cp –a /boot /rootmount
cp –a /initrd /rootmount
cp –a /dev /rootmount
cp –a /usr /rootmount
cp –a /lib /rootmount
cp –a /var /rootmount
cp –a /bin /rootmount
cp –a /sbin /rootmount
cp –a /etc /rootmount
cp –a /home /rootmount
cp –a /root /rootmount
mkdir /rootmount/tmp
mkdir /rootmount/proc

Edit /fstab

Change fstab to point to the new root (/dev/ram or /dev/ram0) and remove the swap partition since we’ll be using ram instead of disk anyway:

Old:

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/hda3 swap swap defaults 0 0

New:

Change so root points to /dev/ram or /dev/ram0 and remove any lines that point to a hard drive

/dev/ram0 / ext2 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0


Compress File System Image

Make sure your image file is smaller than your amount of installed ram. Allow at least 256MB room for other programs to run in ram.

‘umount /rootmount’

‘gzip -c -9 rootfs1.img > rootfs1.img.gz’

The server must have enough ram to fit both the compressed and uncompressed image into memory.



Quote:
Originally posted by klaxyn
I have a similar problem only I'm booting over the network using PXE. The linux client downloads the vmlinuz and initrd image files from the PXE server - downloads rootfs.gz which is the root filesystem image. The clients are diskless so it loads the image into ram and mounts it.

default pxe config:

KERNEL vmlinuz
APPEND initrd=rootfs.gz root=/dev/ram

When the client boots it reports a no init found error and panics. What is the syntax for using init= ?? I've tried setting the value to /sbin/init, rootfs.gz, initrd.img with no luck. I had this problem before after upgrading my kernel on another server but it was just missing the /initrd diretory. I created an emtpy /initrd and it booted from then on, but that did help here. Also some of my other servers have files in /initrd and other don't but they both seem to boot ok. I'm not at work now and the clients are on a priv net so I'll post some logging and config info later when I have access to it - Thanks for any ideas you may have.
 
  


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 Off
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 - Newbie

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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration