loader.efi module path vs kernel directory

2022-10-20 Thread Andriy Gapon



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



Re: loader.efi module path vs kernel directory

2022-10-20 Thread Emmanuel Vadot
On Thu, 20 Oct 2022 13:03:26 +0300
Andriy Gapon  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  



Re: loader.efi module path vs kernel directory

2022-10-20 Thread Toomas Soome
Also, instead of manual load, you may want to use enable-module.

Sent from my iPhone

> On 20. Oct 2022, at 13:08, Emmanuel Vadot  wrote:
> 
> On Thu, 20 Oct 2022 13:03:26 +0300
> Andriy Gapon  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  
> 



Re: loader.efi module path vs kernel directory

2022-10-20 Thread Andriy Gapon

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  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
  configurationprint configuration tables^M
  mode change or display EFI text modes^M
  lsefilist EFI handles^M
  chainchain load file^M
  netserverchange or display netserver URI^M
  loadfont load console font from file^M
  grab_faults  grab faults^M
  ungrab_faultsungrab faults^M
  faultgenerate 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
  unsetunset a variable^M
  echo echo arguments^M
  read read input from the terminal^M
  more show contents of a file^M
  lsdevlist 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
  lsmodlist 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-vdiskmap file as virtual disk^M
  unmap-vdisk  unmap virtual disk^M
  bcachestat   get disk block cache stats^M
  lszfslist 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-unsetdelete / unset EFI variables^M



Sent from my iPhone


On 20. Oct 2022, at 13:08, Emmanuel Vadot  wrote:

On Thu, 20 Oct 2022 13:03:26 +0300
Andriy Gapon  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  



--
Andriy Gapon




Re: loader.efi module path vs kernel directory

2022-10-20 Thread Toomas Soome

the problem with ‘?’ 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:
> 
> 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  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
>  configurationprint configuration tables^M
>  mode change or display EFI text modes^M
>  lsefilist EFI handles^M
>  chainchain load file^M
>  netserverchange or display netserver URI^M
>  loadfont load console font from file^M
>  grab_faults  grab faults^M
>  ungrab_faultsungrab faults^M
>  faultgenerate 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
>  unsetunset a variable^M
>  echo echo arguments^M
>  read read input from the terminal^M
>  more show contents of a file^M
>  lsdevlist 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
>  lsmodlist 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-vdiskmap file as virtual disk^M
>  unmap-vdisk  unmap virtual disk^M
>  bcachestat   get disk block cache stats^M
>  lszfslist 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-unsetdelete / unset EFI variables^M
> 
>> Sent from my iPhone
>>> On 20. Oct 2022, at 13:08, Emmanuel Vadot  wrote:
>>> 
>>> On Thu, 20 Oct 2022 13:03:26 +0300
>>> Andriy Gapon  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  
>>> 
> 
> -- 
> Andriy Gapon



Re: loader.efi module path vs kernel directory

2022-10-20 Thread Toomas Soome
Whoops, meant cli.lua(8), of course.

> On 20. Oct 2022, at 13:58, Toomas Soome  wrote:
> 
> 
> the problem with ‘?’ 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:
>> 
>> 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  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
>>  configurationprint configuration tables^M
>>  mode change or display EFI text modes^M
>>  lsefilist EFI handles^M
>>  chainchain load file^M
>>  netserverchange or display netserver URI^M
>>  loadfont load console font from file^M
>>  grab_faults  grab faults^M
>>  ungrab_faultsungrab faults^M
>>  faultgenerate 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
>>  unsetunset a variable^M
>>  echo echo arguments^M
>>  read read input from the terminal^M
>>  more show contents of a file^M
>>  lsdevlist 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
>>  lsmodlist 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-vdiskmap file as virtual disk^M
>>  unmap-vdisk  unmap virtual disk^M
>>  bcachestat   get disk block cache stats^M
>>  lszfslist 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-unsetdelete / unset EFI variables^M
>> 
>>> Sent from my iPhone
 On 20. Oct 2022, at 13:08, Emmanuel Vadot >>> > wrote:
 
 On Thu, 20 Oct 2022 13:03:26 +0300
 Andriy Gapon mailto:a...@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 mailto:m...@bidouilliste.com>> 
 mailto:m...@freebsd.org>>
 
>> 
>> -- 
>> Andriy Gapon
> 



Re: loader.efi module path vs kernel directory

2022-10-20 Thread Olivier Certner
Hi Andriy,

>  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.

You might prefer to use 'read-conf' instead of interrupting 'boot-conf''s 
countdown.

Regards.

-- 
Olivier Certner