Mailing List Archive

/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
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
Re: /sbin/init don't work [ In reply to ]
On Thu, Dec 23, 2010 at 1:31 AM, David Ford <david@blue-labs.org> 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
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
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.
Re: /sbin/init don't work [ In reply to ]
On Thu, Dec 23, 2010 at 11:52 AM, Arkadi Shishlov <arkadi.shishlov@gmail.com
> 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
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@gmail.com
> 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).
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
Re: /sbin/init don't work [ In reply to ]
On Thu, Dec 23, 2010 at 1:57 PM, Peter Stuge <peter@stuge.se> 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