Loader needs to be updated (14-STABLE)

You forgot the '-' between 'show' and 'me': loaders-update show-me
I am sorry:
Code:
loaders-update show-me
loaders-update v1.2.1

One or more efi partition(s) have been found.

Examining nda0p1...
Efi partition nda0p1 is already mounted in /boot/efi.
EFI loader /boot/efi/efi/freebsd/loader.efi is up-to-date.
EFI loader /boot/efi/efi/boot/bootx64.efi is up-to-date.

-------------------------------
Your current boot method is UEFI.
Boot device: nda0p1 File(\efi\freebsd\loader.efi)
One or more target partition(s) have been found...
All loaders are up-to-date.
-------------------------------

Update was okay and it works.
 
I have hw.nvme.use_nvd=0 in my /boot/loader.conf until before nda became default (to test nda) and still keeping it as is (would be paranoid, though).

And it should be in /boot/loader.conf, as kernel needs to know it at the moment loader passes control to kernel.

On the other hand, if you need to stick with nvd even on 14.0 and later, you'll need hw.nvme.use_nvd=1 and kern.cam.nda.nvd_compat=1 in your /boot/loader.conf.
I put hw.nvme.use_nvd=0 in my /boot/loader.conf but in /dev I have stiil symlinks from nvd0 to nda0?
sysct kern.cam.nda.nvd_compat=1 as before.. Shoul be 0 and pust also in loader.conf or /etc/sysctl.conf, please?
 
sysct kern.cam.nda.nvd_compat=1 as before.. Shoul be 0 and pust also in loader.conf or /etc/sysctl.conf, please?
If you actually want to switch to nda instead of nvd and don't want compat symlink, remove or comment out all kern.cam.nda.nvd_compat=1 lines from both /boot/loader.conf and /etc/sysctl.conf and if any, scripts attempting to set it would needed to be fixed or removed (if there's no problem to do so).

But looking into files other than /boot/loader.conf would be too paranoid, as kern.cam.nda.nvd_compat is defined as CTLFLAG_RDTUN in /usr/src/sys/cam/nvme/nvme_da.c at least on stable/14, means, read only tunable. RD here means read only and TUN here means it's loader tunable, thus kernel decides the configuration at the moment it starts (passed over by loader) or accept whichever loader specified, and more, cannot change once kernel finished its configuration at the first place. CTLFLAG means it's CAM Target Layer Flag, IIRC.
 
[...] as kern.cam.nda.nvd_compat is defined as CTLFLAG_RDTUN in /usr/src/sys/cam/nvme/nvme_da.c at least on stable/14, means, read only tunable. RD here means read only and TUN here means it's loader tunable, [...]
I'm not arguing for or against if one should set a certain sysctl in loader.conf here.
However, I think kern.cam.nda.nvd_compat is a tunable that can be set in loader.conf.
Given, sysctl(8):
Code:
DESCRIPTION
   [...]
       -T	    Display  only  variables  that  are	 settable  via	loader
		    (CTLFLAG_TUN).
On my 14.2-RELEASE, I get:
Code:
[1-0] # sysctl -adT | grep 'nda.nvd_compat'
kern.cam.nda.nvd_compat: Enable creation of nvd aliases.
[2-0] #
 
Thanks bsdimp. I'm very happy you look at my work.

Concerning the issue reported by fernandel, I can add this code. It searches for symlinks in /dev.

Code:
if [ -z "$m" ]; then # Look into possible symlinks
    lf="$(find "/dev" -type l)"
    for f in $lf; do
        if [ "$(readlink "$f")" = "$p" ]; then
            m="$(mount -p | grep "$(basename "$f")" | awk '{ print $2 }')"
            if [ -n "$m" ]; then
                break
            fi
        fi
    done
fi

Where $p is the target efi partition and $m, the found mount point.

I wonder if it's worth it. Maybe there is some bugs in these lines...
I have to do a long testing work.
 
Back
Top