Kernel panic - not syncing: No init found. Try passing init= option to kernel.

hai ,

i try to mount the rootfs using nfs for my beagle bone back…while booting the kernel i’m facing the following issue …

error log message :

hai all,

can anybody help me how to boot the rootfs using nfs …still i stuck with same issue…currently i’m using ubuntu13.10 as a host pc to implement nfs booting.
i referred the following link to build the kernel
http://wiki.beyondlogic.org/index.php/BeagleBoneBlack_Building_Kernel

http://elinux.org/Building_BBB_Kernel

regards
siva

hai all,

can anybody help me how to boot the rootfs using nfs …still i stuck with same issue…currently i’m using ubuntu13.10 as a host pc to implement nfs booting.
i referred the following link to build the kernel
http://wiki.beyondlogic.org/index.php/BeagleBoneBlack_Building_Kernel

http://elinux.org/Building_BBB_Kernel

I attached my uEnv.txt file I use for NFS. Make sure you change the IP address and for nfsroot to match your host IP and userID. My local network uses an address 10.100.116.xxx. My BBB is 10.100.116.104 and my host is 10.100.116.73.

You need to install nfs-kernel-server on your Ubuntu host

Add the following line to your /etc/exports file on your host

/home//targetNFS 10.100.116.0/255.255.255.0(rw,insecure,async,no_wdelay,no_root_squash,no_subtree_check)

Place your rootfs in /home//targetNFS on your host

sudo service nfs-kernel-server restart

I think that is all, so NFS should work for you. I hope this helps.

Regard,
John

uEnv.txt (2.26 KB)

hello john,
thanks for your help
some how i understood the flow of kernel booting from nfs
but still i got the same error report

6.876536] ALSA device list:
[ 6.879838] #0: TI BeagleBone Black
[ 6.889766] VFS: Mounted root (nfs filesystem) on device 0:12.
[ 6.896385] devtmpfs: mounted
[ 6.899975] Freeing init memory: 292K
[ 6.907579]
[ 6.920985] Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 6.934045] [] (unwind_backtrace+0x0/0xe0) from [] (panic+0x84/0x1e0)
[ 6.942611] [] (panic+0x84/0x1e0) from [] (kernel_init+0xb8/0xe4)
[ 6.950812] [] (kernel_init+0xb8/0xe4) from [] (ret_from_fork+0x14/0x3c)
[ 6.959639] drm_kms_helper: panic occurred, switching back to text console

this is my uEnv.txt file

NFS root as done on ARCH, Debian, and busybox will not work the same way on ubuntu. Nor fedora or Angstrom for that matter. What you need to do is find a how to for netbooting Ubuntu ( PC ) and adapt it.

obviously going by the error messages above, this configuration does not like your initial ramdisk ( initrd ) for some reason.

hello john,
thanks for your help
some how i understood the flow of kernel booting from nfs
but still i got the same error report

6.876536] ALSA device list:
[ 6.879838] #0: TI BeagleBone Black
[ 6.889766] VFS: Mounted root (nfs filesystem) on device 0:12.
[ 6.896385] devtmpfs: mounted
[ 6.899975] Freeing init memory: 292K
[ 6.907579]
[ 6.920985] Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 6.934045] [] (unwind_backtrace+0x0/0xe0) from [] (panic+0x84/0x1e0)
[ 6.942611] [] (panic+0x84/0x1e0) from [] (kernel_init+0xb8/0xe4)
[ 6.950812] [] (kernel_init+0xb8/0xe4) from [] (ret_from_fork+0x14/0x3c)
[ 6.959639] drm_kms_helper: panic occurred, switching back to text console

Did you rebuild your kernel without Initrd configured?

Regards,
John

NFS root as done on ARCH, Debian, and busybox will not work the same way on ubuntu. Nor fedora or Angstrom for that matter. What you need to do is find a how to for netbooting Ubuntu ( PC ) and adapt it.

obviously going by the error messages above, this configuration does not like your initial ramdisk ( initrd ) for some reason.

NFS booting is not compatible with Initrd. Thus the kernel must be built without Initrd configured and uenvcmd has a dash instead of an Initrd memory load address.

Regards,
John

I build linux Linux systems that run on their inital RAM disk
and I can NFS boot them, so I don't think the kernel haveing
initrd capability does anything wrong.

Maybe I missed something in the thread, but why are
you using /lib/modules/3.8.13/init ??

When I see this
      Kernel panic - not syncing: No init found. Try
      passing init= option to kernel.
message it is because the /sbin/init program the kernel
tries to run is missing a dynamic dependency. This sort
of thing happens when you build a whole (small) system
from scratch.

Try using init=/bin/bash just to see if it runs. If so,
it isn't an NFS root problem per se, is is a problem
with the program you are using for init.

