~alpine/devel

1

Failed to execute /init (error -13)

kok leong soo <kokleong98@gmail.com>
Details
Message ID
<CAKm4L5+-UqegS_mAZ=KvqyP_TLzGGMCQWak+s1zChsXZxKsJrg@mail.gmail.com>
DKIM signature
missing
Download raw message
Hi all,
I'm stuck on this error Failed to execute /init (error -13) when i'm trying
to create a custom pxe boot using chroot method.
I have verified that the file existed in the image and boot using the
following kernel option in my ipxe script.

kernel tftp://192.168.1.80/linux initrd=initrd.gz vga=788
initrd tftp://192.168.1.80/initrd.gz

Can anyone advise what might have happened?

Thanks.
Details
Message ID
<1807823.gzgkiQsVPL@localhost>
In-Reply-To
<CAKm4L5+-UqegS_mAZ=KvqyP_TLzGGMCQWak+s1zChsXZxKsJrg@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
On Sunday, June 14, 2020 12:25:56 AM MDT kok leong soo wrote:
> Hi all,
> I'm stuck on this error Failed to execute /init (error -13) when i'm trying
> to create a custom pxe boot using chroot method.
> I have verified that the file existed in the image and boot using the
> following kernel option in my ipxe script.
> 
> kernel tftp://192.168.1.80/linux initrd=initrd.gz vga=788
> initrd tftp://192.168.1.80/initrd.gz
> 
> Can anyone advise what might have happened?
> 
> Thanks.

The way the kernel handles launching the init process is, unfortunately, not 
very transparent when it fails.

In the error message, errno -13 means "permission denied."  This means your 
initrd either does not have the correct permission on /init itself, or 
Alpine's ELF interpreter (provided by musl) lacks correct permissions.  Check 
the permissions on /lib/ld-musl-x86_64.so.1 as well.  If you are using a 
different architecture than x86_64, the ELF interpreter path will be slightly 
different, but you should be able to find it in the initramfs.  It should be 
present and executable.

Once you fix these two problems, your initrd image should work correctly.

Ariadne
Reply to thread Export thread (mbox)