🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: muc.lists.freebsd.stable
3 messages
3 total messages Started by vermaden Sun, 15 Nov 2026 22:59
Re: FreeBSD 15.2-BETA1 Now Available
#44
Author: vermaden
Date: Sun, 15 Nov 2026 22:59
75 lines
5985 bytes
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



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: FreeBSD 15.2-BETA1 Now Available
#45
Author: Mark Millard
Date: Mon, 16 Nov 2026 00:19
139 lines
11500 bytes
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"


-- 
===
Mark Millard
marklmi at yahoo.com


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Re: FreeBSD 15.2-BETA1 Now Available
#46
Author: Mark Millard
Date: Mon, 16 Nov 2026 00:50
164 lines
12437 bytes
On 11/15/26 16:19, Mark Millard wrote:
> 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"
> 
> 

I expect my ZFS context may not be as currently expected as well:

# zpool status -PL zoptb | less
  pool: zoptb
 state: ONLINE
  scan: scrub repaired 0B in 00:00:54 with 0 errors on Mon May  5
23:40:50 2025
config:

        NAME                STATE     READ WRITE CKSUM
        zoptb               ONLINE       0     0     0
          /dev/gpt/OptBzfs  ONLINE       0     0     0

errors: No known data errors

(so: /dev/gpt/NAME use) vs. the likes of:

echo "${BOOT_DISK}" | awk '{print $1}' | sed -e 's.p[0-9]*$..' | tr '\n' ' '

Imagine alternate NAME's after gpt/ that might have a suffix matching:
p[0-9]*$ vs. ones that do not.


-- 
===
Mark Millard
marklmi at yahoo.com


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads