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? |
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) |
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.
|
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 |
There's a line that says:
root=/dev/hda6 Is that sufficient, or must there be append = "root = /dev/hda6" |
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 |
Yup, /sbin/init exists
|
:scratch:
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 |
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 :) |
HEy, i would like to see a dmesg output and your lilo.conf. I think i can help if a got those files!!
|
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? |
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 :D - Thanks for any ideas you may have. |
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:15:DE; 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:
|
All times are GMT -5. The time now is 12:01 AM. |