Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Embedded (http://www.linux-archive.org/gentoo-embedded/)
-   -   /sbin/init don't work (http://www.linux-archive.org/gentoo-embedded/468534-sbin-init-dont-work.html)

Kfir Lavi 12-22-2010 05:41 PM

/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 Ford 12-22-2010 10:31 PM

/sbin/init don't work
 
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

Kfir Lavi 12-23-2010 07:38 AM

/sbin/init don't work
 
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

Jan Kobler 12-23-2010 08:31 AM

/sbin/init don't work
 
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 12-23-2010 08:52 AM

/sbin/init don't work
 
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.

Kfir Lavi 12-23-2010 09:22 AM

/sbin/init don't work
 
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

Arkadi Shishlov 12-23-2010 10:11 AM

/sbin/init don't work
 
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).

Peter Stuge 12-23-2010 10:57 AM

/sbin/init don't work
 
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

Kfir Lavi 12-26-2010 02:27 PM

/sbin/init don't work
 
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


All times are GMT. The time now is 03:32 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.