Results 1 to 8 of 8
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-02-2013 #1Just Joined!
- Join Date
- May 2012
- Posts
- 18
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;
==================
ISOlinux.cfg content isPHP 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
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
- 03-02-2013 #2Just Joined!
- Join Date
- May 2012
- Posts
- 18
anyone can help ..pls
- 03-02-2013 #3Linux Guru
- Join Date
- Oct 2007
- Location
- Tucson AZ
- Posts
- 2,507
I've never done this so can't help with the first part but, your isolinux file doesn't look right. Where is the bzImage file? If you look at a standard isolinux.cfg it will show the path preceded by a forward slash so if your bzImage is actually in the root of the filesystem your would need: kernel /bzImage. If it is somewhere else, you would need the path to where it is. The same for the initrd entry if it is in the root of the filesystem as your entry shows: initrd=/rootfs.
Your script seems to indicate the rootfs is in isolinux??
- 03-03-2013 #4Just Joined!
- Join Date
- May 2012
- Posts
- 18
Thanks for ur reply.
yes,both bzimage and rootfs is in isolinux folder..
- 03-03-2013 #5Just Joined!
- Join Date
- Mar 2009
- Location
- Norway
- Posts
- 67
Whilst I have not run your script, one thing come to mind; have you unpacked the initrd and verified that init is in fact present?
Secondly, the thread is marked as [SOLVED], if so, drop in a line or two about what solved it for future reference, otherwise the heading should be changed
- 03-03-2013 #6Just Joined!
- Join Date
- May 2012
- Posts
- 18
yes,init is there inside rootfs and content of init is "link bin/busybox"......HTML Code:have you unpacked the initrd and verified that init is in fact present?
The idea is to use the rootfs from buildroot as the initrd (i.e. initrd=rootfs).Inside the initrd (ie rootfs) is /bin/busybox which will be read first
by the kernel after mounting the initrd.Last edited by new2linus; 03-03-2013 at 08:53 AM.
- 03-04-2013 #7Just Joined!
- Join Date
- May 2012
- Posts
- 18
any help???????
- 03-12-2013 #8Just Joined!
- Join Date
- May 2012
- Posts
- 18
details of error..
my content of /init is "link bin/busybox" and content of /sbin/int is ,PHP Code:Failed to execute /init.
kernel panic-not syncing: No init foud.Try passing init=option to kernel.
pid: 1,comm:swapper Not tainted-linux #4
call trace:
[<c193fa25>] ? printk+0x18/0x1a
[<c193f973>] panic+0x43/0xd
[<c100134d>] init_post+0xad/0x100
[<c1d82377>] kernel_init+0x160/0x169
[<c1d82317>] ? kernel_init+0x0/0x169
[<c1003a27>] kernel_thread_helper+0x7/0x10
atkbd.c:spurious NAK on isa0060/serio0.Some program might be trying access hardware directly.
pls someone help me..thanksPHP Code:mount /proc
exec /usr/sbin/chroot . /bin/busybox init < /dev/console > /dev/console


Reply With Quote
