[yocto] Init stops working on second boot cycle

Randy MacLeod randy.macleod at windriver.com
Wed Aug 14 18:32:00 PDT 2019


On 8/13/19 6:21 AM, Andy Pont wrote:
> I’ve got a strange issue and I don’t know whether it is a Yocto related 
> issue, a kernel issue or something else completely…
> 
> I have an image that is built with thud (2.6.2) using meta-atmel for the 
> SAMA5D2-Xplained reference board.  I deploy the resulting .wic file to 
> an SD card and boot the reference board and all is OK.  I can log into 
> the terminal, upload files, etc. and again all seems to be well.
> 
> If I press the reset button on the hardware platform, on the next boot 
> cycle it always stops with the following being last messages being 
> displayed:
> 
> Freeing unused kernel memory: 1024K
> Run /sbin/init as init process
> INIT: version 2.88 booting
> 
> The system hasn’t completely hung as the occasional kernel message 
> appears but the user space init process (sysvinit) doesn’t seem to be 

What sort of occasional kernel message and do they eventually stop?

> working at all.  If I put the SD card into a Linux desktop machine the 
> file system on it is still valid and the changes that I have made are 
> still present.
> 
> Anyone got any ideas as to what is screwing it up?

No but here are some generic debugging tips.
In no particular order, have you tried:

1) setting kernel boot options such as:
     init=/bin/bash

    Does that reboot consistently when you press reset?

2) getting sysvinit to start an emergency shell?
    https://manpages.debian.org/testing/sysvinit-core/init.8.en.html
    I don't know how you'd do that for your board but is
    should be possible.

3) single user mode:
    https://wiki.gentoo.org/wiki/Sysvinit#Single_user_mode

4) Does the problem happen if you run 'shutdown -r now'
    rather than pressing the reset button?

Good luck,

-- 
# Randy MacLeod
# Wind River Linux


More information about the yocto mailing list