Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: Embedded

/sbin/init don't work

 

 

Gentoo embedded RSS feed   Index | Next | Previous | View Threaded


lavi.kfir at gmail

Dec 22, 2010, 10:41 AM

Post #1 of 9 (851 views)
Permalink
/sbin/init don't work

Hi,
I have created a small cross filesystem.
I have /sbin/init but the kernel is stuck in:
Freeing unused kernel memory: 284k freed

I created a init script for testing and this init script work.
Why this /sbin/init don't work for me.

I'm using baselayout 2 and openrc.

Thanks,
Kfir


david at blue-labs

Dec 22, 2010, 3:31 PM

Post #2 of 9 (831 views)
Permalink
Re: /sbin/init don't work [In reply to]

does /dev/console exist? is /sbin/init statically compiled? if it's a
shell script, does /bin/sh (or /bin/bash etc) exist?

On 12/22/2010 01:41 PM, Kfir Lavi wrote:
> Hi,
> I have created a small cross filesystem.
> I have /sbin/init but the kernel is stuck in:
> Freeing unused kernel memory: 284k freed
>
> I created a init script for testing and this init script work.
> Why this /sbin/init don't work for me.
>
> I'm using baselayout 2 and openrc.
>
> Thanks,
> Kfir


lavi.kfir at gmail

Dec 23, 2010, 12:38 AM

Post #3 of 9 (829 views)
Permalink
Re: /sbin/init don't work [In reply to]

On Thu, Dec 23, 2010 at 1:31 AM, David Ford <david [at] blue-labs> wrote:

> does /dev/console exist? is /sbin/init statically compiled? if it's a
> shell script, does /bin/sh (or /bin/bash etc) exist?
>
> On 12/22/2010 01:41 PM, Kfir Lavi wrote:
> > Hi,
> > I have created a small cross filesystem.
> > I have /sbin/init but the kernel is stuck in:
> > Freeing unused kernel memory: 284k freed
> >
> > I created a init script for testing and this init script work.
> > Why this /sbin/init don't work for me.
> >
> > I'm using baselayout 2 and openrc.
> >
> > Thanks,
> > Kfir
>
> Hi David,
Thanks for your replay.
I have bash, so if I run bash from the script bash will open a session.
I did a compilation of /sbin/init statically.
I don't have /dev/console, because udev didn't kickstart. My /dev is empty.
Maybe this is the problem. :-P
Is there a gentoo article that describe the must for loading a system?

Regards,
Kfir


eng1 at koblersystems

Dec 23, 2010, 1:31 AM

Post #4 of 9 (825 views)
Permalink
Re: /sbin/init don't work [In reply to]

Hi,

this is how I have set up the root file system
http://en.gentoo-wiki.com/wiki/Phytec_phyCORE-iMX35/Gentoo/Desktop#Prepare_target_root_file_system

Because /dev/console was missing I have created it with:
mknod ${ROOT}/dev/console c 5 1

This worked for me. If there is a better way to do it, let me know.

Best regards

Jan


arkadi.shishlov at gmail

Dec 23, 2010, 1:52 AM

Post #5 of 9 (826 views)
Permalink
Re: /sbin/init don't work [In reply to]

On 12/23/10 10:38, Kfir Lavi wrote:
> I don't have /dev/console, because udev didn't kickstart. My /dev is empty.
> Maybe this is the problem. :-P
> Is there a gentoo article that describe the must for loading a system?

Not Gentoo specific and you must have /dev/console. Also /dev/null, /dev/zero
and /dev/tty* or many programs will fail.


lavi.kfir at gmail

Dec 23, 2010, 2:22 AM

Post #6 of 9 (825 views)
Permalink
Re: /sbin/init don't work [In reply to]

On Thu, Dec 23, 2010 at 11:52 AM, Arkadi Shishlov <arkadi.shishlov [at] gmail
> wrote:

> On 12/23/10 10:38, Kfir Lavi wrote:
> > I don't have /dev/console, because udev didn't kickstart. My /dev is
> empty.
> > Maybe this is the problem. :-P
> > Is there a gentoo article that describe the must for loading a system?
>
> Not Gentoo specific and you must have /dev/console. Also /dev/null,
> /dev/zero
> and /dev/tty* or many programs will fail.
>
> I remember that back then we had a script that would run and populate /dev.
Is it possible to use it just to make things faster for me?

Tnx,
Kfir


arkadi.shishlov at gmail

Dec 23, 2010, 3:11 AM

Post #7 of 9 (833 views)
Permalink
Re: /sbin/init don't work [In reply to]

On 12/23/10 12:22, Kfir Lavi wrote:
> On Thu, Dec 23, 2010 at 11:52 AM, Arkadi Shishlov <arkadi.shishlov [at] gmail
> Not Gentoo specific and you must have /dev/console. Also /dev/null, /dev/zero
> and /dev/tty* or many programs will fail.
>
> I remember that back then we had a script that would run and populate /dev.
> Is it possible to use it just to make things faster for me?

Sure. But you can't start init/pid[1] without /dev/console.
Just put whatever you need in static /dev (in case device hotplug is not required).


peter at stuge

Dec 23, 2010, 3:57 AM

Post #8 of 9 (831 views)
Permalink
Re: /sbin/init don't work [In reply to]

Kfir Lavi wrote:
> Is it possible to use it just to make things faster for me?

I think you should just take five minutes and learn a bit about
device nodes.


//Peter


lavi.kfir at gmail

Dec 26, 2010, 7:27 AM

Post #9 of 9 (820 views)
Permalink
Re: /sbin/init don't work [In reply to]

On Thu, Dec 23, 2010 at 1:57 PM, Peter Stuge <peter [at] stuge> wrote:

> Kfir Lavi wrote:
> > Is it possible to use it just to make things faster for me?
>
> I think you should just take five minutes and learn a bit about
> device nodes.
>
>
> //Peter
>
> Hi,
I solved it by copying the device nodes I need from the mother system.

Kfir

Gentoo embedded RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.