Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi All, I am working on digi-connect me 9210 from digi. Because of the lack of nfs support on the current kernel build that I am working on, when I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2013
    Posts
    18

    Kernel panic - not syncing: No init found


    Hi All,

    I am working on digi-connect me 9210 from digi.

    Because of the lack of nfs support on the current kernel build that I am working on, when I write my code I have to ssh into the target board and copy the executable from my host machine to the target board.

    I find this tedious and will like like to export an NFS directory from my host machine for mounting into my target file system.
    The root file system used on my boards is SQUASHFS (RO) and for the user application JFFS2.

    In order to achieve this I recompiled my current kernel with nfs client support and will like to run the image from ram on the by copying image to target using tftpboot.

    When I boot the board the kernel it seems to mount the nfs and later dies with the following message "Kernel panic - not syncing: No init found"t

    Searching through the this forum, I can see that a few people have had similar issues but with slight variations.

    I have attached a trace captured with "screen application" showing all the u-boot environment variables and the boot message shown up to the time when it falls over.

    Many thanks in advance.

    Regards

    Ola Oni
    Attached Files Attached Files

  2. #2
    Just Joined!
    Join Date
    Sep 2012
    Location
    Nashville, TN
    Posts
    98
    Do you still have the original kernel installed by chance. If so try booting into that and look for a /var/crash directory. This should have crash dumps in that directory. In the mean time I will have a look through the attached file.

  3. #3
    Just Joined!
    Join Date
    Sep 2012
    Location
    Nashville, TN
    Posts
    98
    Ok two questions I have.

    1. Did you compile NFS support as a module or into the kernel
    2. Did you mean for your root partition to be on the nfs share. It can be done but I don't have any experience doing that.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Nov 2013
    Posts
    18
    Hi bsdtux,

    Thanks for your response, I don't have a /var/crash directory on the target, this I believe is due to the fact that is a read only file system [SQUASHFS].
    There are only two directories namely log and run, the former contains one file named messages which contains log of current session only.
    See below ..

    Jan 1 00:00:08 cme9210js syslog.info syslogd started: BusyBox v1.15.2
    Jan 1 00:00:11 cme9210js authpriv.info dropbear[239]: Running in background
    Jan 1 00:01:47 cme9210js authpriv.info dropbear[283]: Child connection from 192.168.1.50:35997
    Jan 1 00:01:57 cme9210js authpriv.notice dropbear[283]: password auth succeeded for 'root' from 192.168.1.50:35997

    the latter contains various id but no log.

    Regards

    Ola

  6. #5
    Just Joined!
    Join Date
    Nov 2013
    Posts
    18
    Hi bsdtux,

    Quote Originally Posted by bsdtux View Post
    Ok two questions I have.

    1. Did you compile NFS support as a module or into the kernel
    2. Did you mean for your root partition to be on the nfs share. It can be done but I don't have any experience doing that.
    Q1:
    I compiled NFS support into the kernel.

    O2:
    No I want to be able to mount my host directory unto the target so that when I browse the target file system, I see the exported host machine exported directroy as part of the target system,
    With NFS server support on the host and NFS client support on the target. I can confirm that the NFS server is working because I can mount the exported directory from within the host file system.

    Regards

    Ola

  7. #6
    Just Joined!
    Join Date
    Sep 2012
    Location
    Nashville, TN
    Posts
    98
    Ok this might sound crazy. Can you check the NFS export and verify that you have a /sbin/init on the exported directory. From looking at the log that would be the next logical thing to check in my opinion. I just want to ensure that you have a full rootfs extracted to the nfs share that you are mounting as root.

  8. #7
    Just Joined!
    Join Date
    Nov 2013
    Posts
    18
    Hi bsdtux

    What you called crazy idea has acutally solved the problem, I copied the contents of my target project rootfs directory from the host to the exported directory. See below

    promtp$ ~/project/uui/build/rootfs $ tree -L 1
    .
    ├── bin
    ├── dev
    ├──etc
    ├── home
    ├── lib
    ├── media -> /tmp/media
    ├── mnt -> /tmp/mnt
    ├── nfs
    ├── opt
    ├── proc
    ├── root
    ├── sbin
    ├── sys
    ├── tmp
    ├── usr
    └── var -> /tmp/var

    Setup the uboot enviromnet bootargs as follows:-
    bootargs=console=ttyNS0,38400 root=/dev/nfs rw rootfstype=squashfs nfsroot=192.168.1.50:/nfs ip=192.168.1.51:192.168.1.50:192.168.1.1:255.255.2 55.0::eth0 init=/sbin/init

    and then executed the command tftpboot 0x200000 /tftpboot/uImage-cme9210js where uImage-cme9210js is the kernel image with the nfs support built in.

    Thanks for your relentless help.

    Regards

    Ola

  9. #8
    Just Joined!
    Join Date
    Nov 2013
    Posts
    18
    Hi bsdux,

    I spoke too hastily, I can see files stored in my exported directory, through the prompt that was started after completing the boot sequence on target, I will investigate and report how I got on.

    Regards

    Ola

  10. #9
    Just Joined!
    Join Date
    Nov 2013
    Posts
    18
    I now have my target board booting the kernel through NFS running on my development host machine. I can also ssh into the board from my target machine etc, Unfortunately I am unable to start all the user defined application which run when I boot from the target flash.

    The target uses squashfs for the root file system and JFFS2 for user data mounted on /tm/mnt/User-JFFS2 directory this directory contains the script which starts all the user applications.

    I modified my u-boot bootargs as
    setenv bootargs root=/dev/nfs rw rootfstype=squashfs mtdparts=physmap-flash.0:0x30000(U-Boot),0x20000@0x30000(NVRAM),0x120000@0x2e0000(Use r-JFFS2) nfsroot=$(serverip):/nfs ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):: eth0 init=/sbin/init

    I also tried copying the existing User-JFFS2 directory from the target when running from flash to the development host machine directory /nfs/tmp/mnt that is being exported by NFS, but when I browse to the /tmp/mnt on target after booting with NFS, I am unable to see the User-JFFS2 which was exported.

    Many thanks in advance.

    Regards

    Ola

  11. #10
    Just Joined!
    Join Date
    Nov 2013
    Posts
    18
    Quote Originally Posted by olaoni View Post
    I now have my target board booting the kernel through NFS running on my development host machine. I can also ssh into the board from my target machine etc, Unfortunately I am unable to start all the user defined application which run when I boot from the target flash.

    Ola
    CORRECTION

    I now have my target board booting the kernel through NFS running on my development host machine. I can also ssh into the board from another Linux machine etc, Unfortunately I am unable to start all the user defined application which run when I boot from the target flash.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •