Re: Odd sysctl -d kern.bootfile result
On Sat, Nov 12, 2022 at 10:16 PM Mark Millard wrote: > > The context: > > # ls -Tldt /boot/kern*/kernel > -r-xr-xr-x 1 root wheel 40003240 Nov 6 16:32:05 2022 /boot/kernel/kernel > -r-xr-xr-x 1 root wheel 39990232 Jul 6 11:21:16 2022 > /boot/kernel.old/kernel > -r-xr-xr-x 1 root wheel 31401824 Aug 19 03:16:29 2021 > /boot/kernel.dbg/kernel > > # uname -apKU # Note: output line split for readability > FreeBSD amd64_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #55 > main-n259064-f83db6441a2f-dirty: Sun Nov 6 16:31:55 PST 2022 > root@amd64_ZFS:/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/sys/GENERIC-NODBG > amd64 amd64 1400073 1400073 > > > But . . . > > # sysctl -d kern.bootfile > kern.bootfile: Name of kernel file booted > > # sysctl -W kern.bootfile > kern.bootfile: /boot/kernel.old/kernel > > Looks wrong to me. (I've never explicitly assigned to kern.bootfile .) > The usual suspect here is that you did an `installkernel` -- if it replaces kern.bootfile, it moves the old kern.bootfile to /boot/kernel.old and updates the sysctl to reflect the new location so that it still accurately reflects the booted kernel. Thanks, Kyle Evans
Odd sysctl -d kern.bootfile result
The context: # ls -Tldt /boot/kern*/kernel -r-xr-xr-x 1 root wheel 40003240 Nov 6 16:32:05 2022 /boot/kernel/kernel -r-xr-xr-x 1 root wheel 39990232 Jul 6 11:21:16 2022 /boot/kernel.old/kernel -r-xr-xr-x 1 root wheel 31401824 Aug 19 03:16:29 2021 /boot/kernel.dbg/kernel # uname -apKU # Note: output line split for readability FreeBSD amd64_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #55 main-n259064-f83db6441a2f-dirty: Sun Nov 6 16:31:55 PST 2022 root@amd64_ZFS:/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/sys/GENERIC-NODBG amd64 amd64 1400073 1400073 But . . . # sysctl -d kern.bootfile kern.bootfile: Name of kernel file booted # sysctl -W kern.bootfile kern.bootfile: /boot/kernel.old/kernel Looks wrong to me. (I've never explicitly assigned to kern.bootfile .) === Mark Millard marklmi at yahoo.com
Re: changes to the zfs boot (was: Re: git: 72a1cb05cd23 - main - rc(8): Add a zpoolupgrade rc.d script)
Quoting Warner Losh (from Wed, 9 Nov 2022 08:54:33 -0700): On Wed, Nov 9, 2022 at 5:46 AM Alexander Leidinger wrote: While most of these options look OK on the surface, I'd feel a lot better if there were tests for these to prove they work. I'd also feel better if the ZFS experts could explain how those come to be set on a zpool as well. I'd settle for a good script that could be run as root (better It is explained in the zpool-features man page. would be not as root) that would take a filesystem that was created by makefs -t zfs and turn on these features after an zpool upgrade. Script attached. Maybe a little bit too verbose, but you can see which features are active directly, and which ones only enabled. It expects a zroot.img in the current directory and creates copies to zroot_num_featurename.img where it enables the features. In the beginning are some variables to adapt to pool/image name and destination directory. Bye, Alexander. -- http://www.Leidinger.net alexan...@leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.orgnetch...@freebsd.org : PGP 0x8F31830F9F2772BF zpool_features.sh Description: Bourne shell script pgpnwcnaQ1dYc.pgp Description: Digitale PGP-Signatur