Yeah, not being able to netboot because of initrd is false as far as I know. It used to be in order to boot iSCSI you had to use initrd.

Perhaps upstart is incapable of supporting netboot ? I honestly dont know.

You know those uEnv.txt file boot parameters look very familiar . . . If you’re copying from my blog on embeddedhobbyist.com, they wont work with Ubuntu.

I build linux Linux systems that run on their inital RAM disk
and I can NFS boot them, so I don't think the kernel haveing
initrd capability does anything wrong.

You could very well be correct; however, I recall a while back when I
started using NFS, I came across a similar problem. After Googling, I
found and article that said NFS isn¹t compatible with Initrd so I removed
Initrd from the kernel and replaced the Initrd address with a dash in
uEnv.txt and viola, NFS worked. I didn¹t do any further investigation. I
would be interested if anyone has managed to get NFS to work with Initrd
configured.

Regards,
John

hello john,
yes john i tried with rebuilding the kernel without initrd option too…
but no change with error log !!!

when u saw my uEnv.txt file i used to boot the args without initrd address as you said

# uenvcmd=run boot_ftd; run device_args; bootz 0x80200000 0x81000000:${initrd_size} 0x815f0000
uenvcmd=run boot_ftd; run device_args; bootz 0x80200000 - 0x815f0000

any ideas …how to come back the kernel to boot up!!

hai,

i tried to debug the boot process…
i went with some ideas to find the why such error comes…
[1] i tried to boot the kernel with init=/hello_world option… i removed all the rootfs files like /dev /usr /opt /bin /sbin folder and files except hello_world option
----to make sure that my print is able to execute when booting was done
but i got different reply from my kernel
error log1

Control yourself. Stop doing random things.

Put the directories back into the file system. Change to
using init=/bin/bash and see if you get a shell prompt
when you boot.

hai all,

i already tried with init=/bin/bash and also init=/sbin/init but the my output was the same
kernel panic not sync no init found !!!

thanks&
regards
siva

I went back in this email chain and see that you are
trying an NFS boot. Have you verified that the file
system you need is at the NFS mount? Where did you get
that file system? There seems to be a problem, like
the programs aren't arm programs or the lib directory
is missing.

I think either /bin/bash really is not at the NFS mount,
or it is not an arm executable, or something is is wrong
in <mountpoint>/lib with a missing or wrong format .so
file.

hai,
yes u r right , i try to mount my file system using nfs,
i also cross checked my rootfs that shows that /bin/bash file not available …
i dont know how that was missed …!!!
when i look out my targetNFS directory (which is my actual nfs mount folder)
the following dir’s available

bin dev home media proc sbin sys usr
boot etc lib mnt run tmp var

inside /bin i’m not able to find any executable like bash.
but all the files are compiled for arm arch .
i ran
targetNFS/bin#file *

ash: symbolic link to `busybox

busybox: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped

cat: symbolic link to busybox' chattr: symbolic link to busybox’
chgrp: symbolic link to busybox' chmod: symbolic link to busybox’
chown: symbolic link to `busybox’

and so on ..

i compiled the busybox using the following procedure:

http://balau82.wordpress.com/2010/03/27/busybox-for-arm-on-qemu/

and i installed the kernel modules into this busybox/_install directory and i renamed it to targetNFS to make available for nfs booting .
was anything wrong with busybox compilation?? . else shall i need to do some thing more for beaglebone black…
pls share your thoughts how to compile a busybox for beaglebone black.

also suggest me if any books or articles that taught about internals of kernel architectures and procedure for building a kernel for arm platform

regards
siva

hai,
yes u r right , i try to mount my file system using nfs,
i also cross checked my rootfs that shows that /bin/bash file not
  available ..
i dont know how that was missed ..!!!
when i look out my targetNFS directory (which is my actual nfs mount folder)
the following dir's available
*bin dev home media proc sbin sys usr*
*boot etc lib mnt run tmp var*
inside /bin i'm not able to find any executable like *bash.*
*but all the files are compiled for arm arch . *
*i ran *
*targetNFS/bin#file **
*
ash: symbolic link to `busybox
busybox: ELF 32-bit LSB executable, ARM, version
1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16,
stripped
cat: symbolic link to `busybox'
chattr: symbolic link to `busybox'
chgrp: symbolic link to `busybox'
chmod: symbolic link to `busybox'
chown: symbolic link to `busybox'

*
and so on ..

  .

regards
siva

I suggest you set init to /bin/ash and see if you get a shell
when you boot. Also *look* for init in the file system; it
probably is /sbin/init, but verify you know where it is and after
you see the init=/bin/ash work then try your verified init pathname.

Doesnt Ubuntu use dash by default ?

I had the same issue. It was because I untar-ed the nfsroot in windows and then copied it to my linux host machine, so some sym links were lost.