View Single Post
  #1   (View Single Post)  
Old 14th June 2022
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,976
Default Sysupgrade 6.9 -> 7.0 and /etc/boot.conf 'set image'

I had a disk with OpenBSD 6.9 (rather easy to slot in/out my HP Proliant server).

First I decided to do a clean new install with OpenBSD 7.1 using the 7.1 bsd.rd.
Usually I lose the race at the beginning of the boot to type a space so I can enter "bsd.rd":
Code:
Using drive 0, partition 3.
Loading......
probing: pc0 com0 com1 mem[638K 1918M a20=on]
disk: hd0+ hd1+
>> OpenBSD/amd64 BOOT 3.33
boot> bsd.rd
So I entered set image /bsd.rd in /etc/boot.conf to make sure that there was no race that I tend to lose.....

The automatic (disklabel) partitioning of 7.1 was not exactly the same as that of 6.9. Because I wanted to keep my /home partition by not specifying a mount point (that way that partition will not get "newfs'ed"), I aborted the install and decided to try an upgrade.
Before rebooting the system, I selected the shell prompt and used ed(1) to edit /etc/boot.conf and did a s/\.rd// to it read set image /bsd.
Then 2 days later I created an extra backup of my /home directory and went the sysupgrade(8) way.

And that did not work at all. After fetching the upgrade file sets, the system rebooted and I still ended up in 6.9. Tried again .Same result ......

I saw while booting something like "upgrade kernel detected, switching to bsd.upgrade". And then I understood why it is was not working.....
Because I still had set image /bsd in /etc/boot.conf and that overrode the selection of the bsd.upgrade file .......
It is logical that the boot process honors the /etc/boot.conf settings. For example in this file you also configure the serial console settings.

Lesson learned: when you want to do an automatic upgrade with sysupgrade(8) make sure you don't have a set image /bsd in /etc/boot.conf.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote