All of lore.kernel.org
 help / color / mirror / Atom feed
* Init error NFS booting a Fedora 13 file system
@ 2011-05-13 16:06 Erlon Cruz
  2011-05-13 17:20 ` chris at basementcode.com
  0 siblings, 1 reply; 7+ messages in thread
From: Erlon Cruz @ 2011-05-13 16:06 UTC (permalink / raw)
  To: kernelnewbies

Hi all,
? ? Im having the?following?problem to configure a diskless client.
Everything seens to be OK. The client finds the kernel, loads the
parameters, mount the NFS remote dir, but still cant find init.
The error I get is:

run-init: /sbin/init: No such file or directory
Kernel Panic - not syncing: Attempted to kill init!
Pid: 1 , comm: run-init Not tainted

I know the the file system can find /sbin/init because I compiled a
small hello World program and compiled statically and it runs
normally.
 The question is: How can a make the real init run dynamically linked
or how can I compile it statically?


Kind regards,
Erlon

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

* Init error NFS booting a Fedora 13 file system
  2011-05-13 16:06 Init error NFS booting a Fedora 13 file system Erlon Cruz
@ 2011-05-13 17:20 ` chris at basementcode.com
  2011-05-13 17:45   ` Erlon Cruz
  0 siblings, 1 reply; 7+ messages in thread
From: chris at basementcode.com @ 2011-05-13 17:20 UTC (permalink / raw)
  To: kernelnewbies

 On Fri, 13 May 2011 13:06:40 -0300, Erlon Cruz <sombrafam@gmail.com> 
 wrote:
> Hi all,
> ? ? Im having the?following?problem to configure a diskless client.
> Everything seens to be OK. The client finds the kernel, loads the
> parameters, mount the NFS remote dir, but still cant find init.
> The error I get is:
>
> run-init: /sbin/init: No such file or directory
> Kernel Panic - not syncing: Attempted to kill init!
> Pid: 1 , comm: run-init Not tainted
>
> I know the the file system can find /sbin/init because I compiled a
> small hello World program and compiled statically and it runs
> normally.
>  The question is: How can a make the real init run dynamically linked
> or how can I compile it statically?
>
>
> Kind regards,
> Erlon
>

 You can get a statically linked init program using buildroot to build 
 busybox. Buildroot has a "build statically" option.
 I had that problem once, I solved it by booting a local filesystem that 
 I knew worked, then I chrooted into the filesystem I was debugging and 
 ran init manually. Turns out it was an "Illegal instruction" exception 
 because I used a compiler with the wrong abi....

 So basically, if you can, boot the system by whatever other means, then 
 use the chroot command on your manually mounted NFS.

 Hope that helps,
 -Chris

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

* Init error NFS booting a Fedora 13 file system
  2011-05-13 17:20 ` chris at basementcode.com
@ 2011-05-13 17:45   ` Erlon Cruz
  2011-05-13 17:58     ` Erlon Cruz
  0 siblings, 1 reply; 7+ messages in thread
From: Erlon Cruz @ 2011-05-13 17:45 UTC (permalink / raw)
  To: kernelnewbies

Well, acctually Im trying to use this netboot client in a virtual
machine for kernel developing purposes. I thing this seemsto be a bit
complicated. :/

On Fri, May 13, 2011 at 2:20 PM,  <chris@basementcode.com> wrote:
> On Fri, 13 May 2011 13:06:40 -0300, Erlon Cruz <sombrafam@gmail.com> wrote:
>>
>> Hi all,
>> ? ? Im having the?following?problem to configure a diskless client.
>> Everything seens to be OK. The client finds the kernel, loads the
>> parameters, mount the NFS remote dir, but still cant find init.
>> The error I get is:
>>
>> run-init: /sbin/init: No such file or directory
>> Kernel Panic - not syncing: Attempted to kill init!
>> Pid: 1 , comm: run-init Not tainted
>>
>> I know the the file system can find /sbin/init because I compiled a
>> small hello World program and compiled statically and it runs
>> normally.
>> ?The question is: How can a make the real init run dynamically linked
>> or how can I compile it statically?
>>
>>
>> Kind regards,
>> Erlon
>>
>
> You can get a statically linked init program using buildroot to build
> busybox. Buildroot has a "build statically" option.
> I had that problem once, I solved it by booting a local filesystem that I
> knew worked, then I chrooted into the filesystem I was debugging and ran
> init manually. Turns out it was an "Illegal instruction" exception because I
> used a compiler with the wrong abi....
>
> So basically, if you can, boot the system by whatever other means, then use
> the chroot command on your manually mounted NFS.
>
> Hope that helps,
> -Chris
>

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

