Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 928061

Summary: Build livecd's /sbin/init statically
Product: Gentoo Release Media Reporter: Étienne Buira <etienne.buira>
Component: LiveCD/DVD/USBAssignee: Gentoo Release Team <releng>
Status: RESOLVED INVALID    
Severity: enhancement CC: etienne.buira, floppym
Priority: Normal    
Version: unspecified   
Hardware: ARM64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Étienne Buira 2024-03-28 16:32:23 UTC
Hi,

I have a board that has highly specific boot process.
I managed to get the chain working up to boot a kernel, but now (on the unsquashed minimal install cd fs), it won't execute /sbin/init because it is not a static executable.

It would be really nice to have it static. Would it be complicated?

Reproducible: Always
Comment 1 Mike Gilbert gentoo-dev 2024-03-28 17:48:12 UTC
I think you need to provide a more thorough explanation for why you need init to be static.
Comment 2 Étienne Buira 2024-03-28 18:48:03 UTC
(In reply to Mike Gilbert from comment #1)
> I think you need to provide a more thorough explanation for why you need
> init to be static.

That would make the install cd usable even if another kernel (possibly patched) is needed to boot.
Comment 3 Mike Gilbert gentoo-dev 2024-03-28 18:55:30 UTC
Sorry, but that makes no sense.
Comment 4 Étienne Buira 2024-03-28 19:18:38 UTC
It does actually, as having a minimal install rootfs, also usable by a different kernel, breaks the chicken-and-egg problem of having a suitable rootfs to build an installation.
Comment 5 Mike Gilbert gentoo-dev 2024-03-28 19:25:11 UTC
Are you using a kernel that is incapable of running a dynamically linked binary?
Comment 6 Matt Turner gentoo-dev 2024-03-28 19:44:18 UTC
(In reply to Étienne Buira from comment #2)
> (In reply to Mike Gilbert from comment #1)
> > I think you need to provide a more thorough explanation for why you need
> > init to be static.
> 
> That would make the install cd usable even if another kernel (possibly
> patched) is needed to boot.

We understand that you're saying that it's necessary to make the system boot.

But we don't understand why that is. Why does /sbin/init need to be static for your custom kernel to use it?
Comment 7 Étienne Buira 2024-03-28 20:42:15 UTC
Sorry, i shall resolve the errno before filing a bug.
This were due to missing permissions while i always thought it was mandatory for init to be static.