On 4/25/19 8:42 AM, Vijay Sankar wrote:
On 4/25/19 2:07 AM, Remco wrote:
On 25-04-19 01:02, Christian Weisgerber wrote:
I don't remember if I ever posted it, but I've been using an "upgrade"
script to download bsd.rd, verify it, move it to /bsd, and reboot.
With florian@'s additions in -current, I have now extended the
script to download the sets and kick off an unattended upgrade.

In the best case, you simply run
# ./upgrade
and the machine will upgrade itself without any further intervention.

------------------------------------------------------------------------
#!/bin/sh -e

..
cp bsd.rd /bsd.upgrade
..

I don't think this matches your description.

Tested it on a system running

OpenBSD 6.4 (GENERIC.MP) #9: Tue Mar 26 19:21:43 CET 2019

s2# sh ./upgrade.sh
Trying 151.101.186.217...
Requesting https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/SHA256.sig
100% |**************************************************| 2141       00:00
2141 bytes received in 0.01 seconds (199.89 KB/s)
Signature Verified
Trying 151.101.186.217...
Requesting https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/INSTALL.amd64 100% |**************************************************| 43409       00:00
43409 bytes received in 0.08 seconds (533.49 KB/s)
Trying 151.101.186.217...

If I do a boot /bsd.upgrade, the upgrade process completes without any further user intervention. If I don't do anything, system boots back into 6.4 #9.

On a -current system running

kern.version=OpenBSD 6.5-current (GENERIC.MP) #16: Sun Apr 21 19:25:15 MDT 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

the upgrade process continued without any user intervention for the initial part. Unfortunately, I have one 4TB drive (sd0, disabled in BIOS drive priorities) and four SSD drives on this system (sd1 to sd4) on this test system and -current was on /dev/sd2. Even though the BIOS was set to boot with sd2 first, /bsd.upgrade seems to boot /dev/sd1. Because I am using this test system to test AD functionality with the new Samba, I had to muck around with the different drives. So this failure was probably due to some stupid thing I was doing with bios settings.

I will work further and report back to the list and naddy@

Thanks again for the script,

Vijay

Works perfectly on new snapshots, on normal systems. My failed tests were all on various systems where I had built non-standard stuff to see if I could extend functionality of different ports and packages beyond normal usage. Sorry about the noise.

Here is a log of a successful upgrade from snapshot #3 to #25 using naddy's script.

vijay.lab.foretell.ca# sysctl kern.version; sh ./upgrade.sh

kern.version=OpenBSD 6.5 (GENERIC.MP) #3: Sat Apr 13 14:48:43 MDT 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/SHA256.sig
2141 bytes received in 0.00 seconds (9.92 MB/s)
Signature Verified
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/INSTALL.amd64
43409 bytes received in 0.07 seconds (598.89 KB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/base65.tgz
213977837 bytes received in 20.99 seconds (9.72 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/bsd
15959308 bytes received in 5.26 seconds (2.89 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/bsd.mp
16049826 bytes received in 5.12 seconds (2.99 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/bsd.rd
10224716 bytes received in 3.95 seconds (2.47 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/comp65.tgz
73651367 bytes received in 11.86 seconds (5.92 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/game65.tgz
2807176 bytes received in 1.77 seconds (1.51 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/man65.tgz
7567426 bytes received in 3.54 seconds (2.04 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/xbase65.tgz
20621824 bytes received in 6.11 seconds (3.22 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/xfont65.tgz
40286621 bytes received in 15.88 seconds (2.42 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/xserv65.tgz
16734155 bytes received in 5.23 seconds (3.05 MB/s)
Trying 128.100.17.240...
Requesting https://openbsd.cs.toronto.edu/pub/OpenBSD/snapshots/amd64/xshare65.tgz
4554652 bytes received in 2.40 seconds (1.81 MB/s)
Signature Verified
INSTALL.amd64: OK
base65.tgz: OK
bsd: OK
bsd.mp: OK
bsd.rd: OK
comp65.tgz: OK
game65.tgz: OK
man65.tgz: OK
xbase65.tgz: OK
xfont65.tgz: OK
xserv65.tgz: OK
xshare65.tgz: OK

vijay.lab.foretell.ca# sysctl kern.version

kern.version=OpenBSD 6.5-current (GENERIC.MP) #25: Thu Apr 25 05:11:33 MDT 2019
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

Reply via email to