* Init error NFS booting a Fedora 13 file system
  2011-05-13 17:45   ` Erlon Cruz
@ 2011-05-13 17:58     ` Erlon Cruz
  2011-05-13 19:14       ` Christopher Harvey
  0 siblings, 1 reply; 7+ messages in thread
From: Erlon Cruz @ 2011-05-13 17:58 UTC (permalink / raw)
  To: kernelnewbies

By the way this ( mount the system and then chrooting) is what I
happen with initramfs ins't? It must be some way to change the root
from the ramfs to the new root fs without setting the paths to 'init'
s required libraries. Makes sense?

On Fri, May 13, 2011 at 2:45 PM, Erlon Cruz <sombrafam@gmail.com> wrote:
> Well, acctually Im trying to use this netboot client in a virtual
> machine for kernel developing purposes. I thing this seemsto be a bit
> complicated. :/
>
> On Fri, May 13, 2011 at 2:20 PM, ?<chris@basementcode.com> wrote:
>> On Fri, 13 May 2011 13:06:40 -0300, Erlon Cruz <sombrafam@gmail.com> wrote:
>>>
>>> Hi all,
>>> ? ? Im having the?following?problem to configure a diskless client.
>>> Everything seens to be OK. The client finds the kernel, loads the
>>> parameters, mount the NFS remote dir, but still cant find init.
>>> The error I get is:
>>>
>>> run-init: /sbin/init: No such file or directory
>>> Kernel Panic - not syncing: Attempted to kill init!
>>> Pid: 1 , comm: run-init Not tainted
>>>
>>> I know the the file system can find /sbin/init because I compiled a
>>> small hello World program and compiled statically and it runs
>>> normally.
>>> ?The question is: How can a make the real init run dynamically linked
>>> or how can I compile it statically?
>>>
>>>
>>> Kind regards,
>>> Erlon
>>>
>>
>> You can get a statically linked init program using buildroot to build
>> busybox. Buildroot has a "build statically" option.
>> I had that problem once, I solved it by booting a local filesystem that I
>> knew worked, then I chrooted into the filesystem I was debugging and ran
>> init manually. Turns out it was an "Illegal instruction" exception because I
>> used a compiler with the wrong abi....
>>
>> So basically, if you can, boot the system by whatever other means, then use
>> the chroot command on your manually mounted NFS.
>>
>> Hope that helps,
>> -Chris
>>
>

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

* Init error NFS booting a Fedora 13 file system
  2011-05-13 17:58     ` Erlon Cruz
@ 2011-05-13 19:14       ` Christopher Harvey
  2011-05-16 19:18         ` Erlon Cruz
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher Harvey @ 2011-05-13 19:14 UTC (permalink / raw)
  To: kernelnewbies

 On Fri, 13 May 2011 14:58:31 -0300, Erlon Cruz <sombrafam@gmail.com> 
 wrote:
> By the way this ( mount the system and then chrooting) is what I
> happen with initramfs ins't? It must be some way to change the root
> from the ramfs to the new root fs without setting the paths to 'init'
> s required libraries. Makes sense?

 I can't understand this part:
 "without setting the paths to 'init's required libraries"

 you mean the LD_LIBRARY_PATH?

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

* Init error NFS booting a Fedora 13 file system
  2011-05-13 19:14       ` Christopher Harvey
@ 2011-05-16 19:18         ` Erlon Cruz
  2011-05-16 19:26           ` Christopher Harvey
  0 siblings, 1 reply; 7+ messages in thread
From: Erlon Cruz @ 2011-05-16 19:18 UTC (permalink / raw)
  To: kernelnewbies

> you mean the LD_LIBRARY_PATH?

Yes, I thing that what might  be happening is that when the system is
in initramfs, LD_LIBRARY_PATH is not set so the system cant execute
the dynamically linked init. I this config you said you did do you had
to set any configuration (so set something) after or before chrooting?

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

* Init error NFS booting a Fedora 13 file system
  2011-05-16 19:18         ` Erlon Cruz
@ 2011-05-16 19:26           ` Christopher Harvey
  0 siblings, 0 replies; 7+ messages in thread
From: Christopher Harvey @ 2011-05-16 19:26 UTC (permalink / raw)
  To: kernelnewbies

 On Mon, 16 May 2011 16:18:23 -0300, Erlon Cruz <sombrafam@gmail.com> 
 wrote:
>> you mean the LD_LIBRARY_PATH?
>
> Yes, I thing that what might  be happening is that when the system is
> in initramfs, LD_LIBRARY_PATH is not set so the system cant execute
> the dynamically linked init. I this config you said you did do you 
> had
> to set any configuration (so set something) after or before 
> chrooting?
>
 If you have a properly setup file system (eg, libraries in /usr/lib and 
 /lib) then you shouldn't need to set and LD_LIBRARY_PATHS during boot or 
 after a chroot. If the chroot gives you errors with regards to 
 libraries, then you've found your problem, otherwise the problem is 
 elsewhere (and the error messages given from trying to run init from a 
 chrooted environment will probably help you).

 I hope that was the original question, you erased the text form the 
 beginning of the email.

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

end of thread, other threads:[~2011-05-16 19:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-13 16:06 Init error NFS booting a Fedora 13 file system Erlon Cruz
2011-05-13 17:20 ` chris at basementcode.com
2011-05-13 17:45   ` Erlon Cruz
2011-05-13 17:58     ` Erlon Cruz
2011-05-13 19:14       ` Christopher Harvey
2011-05-16 19:18         ` Erlon Cruz
2011-05-16 19:26           ` Christopher Harvey

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.