Openembedded Core Discussions
 help / color / mirror / Atom feed
* /sbin/init not found in oe-core
@ 2012-05-25 20:22 Brandon Stafford
  2012-05-25 20:30 ` Mark Hatle
  0 siblings, 1 reply; 6+ messages in thread
From: Brandon Stafford @ 2012-05-25 20:22 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

Hi all,

I'm trying to switch from OE classic to the new openembedded-core.
Using the latest commit on the denzil branch, I've successfully made a
meta layer and built a filesystem that looks reasonably similar to the
old one. But, it seems like something has changed in the boot process.

As the last step in initramfs/init.sh, after mounting the filesystem,
the kernel would attempt to execute /sbin/init like this:

    exec switch_root -c /dev/console /mnt/root /sbin/init

With the same old kernel and my new filesystem, this occurs:

    switch_root: can't execute '/sbin/init': No such file or directory

When I look at the filesystem, /sbin/init is, of course, nowhere to be found.

Has the boot process changed? What should I be doing instead of
calling /sbin/init?

Cheers,
Brandon
--
Brandon Stafford
Rascal Micro: small computers for art and science
Somerville, MA, USA



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: /sbin/init not found in oe-core
  2012-05-25 20:22 /sbin/init not found in oe-core Brandon Stafford
@ 2012-05-25 20:30 ` Mark Hatle
  2012-05-25 20:52   ` Brandon Stafford
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Hatle @ 2012-05-25 20:30 UTC (permalink / raw)
  To: openembedded-core

On 5/25/12 3:22 PM, Brandon Stafford wrote:
> Hi all,
>
> I'm trying to switch from OE classic to the new openembedded-core.
> Using the latest commit on the denzil branch, I've successfully made a
> meta layer and built a filesystem that looks reasonably similar to the
> old one. But, it seems like something has changed in the boot process.
>
> As the last step in initramfs/init.sh, after mounting the filesystem,
> the kernel would attempt to execute /sbin/init like this:
>
>      exec switch_root -c /dev/console /mnt/root /sbin/init
>
> With the same old kernel and my new filesystem, this occurs:
>
>      switch_root: can't execute '/sbin/init': No such file or directory
>
> When I look at the filesystem, /sbin/init is, of course, nowhere to be found.
>
> Has the boot process changed? What should I be doing instead of
> calling /sbin/init?

You should check your new rootfs.  is there anything called init on it, even in 
a different directory?  Are you using meta-oe and systemd?

You should have some type of an init in the new filesystem.. if not, then 
something is wrong with your image and you'll need to diagnose that first.

--Mark

> Cheers,
> Brandon
> --
> Brandon Stafford
> Rascal Micro: small computers for art and science
> Somerville, MA, USA
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: /sbin/init not found in oe-core
  2012-05-25 20:30 ` Mark Hatle
@ 2012-05-25 20:52   ` Brandon Stafford
  2012-05-25 21:55     ` Mark Hatle
  0 siblings, 1 reply; 6+ messages in thread
From: Brandon Stafford @ 2012-05-25 20:52 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, May 25, 2012 at 4:30 PM, Mark Hatle <mark.hatle@windriver.com> wrote:

>> Has the boot process changed? What should I be doing instead of
>> calling /sbin/init?
>
>
> You should check your new rootfs.  is there anything called init on it, even
> in a different directory?

So far as I can tell, there is no file named init in the filesystem.

> Are you using meta-oe and systemd?

meta-oe: yes
systemd: only if it is enabled by default, so I don't think so. I can
still see /etc/rc[0-5].d, so I think that means Sys V is still in
place.

>
> You should have some type of an init in the new filesystem.. if not, then
> something is wrong with your image and you'll need to diagnose that first.

Sounds like I have something amiss with my filesystem.

Is there a way to tell which package previously generated /sbin/init,
so I can see whether it has changed?

Regards,
Brandon



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: /sbin/init not found in oe-core
  2012-05-25 20:52   ` Brandon Stafford
@ 2012-05-25 21:55     ` Mark Hatle
  2012-05-30 20:48       ` Brandon Stafford
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Hatle @ 2012-05-25 21:55 UTC (permalink / raw)
  To: openembedded-core

On 5/25/12 3:52 PM, Brandon Stafford wrote:
> On Fri, May 25, 2012 at 4:30 PM, Mark Hatle<mark.hatle@windriver.com>  wrote:
>
>>> >>  Has the boot process changed? What should I be doing instead of
>>> >>  calling /sbin/init?
>> >
>> >
>> >  You should check your new rootfs.  is there anything called init on it, even
>> >  in a different directory?
> So far as I can tell, there is no file named init in the filesystem.
>
>> >  Are you using meta-oe and systemd?
> meta-oe: yes
> systemd: only if it is enabled by default, so I don't think so. I can
> still see /etc/rc[0-5].d, so I think that means Sys V is still in
> place.

meta-oe may have systemd enabled by default, but I'm not sure.  I haven't used 
it recently enough to know for sure.

>> >
>> >  You should have some type of an init in the new filesystem.. if not, then
>> >  something is wrong with your image and you'll need to diagnose that first.
> Sounds like I have something amiss with my filesystem.
>
> Is there a way to tell which package previously generated /sbin/init,
> so I can see whether it has changed?

Usually busybox, or sysvinit are the packages that generate that binary.  You 
should be able to see if either was built.  Search the filesystem for systemd 
may tell you as well..

--Mark

> Regards,
> Brandon
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: /sbin/init not found in oe-core
  2012-05-25 21:55     ` Mark Hatle
