Index | Thread | Search

From:
Klemens Nanni <kn@openbsd.org>
Subject:
Re: sysupgrade vs NFS
To:
Alexander Hall <alexander@beard.se>, tech@openbsd.org, Lucas Gabriel Vuotto <lucas@sexy.is>
Date:
Sat, 14 Jun 2025 16:16:39 +0000

Download raw body.

Thread
14.06.2025 13:30, Marc Espie пишет:
> Thanks for the feedback.
> 
> Here's a better patch.

I have not seen any actual error or explanation as to what goes wrong,
thus I don't understand where this is coming from.

> 
> I've left out the usage of err for now, because it's not consistently
> used in that script.
> 
> Index: sysupgrade.8
> ===================================================================
> RCS file: /build/data/openbsd/cvs/src/usr.sbin/sysupgrade/sysupgrade.8,v
> diff -u -p -r1.13 sysupgrade.8
> --- sysupgrade.8	8 Jun 2022 09:03:11 -0000	1.13
> +++ sysupgrade.8	14 Jun 2025 10:23:50 -0000
> @@ -99,3 +99,6 @@ Directory the upgrade is downloaded to.
>  .Nm
>  first appeared in
>  .Ox 6.6 .
> +.Sh BUGS AND LIMITATIONS
> +.Nm
> +currently does not support downloading the sets to a NFS or MFS partition.

	# mount localhost:/home /mnt
	# sysupgrade -n -s -b/mnt
	...
	Will upgrade on next reboot
	# umount /mnt

	# mount_mfs -s 3g swap /mnt
	# sysupgrade -n -s -b/mnt
	...
	Will upgrade on next reboot

Your sentence says no, but sysupgrade did its job.

From here bootloader and then installer take over.

What is the actual problem?


> Index: sysupgrade.sh> ===================================================================
> RCS file: /build/data/openbsd/cvs/src/usr.sbin/sysupgrade/sysupgrade.sh,v
> diff -u -p -r1.52 sysupgrade.sh
> --- sysupgrade.sh	19 Jun 2024 05:22:33 -0000	1.52
> +++ sysupgrade.sh	14 Jun 2025 10:21:06 -0000
> @@ -132,6 +132,11 @@ fi
>  
>  install -d -o 0 -g 0 -m 0755 ${SETSDIR}
>  cd ${SETSDIR}
> +if df -t nfs,mfs ${SETSDIR} >/dev/null 2>/dev/null
> +then
> +	echo "Error: ${SETSDIR} on NFS or MFS is currently not supported"
> +	exit 1
> +fi

Why care for MFS?  Does anyone really expect that to survive reboot?

>  
>  echo "Fetching from ${URL}"
>  unpriv -f SHA256.sig ftp -N sysupgrade -Vmo SHA256.sig ${URL}SHA256.sig
>