kernel panic - not syncing no init found. try passing init= option to
Dear all,
I am engineering student.I am trying to build linux distro for programming enivironment from debian based distro.
I can succesfull build rootfs,after making ISO I am getting error"kernel panic - not syncing no init found. try passing init= option to kernel..."
Init content is;
==============
link bin/busybox
build_rootfs.sh content;
==================
PHP Code:
#!/bin/bash -eu
# Build the initramfs, a basic system that is used by the #kernel as init
# filesystem - also called 'rootfs'
echo "# Building rootfs"
startup_dir=$(pwd)
cd $(dirname $0)/../
BASE_DIR=$(pwd)
ROOTFS_DIR=$BASE_DIR/var/rootfs
TEMPFILE=$(tempfile)
function fun_mknod {
if [ ! -e "$1" ]; then
fakeroot -i $TEMPFILE -s $TEMPFILE mknod $@
fi
}
# create devices
echo "## Creating devices"
fun_mknod $ROOTFS_DIR/dev/console c 5 1
chmod a+rw $ROOTFS_DIR/dev/console
fun_mknod $ROOTFS_DIR/dev/null c 1 3
fun_mknod $ROOTFS_DIR/dev/ram b 1 1
fun_mknod $ROOTFS_DIR/dev/systty c 4 0
fun_mknod $ROOTFS_DIR/dev/tty c 5 0
for i in 1 2 3 4 5 6; do
fun_mknod $ROOTFS_DIR/dev/tty$i c 4 $i
done
chmod a+rw $ROOTFS_DIR/dev/tty*
# generate module dependencies
KERNEL_NAME="$(strings $BASE_DIR/install_cd/isolinux/bzImage \
| grep CLinux \
| cut -d' ' -f1)"
mkdir -p $ROOTFS_DIR/lib/modules/$KERNEL_NAME
/sbin/depmod --basedir $ROOTFS_DIR -v $KERNEL_NAME
# attach bootsplash image
echo "## Attaching bootsplash image"
cd $BASE_DIR/var/rootfs/boot/CLinux/
$BASE_DIR/bin/splash -s -f bootsplash.cfg \
> $ROOTFS_DIR/bootsplash
# create rootfs filesystem
if [ -f "$BASE_DIR/install_cd/isolinux/rootfs" ]; then
echo "## Removing old rootfs filesystem"
rm -f $BASE_DIR/install_cd/isolinux/rootfs
fi
echo "## Creating rootfs filesystem"
cd $ROOTFS_DIR
find . -not -wholename \*.svn\* \
| fakeroot -i $TEMPFILE cpio -o -H newc \
| gzip \
> $BASE_DIR/install_cd/isolinux/rootfs
# clean
echo "## Cleaning"
rm $ROOTFS_DIR/bootsplash
rm $ROOTFS_DIR/dev/*
#rm -R $ROOTFS_DIR/lib/modules
rm $TEMPFILE
ISOlinux.cfg content is
PHP Code:
default vesamenu.c32
prompt 0
menu hshift 13
menu width 49
menu title CLinux boot menu
label install
menu label Install CLinux
kernel bzImage
append raid=noautodetect initrd=rootfs rw vga=791
menu end