Any update/upgrade technique that does not reboot into the new kernelfor updating either kind of system!Yes its possible - but I while pkgbase-update(8) does
everything in one step + reboot
before having some new world code become active risks the new world code
used failing for lack of kernel updates/upgrades it depends on.
It the same reason that the source upgrade document has that reboot
between the 2, the instructions being intended to allow for UFS. Nothing about pkgbase of itself removes the technical issue.
Of course, UFS contexts are more constrained by not having alternate
boot environments as a way to not run the newly installed world at
all until rebooting after the world is installed.
While I use a ZFS system, I use a lot more UFS systems. (It is a
deliberate mix.)
Hi,
On 11/12/26 7:52 AM, Mark Millard wrote:
Any update/upgrade technique that does not reboot into the new kernelfor updating either kind of system!Yes its possible - but I while pkgbase-update(8) does
everything in one step + reboot
before having some new world code become active risks the new world code
used failing for lack of kernel updates/upgrades it depends on.
It the same reason that the source upgrade document has that reboot
between the 2, the instructions being intended to allow for UFS. Nothing
about pkgbase of itself removes the technical issue.
If You first create new ZFS BE and then do the upgrade
inside - I do not see any 'risk' here - You are basically
replacing or extracting new files into that ZFS BE. In
the next step You 'activate' that ZFS BE and reboot into
it. It was possible even with freebsd-update(8) command
as shown for example below and its possible with PKGBASE:
https://vermaden.wordpress.com/2021/02/23/upgrade-freebsd-with-zfs-boot- environments/
Of course, UFS contexts are more constrained by not having alternate
boot environments as a way to not run the newly installed world at
all until rebooting after the world is installed.
While I use a ZFS system, I use a lot more UFS systems. (It is a
deliberate mix.)
On UFS You can use UFS Boot Environments - they work slightly
different but the end results is mostly the same - even on ARM.
Details here:
https://vermaden.wordpress.com/2021/04/02/ufs-boot-environments/
https://vermaden.wordpress.com/2021/04/05/ufs-boot-environments-for-arm/
Regards,
vermaden
It is certainly true that appropriate use of ZFS BE's can avoidJohn
executing new world code with the old kernel despite having only one reboot. When/how does pkg-post-install code get invoked? <URL:https://docs.freebsd.org/en/books/porters-handbook/pkg-files/>
In message <04f8bdff-3ab3-466b-acec-99b738692c13@yahoo.com>, Mark Millard write
s:
It is certainly true that appropriate use of ZFS BE's can avoid
executing new world code with the old kernel despite having only one reboot.
When/how does pkg-post-install code get invoked? <URL:https://docs.freebsd.org/en/books/porters-handbook/pkg-files/>
John
groenveld@acm.org
Checking how my UFS context would be handled: fails.
For Reference:
# mount
/dev/gpt/PBaseUFS on / (ufs, NFS exported, local, noatime, soft-updates) devfs on /dev (devfs)
/dev/gpt/PBaseEFI on /boot/efi (msdosfs, local, noatime)
# mount | awk '/ \/ / {print $1}'
/dev/gpt/PBaseUFS
# mount | awk '/ \/ / {print $1}' | grep -q '^/dev/label' 1> /dev/null 2> /dev/null
#
# mount | awk '/ \/ / {print $1}' | grep -o -E '[a-z]+[0-9]+' | head -1
#
So it looks like the UFS handling in my context would fail in:
. . .
# FIND SYSTEM ROOT
BOOT_ROOT=$( mount | awk '/ \/ / {print $1}' )
# CHECK IF WE HAVE ZFS OR UFS SYSTEM INSTALLATION
if echo "${BOOT_ROOT}" | grep -q '^/' 1> /dev/null 2> /dev/null
then
echo "INFO: detected UFS based FreeBSD installation"
# UFS DETECT glabel(8) LABEL
if echo "${BOOT_ROOT}" | grep -q '^/dev/label' 1> /dev/null 2> /dev/null
then
# UFS ON glabel(8) DEVICE
BOOT_LABEL=$( echo "${BOOT_ROOT}" | sed -e s./dev/..g )
BOOT_DISK=$( glabel status | grep "${BOOT_LABEL}" | awk '{print $NF}' )
BOOT_DISK=$( echo "${BOOT_DISK}" | grep -o -E '[a-z]+[0-9]+' | head -1 )
else
# UFS RAW DISK DEVICE
BOOT_DISK=$( echo "${BOOT_ROOT}" | grep -o -E '[a-z]+[0-9]+' | head -1 )
fi
else
. . .
There could be /dev/ufs/ with ufs file system labels in use, if I
remember right, not that I have such.
--
===
Mark Millard
marklmi at yahoo.com
Hi,
Checking how my UFS context would be handled: fails.
For Reference:
# mount
/dev/gpt/PBaseUFS on / (ufs, NFS exported, local, noatime, soft-updates)
devfs on /dev (devfs)
/dev/gpt/PBaseEFI on /boot/efi (msdosfs, local, noatime)
# mount | awk '/ \/ / {print $1}'
/dev/gpt/PBaseUFS
# mount | awk '/ \/ / {print $1}' | grep -q '^/dev/label' 1> /dev/null 2> /dev/null
#
# mount | awk '/ \/ / {print $1}' | grep -o -E '[a-z]+[0-9]+' | head -1
#
So it looks like the UFS handling in my context would fail in:
. . .
# FIND SYSTEM ROOT
BOOT_ROOT=$( mount | awk '/ \/ / {print $1}' )
# CHECK IF WE HAVE ZFS OR UFS SYSTEM INSTALLATION
if echo "${BOOT_ROOT}" | grep -q '^/' 1> /dev/null 2> /dev/null
then
echo "INFO: detected UFS based FreeBSD installation"
# UFS DETECT glabel(8) LABEL
if echo "${BOOT_ROOT}" | grep -q '^/dev/label' 1> /dev/null 2> /dev/null >> then
# UFS ON glabel(8) DEVICE
BOOT_LABEL=$( echo "${BOOT_ROOT}" | sed -e s./dev/..g )
BOOT_DISK=$( glabel status | grep "${BOOT_LABEL}" | awk '{print $NF}' )
BOOT_DISK=$( echo "${BOOT_DISK}" | grep -o -E '[a-z]+[0-9]+' | head -1 )
else
# UFS RAW DISK DEVICE
BOOT_DISK=$( echo "${BOOT_ROOT}" | grep -o -E '[a-z]+[0-9]+' | head -1 )
fi
else
. . .
There could be /dev/ufs/ with ufs file system labels in use, if I
remember right, not that I have such.
--
===
Mark Millard
marklmi at yahoo.com
I tested pkgbase(8) against all possible 'Auto' options in bsdinstall(8) command - like 'Auto (ZFS)' and 'Auto (UFS)'. Is it possible to do such install as You have with 'Auto (UFS)' or its purely custom command by command FreeBSD installation?
To be honest - I also plan to 'support' these 'custom' installations - its just I have 'access' to such systems only if someone 'shares' their setup - like You - so I (probably not today) will look into command outputs You provided - thank You for that - and plan to add needed changes to pkgbase(8) tool.
Regards,
vermaden
On 11/15/26 14:59, vermaden wrote:
Hi,
Checking how my UFS context would be handled: fails.
For Reference:
# mount
/dev/gpt/PBaseUFS on / (ufs, NFS exported, local, noatime, soft-updates) >>> devfs on /dev (devfs)
/dev/gpt/PBaseEFI on /boot/efi (msdosfs, local, noatime)
# mount | awk '/ \/ / {print $1}'
/dev/gpt/PBaseUFS
# mount | awk '/ \/ / {print $1}' | grep -q '^/dev/label' 1> /dev/null 2> /dev/null
#
# mount | awk '/ \/ / {print $1}' | grep -o -E '[a-z]+[0-9]+' | head -1
#
So it looks like the UFS handling in my context would fail in:
. . .
# FIND SYSTEM ROOT
BOOT_ROOT=$( mount | awk '/ \/ / {print $1}' )
# CHECK IF WE HAVE ZFS OR UFS SYSTEM INSTALLATION
if echo "${BOOT_ROOT}" | grep -q '^/' 1> /dev/null 2> /dev/null
then
echo "INFO: detected UFS based FreeBSD installation"
# UFS DETECT glabel(8) LABEL
if echo "${BOOT_ROOT}" | grep -q '^/dev/label' 1> /dev/null 2> /dev/null
then
# UFS ON glabel(8) DEVICE
BOOT_LABEL=$( echo "${BOOT_ROOT}" | sed -e s./dev/..g )
BOOT_DISK=$( glabel status | grep "${BOOT_LABEL}" | awk '{print $NF}' )
BOOT_DISK=$( echo "${BOOT_DISK}" | grep -o -E '[a-z]+[0-9]+' | head -1 )
else
# UFS RAW DISK DEVICE
BOOT_DISK=$( echo "${BOOT_ROOT}" | grep -o -E '[a-z]+[0-9]+' | head -1 )
fi
else
. . .
There could be /dev/ufs/ with ufs file system labels in use, if I
remember right, not that I have such.
--
===
Mark Millard
marklmi at yahoo.com
I tested pkgbase(8) against all possible 'Auto' options in bsdinstall(8) command - like 'Auto (ZFS)' and 'Auto (UFS)'. Is it possible to do such install as You have with 'Auto (UFS)' or its purely custom command by command FreeBSD installation?
To be honest - I also plan to 'support' these 'custom' installations - its just I have 'access' to such systems only if someone 'shares' their setup - like You - so I (probably not today) will look into command outputs You provided - thank You for that - and plan to add needed changes to pkgbase(8) tool.
Regards,
vermaden
Official arm small board computer images use ufs labels (but are not
pkgbase generated yet as far as I know): pkgbasify use would likely be needed to convert.
For reference:
/usr/src/release/tools/arm.subr: echo "/dev/ufs/rootfs / ufs rw 1 1" \
Last I knew, bsdinstall did not attempt to deal with arm small board computers and the like directly: For example: no U-Boot. Or things like
the RPi* firmware related files. These are from the ports tree, not the
base system. (There have been recent efforts associated with the .efi
loader files that FreeBSD does produce of itself.)
Another result is that these sorts of contexts tend to have more manual configuration when they are not from release/snapshot images.
There are also other examples of gpt and ufs and iso9660 labels (that
may not be for contexts your tools would be used with but are official contexts):
/usr/src/release/tools/vmimage.subr:ROOTLABEL="gpt" /usr/src/release/tools/vmimage.subr: ROOTLABEL="ufs" /usr/src/release/tools/vmimage.subr: echo "/dev/${ROOTLABEL}/rootfs /
${VMFS} rw,noatime 1 1" \ /usr/src/release/tools/vmimage.subr: echo "/dev/${ROOTLABEL}/efiboot0
/boot/efi msdosfs rw 2 2" \
and:
/usr/src/release/amd64/make-memstick.sh:echo '/dev/ufs/FreeBSD_Install /
ufs ro,noatime 1 1' > ${BASEBITSDIR}/etc/fstab /usr/src/release/amd64/mkisoimages.sh:echo "/dev/iso9660/$LABEL / cd9660
ro 0 0" > "$BASEBITSDIR/etc/fstab" /usr/src/release/arm64/make-memstick.sh:echo '/dev/ufs/FreeBSD_Install /
ufs ro,noatime 1 1' > ${BASEBITSDIR}/etc/fstab /usr/src/release/arm64/mkisoimages.sh:echo "/dev/iso9660/$LABEL / cd9660
ro 0 0" > "$BASEBITSDIR/etc/fstab" /usr/src/release/i386/make-memstick.sh:echo '/dev/ufs/FreeBSD_Install /
ufs ro,noatime 1 1' > ${BASEBITSDIR}/etc/fstab /usr/src/release/i386/mkisoimages.sh:echo "/dev/iso9660/$LABEL / cd9660
ro 0 0" > "$BASEBITSDIR/etc/fstab"
/usr/src/release/powerpc/mkisoimages.sh: echo FreeBSD Install=\'/boot/kernel/kernel
vfs.root.mountfrom=cd9660:/dev/iso9660/$LABEL\' > "$BASEBITSDIR/etc/kboot.conf"
/usr/src/release/powerpc/mkisoimages.sh:echo "/dev/iso9660/$LABEL /
cd9660 ro 0 0" > "$BASEBITSDIR/etc/fstab" /usr/src/release/riscv/make-memstick.sh:echo '/dev/ufs/FreeBSD_Install /
ufs ro,noatime 1 1' > ${BASEBITSDIR}/etc/fstab /usr/src/release/riscv/mkisoimages.sh:echo "/dev/iso9660/$LABEL / cd9660
ro 0 0" > "$BASEBITSDIR/etc/fstab"
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 76 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 60:46:10 |
| Calls: | 1,265 |
| Calls today: | 1 |
| Files: | 1,362 |
| D/L today: |
4 files (9,632K bytes) |
| Messages: | 286,219 |