From nobody Thu Oct 20 10:58:13 2022 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MtPhq5pDtz4gW67 for ; Thu, 20 Oct 2022 10:58:19 +0000 (UTC) (envelope-from tsoome@me.com) Received: from mr85p00im-zteg06021901.me.com (mr85p00im-zteg06021901.me.com [17.58.23.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4MtPhp4hZhz3ZrP for ; Thu, 20 Oct 2022 10:58:18 +0000 (UTC) (envelope-from tsoome@me.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1666263497; bh=G2ZQ9+Qbvk6E9joW5ZxtWfK/JvJH9wJ1t4yotGqHaV0=; h=From:Message-Id:Content-Type:Mime-Version:Subject:Date:To; b=1wNUItmnju5828LaL+keBh3FH8Kmz7Lo6DIf0JkRCcO/dK4An3K7MUENUOU+Lj47D Yap6xxuONIxo08cRgN8lpgpPPc6X1bWhP4duZAJksS4dqDX/jtoHCMqalupdGHbyck iUFDpDJRw7h1TkQX0itKRp26qtsiATO9iSmH9uCyjTG1HM1cIVOEdnPtM5n/1UYGWF /4z++PQQH+CqDoKCMlKmOPS9wFhGFnUTH5VW7Kb0MjdPqLbJ5aAeDDLBxVKAoJURKf Ajd/aLRvp3cXsB6nV4fKOMrK4hLedMfJ0FO3snG+YqRlP+klLiC2izi9/5ZnmbV7jR 9mebQ3pfCvg5w== Received: from smtpclient.apple (mr38p00im-dlb-asmtp-mailmevip.me.com [17.57.152.18]) by mr85p00im-zteg06021901.me.com (Postfix) with ESMTPSA id 5E6D874076B; Thu, 20 Oct 2022 10:58:15 +0000 (UTC) From: Toomas Soome Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_DCE11B8E-D7EC-42CC-B3BE-8B6E6778E7DB" List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: loader.efi module path vs kernel directory Date: Thu, 20 Oct 2022 13:58:13 +0300 In-Reply-To: <02e51d32-7585-9a0e-ec41-6f9b198ce625@FreeBSD.org> Cc: Emmanuel Vadot , FreeBSD Current To: Andriy Gapon References: <20221020120809.f3a21c9a5c33a2ba440ddc01@bidouilliste.com> <31145ADA-5932-4858-B3F8-E21CA3F0721B@me.com> <02e51d32-7585-9a0e-ec41-6f9b198ce625@FreeBSD.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Proofpoint-ORIG-GUID: iKpSkiZTC5HPXLe0IKdczcQIqM-5LPVl X-Proofpoint-GUID: iKpSkiZTC5HPXLe0IKdczcQIqM-5LPVl X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.138,18.0.572,17.11.62.513.0000000_definitions?= =?UTF-8?Q?=3D2020-02-14=5F11:2020-02-14=5F02,2020-02-14=5F11,2021-12-02?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 phishscore=0 bulkscore=0 malwarescore=0 mlxscore=0 spamscore=0 suspectscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210200065 X-Rspamd-Queue-Id: 4MtPhp4hZhz3ZrP X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=me.com header.s=1a1hai header.b=1wNUItmn; dmarc=pass (policy=quarantine) header.from=me.com; spf=pass (mx1.freebsd.org: domain of tsoome@me.com designates 17.58.23.194 as permitted sender) smtp.mailfrom=tsoome@me.com X-Spamd-Result: default: False [-3.60 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[me.com,quarantine]; MV_CASE(0.50)[]; R_DKIM_ALLOW(-0.20)[me.com:s=1a1hai]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[17.58.23.194:from]; FREEFALL_USER(0.00)[tsoome]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[current@freebsd.org]; RCPT_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; DWL_DNSWL_NONE(0.00)[me.com:dkim]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[me.com:+]; TO_DN_ALL(0.00)[]; FREEMAIL_FROM(0.00)[me.com]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[me.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:714, ipnet:17.58.16.0/20, country:US]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_DCE11B8E-D7EC-42CC-B3BE-8B6E6778E7DB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 the problem with =E2=80=98?=E2=80=99 command is that it only does list = commands written in C, it does not list scripted commands. cli_lua(8) = should list lua specific ones. And at least my stable/13 branch does = seem to confirm, enable-module, disable-module, toggle-module and = show-module-options should be present (defined in /boot/lua/cli.lua). I = am also pretty sure, Kyle did add those when 13 was current, lua version = was missing those, Forth version had them first:) rgds, toomas > On 20. Oct 2022, at 13:27, Andriy Gapon wrote: >=20 > On 20/10/2022 13:20, Toomas Soome wrote: >> Also, instead of manual load, you may want to use enable-module. >=20 > Emmanuel, Toomas, >=20 > thank you very much for the suggestions. >=20 > It seems like my installation may be messed up or outdated somehow, = see below (and sorry about those ^M-s). I do not seem to have boot-conf = or *-module commands. >=20 > I checked that the EFI partition has exactly the same loader.efi as in = /boot, but maybe some other files (configuration?) are outdated. > Also, forgot to mention, this is with stable/13, not main / current. >=20 > OK ?^M > Available commands:^M > copy_staging copy staging^M > staging_slop set staging slop^M > efi-autoresizeconEFI Auto-resize Console^M > gop graphics output protocol^M > uga universal graphics adapter^M > efi-seed-entropy try to get entropy from the EFI RNG^M > poweroff power off the system^M > reboot reboot the system^M > quit exit the loader^M > memmap print memory map^M > configuration print configuration tables^M > mode change or display EFI text modes^M > lsefi list EFI handles^M > chain chain load file^M > netserver change or display netserver URI^M > loadfont load console font from file^M > grab_faults grab faults^M > ungrab_faults ungrab faults^M > fault generate fault^M > boot boot a file or loaded kernel^M > autoboot boot automatically after a delay^M > help detailed help^M > ? list commands^M > show show variable(s)^M > set set a variable^M > unset unset a variable^M > echo echo arguments^M > read read input from the terminal^M > more show contents of a file^M > lsdev list all devices^M > readtest Time a file read^M > include read commands from a file^M > ls list files^M > load load a kernel or module^M > unload unload all modules^M > lsmod list loaded modules^M > pnpmatch list matched modules based on pnpinfo^M > pnpload load matched modules based on pnpinfo^M > pnpautoload auto load modules based on pnpinfo^M > nvstore manage non-volatile data^M > map-vdisk map file as virtual disk^M > unmap-vdisk unmap virtual disk^M > bcachestat get disk block cache stats^M > lszfs list child datasets of a zfs dataset^M > reloadbe refresh the list of ZFS Boot Environments^M > efi-show print some or all EFI variables^M > efi-set set EFI variables^M > efi-unset delete / unset EFI variables^M >=20 >> Sent from my iPhone >>> On 20. Oct 2022, at 13:08, Emmanuel Vadot = wrote: >>>=20 >>> =EF=BB=BFOn Thu, 20 Oct 2022 13:03:26 +0300 >>> Andriy Gapon wrote: >>>=20 >>>>=20 >>>> I recently needed to recover a system by manually preloading a = driver. >>>> To a bit of surprise, simple 'load $modname' did not work, I had to = use 'load >>>> /boot/kernel/$modname.ko'. I didn't have to do this in a long = time, but I >>>> recall that the short command used to work. Additionally, required = modules also >>>> failed to get loaded automatically because loader couldn't find = them. >>>>=20 >>>> I am not sure what the issue is. Is it that /boot/kernel is not in = module path >>>> (as per /boot/defaults/loader.conf) ? Or is it that /boot/kernel = does not get >>>> added to the *effective* module path? >>>>=20 >>>> Thanks! >>>> --=20 >>>> Andriy Gapon >>>>=20 >>>=20 >>> if you escape to prompt directly loader didn't loaded all it's = config >>> so there is no modulepath defined, you need to 'boot-conf' to load = the >>> configuration files. >>>=20 >>> Cheers, >>>=20 >>> --=20 >>> Emmanuel Vadot >>>=20 >=20 > --=20 > Andriy Gapon --Apple-Mail=_DCE11B8E-D7EC-42CC-B3BE-8B6E6778E7DB Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

the problem with =E2=80=98?=E2=80=99 = command is that it only does list commands written in C, it does not = list scripted commands. cli_lua(8) should list lua specific ones. And at = least my stable/13 branch does seem to confirm, enable-module, = disable-module, toggle-module and show-module-options should be present = (defined in /boot/lua/cli.lua). I am also pretty sure, Kyle did add = those when 13 was current, lua version was missing those, Forth version = had them first:)

rgds,
toomas

On 20. = Oct 2022, at 13:27, Andriy Gapon <avg@FreeBSD.org> wrote:

On 20/10/2022 13:20, Toomas Soome wrote:
Also, = instead of manual load, you may want to use enable-module.

Emmanuel, Toomas,

thank you very much for the suggestions.

It seems like = my installation may be messed up or outdated somehow, see below (and = sorry about those ^M-s).  I do not seem to have boot-conf or = *-module commands.

I checked that the EFI partition has exactly the same = loader.efi as in /boot, but maybe some other files (configuration?) are = outdated.
Also, forgot = to mention, this is with stable/13, not main / current.

OK = ?^M
Available = commands:^M
 copy_staging     copy = staging^M
 staging_slop     set staging = slop^M
 efi-autoresizeconEFI Auto-resize Console^M
 gop =             &n= bsp;graphics output protocol^M
 uga =             &n= bsp;universal graphics adapter^M
 efi-seed-entropy try to get entropy from the EFI = RNG^M
 poweroff =         power off the = system^M
 reboot =           reboot the = system^M
 quit =             ex= it the loader^M
 memmap =           print memory = map^M
 configuration    print configuration = tables^M
 mode =             ch= ange or display EFI text modes^M
 lsefi =            list = EFI handles^M
 chain =            chain = load file^M
 netserver=        change or display netserver = URI^M
 loadfont =         load console font from = file^M
 grab_faults      grab = faults^M
 ungrab_faults    ungrab = faults^M
 fault =            generate= fault^M
 boot =             bo= ot a file or loaded kernel^M
 autoboot =         boot automatically after = a delay^M
 help =             de= tailed help^M
 ? =             &n= bsp;  list commands^M
 show =             sh= ow variable(s)^M
 set =             &n= bsp;set a variable^M
 unset =            unset = a variable^M
 echo =             ec= ho arguments^M
 read =             re= ad input from the terminal^M
 more =             sh= ow contents of a file^M
 lsdev =            list = all devices^M
 readtest =         Time a file = read^M
 include =          read commands from = a file^M
 ls =             &n= bsp; list files^M
 load =             lo= ad a kernel or module^M
 unload =           unload all = modules^M
 lsmod =            list = loaded modules^M
 pnpmatch =         list matched modules = based on pnpinfo^M
 pnpload =          load matched = modules based on pnpinfo^M
 pnpautoload      auto load = modules based on pnpinfo^M
 nvstore =          manage = non-volatile data^M
 map-vdisk        map = file as virtual disk^M
 unmap-vdisk      unmap virtual = disk^M
 bcachestat       get disk = block cache stats^M
 lszfs =            list = child datasets of a zfs dataset^M
 reloadbe =         refresh the list of ZFS = Boot Environments^M
 efi-show =         print some or all EFI = variables^M
 efi-set =          set EFI = variables^M
 efi-unset=        delete / unset EFI = variables^M

Sent = from my iPhone
On 20. = Oct 2022, at 13:08, Emmanuel Vadot <manu@bidouilliste.com> wrote:

=EF=BB=BFOn Thu, 20 Oct 2022 13:03:26 +0300
Andriy Gapon <avg@FreeBSD.org> wrote:


I = recently needed to recover a system by manually preloading a driver.
To a bit of surprise, simple 'load $modname' did not work, I = had to use 'load
/boot/kernel/$modname.ko'.  I didn't = have to do this in a long time, but I
recall that the = short command used to work.  Additionally, required modules also
failed to get loaded automatically because loader couldn't = find them.

I am not sure what the issue is. =  Is it that /boot/kernel is not in module path
(as = per /boot/defaults/loader.conf) ? Or is it that /boot/kernel does not = get
added to the *effective* module path?

Thanks!
-- 
Andriy = Gapon


if you = escape to prompt directly loader didn't loaded all it's config
so there is no modulepath defined, you need to 'boot-conf' to = load the
configuration files.

Cheers,

-- 
Emmanuel = Vadot <manu@bidouilliste.com> <manu@FreeBSD.org>


-- 
Andriy = Gapon

= --Apple-Mail=_DCE11B8E-D7EC-42CC-B3BE-8B6E6778E7DB--