Re: Why is /sbin/init dynamically linked?

Warner Losh <[email protected]>
Newsgroups gmane.os.freebsd.devel.hackers
Message-ID <CANCZdfo811E9ucfxkhpd2xzt+NWm_a9hoHDwp7XXPgpU=ifDXQ@mail.gmail.com>
On Fri, Aug 21, 2026 at 9:46 AM Bakul Shah <[email protected]> wrote:

> I was surprised to see this:
>
> $ ldd /sbin/init
> /sbin/init:
>         libutil.so.10 => /lib/libutil.so.10 (0x3f6d9f550000)
>         libcrypt.so.5 => /lib/libcrypt.so.5 (0x3f6d9f669000)
>         libc.so.7 => /lib/libc.so.7 (0x3f6da0c00000)
>         libmd.so.7 => /lib/libmd.so.7 (0x3f6da01b6000)
>         libsys.so.7 => /lib/libsys.so.7 (0x3f6da3370000)
>
> Why was this change made? [Seems to be after 15.1-release]
>
> When one of these libraries breaks, you can't even boot
> single user. In this case why even bother with /rescue.
>
> [Discovered this when init crashed for someone]
>

 /rescue/init is statically linked still, and you can
set kern.init_path=/rescue/init at the OK prompt. Though it's tried last if
all the other paths fail.

Warner
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.