Having problems with init
Dallas Clement
dallas.a.clement at gmail.com
Tue Nov 2 19:16:40 UTC 2010
I prefer "...but you didn't run me as PID 1 process. Bad boy". ;^)
But, "init: must be run as PID 1" will be just fine.
Thanks,
Dallas
On Tue, Nov 2, 2010 at 2:10 PM, Denys Vlasenko <vda.linux at googlemail.com> wrote:
> On Tuesday 02 November 2010 19:17, Dallas Clement wrote:
>> Hello again,
>>
>> I found the answer to my own problem. It turns out that 'init' was
>> not reading inittab or running rcS because my PID != 1. So in other
>> words, init needs to be run as the special init process ID 1. I
>> actually already knew that, but never suspected that my PID would not
>> be 1 since I was doing my pivot_root from my initrd / linuxrc script.
>>
>> It turns out that two options *must* be explicitly added to the linux
>> command line for your PID to be 1.
>>
>> You should add root=/dev/ram0 and init=/linuxrc if you want your PID
>> to be 1 and busybox init to work.
>>
>> It would sure be nice if busybox init produced some sort of error
>> message if PID != 1.
>
> But it does produce a message:
>
>> > write(2, "BusyBox v1.15.3 (2010-04-23 20:1"..., 41BusyBox v1.15.3
>> > (2010-04-23 20:10:06 JST)) = 41
>> > write(2, " multi-call binary\n", 19 multi-call binary
>> > ) = 19
>> > write(2, "\nUsage: ", 8
>> > Usage: ) = 8
>> > write(2, "init", 4init) = 4
>> > write(2, " ", 1 ) = 1
>> > write(2, "\n\nInit is the parent of all proc"..., 37
>> >
>> > Init is the parent of all processes) = 37
>> > write(2, "\n\n", 2
>
>
> Just isn't the clearest one, right? The message doesn't say
> "...but you didn't run me as PID 1 process. Bad boy"
>
> How about this fixed behavior? Is it enough? -
>
> # ./busybox init
> init: must be run as PID 1
>
>
> --
> vda
>
More information about the busybox
mailing list