NetBSD Problem Report #56920

From www@netbsd.org  Sun Jul 10 20:44:09 2022
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 6AA191A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 10 Jul 2022 20:44:09 +0000 (UTC)
Message-Id: <20220710204408.7A5D81A9239@mollari.NetBSD.org>
Date: Sun, 10 Jul 2022 20:44:08 +0000 (UTC)
From: ham@2pi.dk
Reply-To: ham@2pi.dk
To: gnats-bugs@NetBSD.org
Subject: iscsid can't load /usr/lib/libisns.so.0 before /usr is mounted
X-Send-Pr-Version: www-1.0

>Number:         56920
>Category:       bin
>Synopsis:       iscsid can't load /usr/lib/libisns.so.0 before /usr is mounted
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 10 20:45:00 +0000 2022
>Originator:     Jakob Stoklund Olesen
>Release:        9.2
>Organization:
>Environment:
NetBSD sunblade.home.2pi.dk 9.2 NetBSD 9.2 (GENERIC) #0: Wed May 12 13:15:55 UTC 2021  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/sparc64/compile/GENERIC sparc64

>Description:
I am trying to mount /usr from an iSCSI partition during boot using iscsid+iscsictl.

I set "iscsid=YES" in /etc/rc.conf, but iscsid fails to run because it needs to link against /usr/lib/libisns.so.0 which is not available until /usr has been mounted.

Are programs in /sbin supposed to be able to run without /usr present? If so, the libisns files should probably be moved from /usr/lib to /lib.

I can work around the problem by copying /usr/lib/libisns* to /lib/:

sunblade$ ldd /sbin/iscsid
/sbin/iscsid:
        -lpthread.1 => /lib/libpthread.so.1
        -lc.12 => /lib/libc.so.12
        -lisns.0 => /lib/libisns.so.0
        -lutil.7 => /lib/libutil.so.7

With this fix, I am able to mount /usr from iSCSI before mountcritremote during the boot process.

>How-To-Repeat:
1. Set "iscsid=YES" in /etc/rc.conf.
2. Move /usr out of the way so it isn't available until mountcritremote
3. Reboot

There will be an error from /etc/rc.d/iscsid because /sbin/iscsid can't be executed.

>Fix:
Install /usr/lib/libisns* in /lib instead of /usr/lib.
Alternatively, link this library statically into iscsid.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.