@ 2012-05-30 20:48       ` Brandon Stafford
  2012-05-30 21:04         ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Brandon Stafford @ 2012-05-30 20:48 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, May 25, 2012 at 5:55 PM, Mark Hatle <mark.hatle@windriver.com> wrote:
>
> On 5/25/12 3:52 PM, Brandon Stafford wrote:
>>
>> On Fri, May 25, 2012 at 4:30 PM, Mark Hatle<mark.hatle@windriver.com>  wrote:
>>
>>>> >>  Has the boot process changed? What should I be doing instead of
>>>> >>  calling /sbin/init?
>>>
>>> >
>>> >
>>> >  You should check your new rootfs.  is there anything called init on it, even
>>> >  in a different directory?
>>
>> So far as I can tell, there is no file named init in the filesystem.
>>
>>> >  Are you using meta-oe and systemd?
>>
>> meta-oe: yes
>> systemd: only if it is enabled by default, so I don't think so. I can
>> still see /etc/rc[0-5].d, so I think that means Sys V is still in
>> place.
>
>
> meta-oe may have systemd enabled by default, but I'm not sure.  I haven't used it recently enough to know for sure.
>
>>> >  You should have some type of an init in the new filesystem.. if not, then
>>> >  something is wrong with your image and you'll need to diagnose that first.
>>
>> Sounds like I have something amiss with my filesystem.

Just to wrap this up for the sake of future googlers: in my image
recipe, I was doing this:

    inherit image

instead of:

    inherit core-image

I had also omitted task-core-basic from my IMAGE_INSTALL list. I'm not
certain which solved the problem, but /sbin/init definitely now
exists.

Cheers,
Brandon



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: /sbin/init not found in oe-core
  2012-05-30 20:48       ` Brandon Stafford
@ 2012-05-30 21:04         ` Paul Eggleton
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-05-30 21:04 UTC (permalink / raw)
  To: Brandon Stafford; +Cc: openembedded-core

On Wednesday 30 May 2012 16:48:00 Brandon Stafford wrote:
> On Fri, May 25, 2012 at 5:55 PM, Mark Hatle <mark.hatle@windriver.com> 
wrote:
> > On 5/25/12 3:52 PM, Brandon Stafford wrote:
> >> On Fri, May 25, 2012 at 4:30 PM, Mark Hatle<mark.hatle@windriver.com> 
 wrote:
> >>>> >>  Has the boot process changed? What should I be doing instead of
> >>>> >>  calling /sbin/init?
> >>> > 
> >>> >  You should check your new rootfs.  is there anything called init on
> >>> > it, even in a different directory?
> >> 
> >> So far as I can tell, there is no file named init in the filesystem.
> >> 
> >>> >  Are you using meta-oe and systemd?
> >> 
> >> meta-oe: yes
> >> systemd: only if it is enabled by default, so I don't think so. I can
> >> still see /etc/rc[0-5].d, so I think that means Sys V is still in
> >> place.
> > 
> > meta-oe may have systemd enabled by default, but I'm not sure.  I haven't
> > used it recently enough to know for sure.> 
> >>> >  You should have some type of an init in the new filesystem.. if not,
> >>> > then
> >>> >  something is wrong with your image and you'll need to diagnose that
> >>> > first.
> >> 
> >> Sounds like I have something amiss with my filesystem.
> 
> Just to wrap this up for the sake of future googlers: in my image
> recipe, I was doing this:
> 
>     inherit image
> 
> instead of:
> 
>     inherit core-image
> 
> I had also omitted task-core-basic from my IMAGE_INSTALL list. I'm not
> certain which solved the problem, but /sbin/init definitely now
> exists.

Almost certainly the latter rather than the former - inheriting image rather 
than core-image is perfectly OK, but without task-core-basic there's a whole 
heap of things you won't get including task-core-initscripts which includes 
sysvinit.

Sorry you had to go through pain here but glad you solved it in the end :)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-05-30 21:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 20:22 /sbin/init not found in oe-core Brandon Stafford
2012-05-25 20:30 ` Mark Hatle
2012-05-25 20:52   ` Brandon Stafford
2012-05-25 21:55     ` Mark Hatle
2012-05-30 20:48       ` Brandon Stafford
2012-05-30 21:04         ` Paul Eggleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox