Solved Issues upgrading 10.1 to 10.2

I have a VPS running FreeBSD 10.1 and I'm trying to upgrade to 10.2 (and later on to 10.3 due to 10.1 EOL). The machine is running as a webserver with nginx+php-fpm in a jail (setup with ez-jail) and mysql in another jail and pf on the host. I've tried several times to upgrade the machine but I've been having issues each time.

I tried using the upgrade procedure from the manual with the command freebsd-update upgrade -r 10.2-RELEASE and freebsd-update install, upgrading the basejail, rebooting and then upgrading the non-kernel components for the host and basejail

During the kernel upgrade I received this message
Code:
Fetching 344 files... done.
/usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
Attempting to automatically merge changes in files... done.

The following file will be removed, as it no longer exists in
FreeBSD 10.2-RELEASE: /etc/ntp.conf
Does this look reasonable (y/n)?

I replied with yes, the installation continued (I reinstalled NTP after the upgrade) but when I completed the upgrade mysql wouldn't run properly anymore. It did not open a listening socket or port. I tried upgrading mysql, re-installing it, creating a new jail and install mysql there. I also tried creating a new jail and installing MariaDB on there but it also refused to open a port or socket.

I googled around and found a thread that recommended upgrading the kernel and world separately by editing the Components section /etc/freebsd-update.conf so I tried that and I received different messages while upgrading

Code:
/boot/kernel/cyclic.ko
/boot/kernel/cyclic.ko.symbols
/boot/kernel/oce.ko
/boot/kernel/oce.ko.symbols
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
Installing updates...install: /usr/jails/newjail//boot/kernel/cyclic.ko: No such file or directory
install: /usr/jails/newjail//boot/kernel/cyclic.ko.symbols: No such file or directory
install: /usr/jails/newjail//boot/kernel/oce.ko: No such file or directory
install: /usr/jails/newjail//boot/kernel/oce.ko.symbols: No such file or directory

I continued with the upgrade but in the end I had the same issue with mysql.

Any help would be appreciated, thanks

p.s.
I had another issue with fail2ban after upgrading and rebooting where it would take a very long time to load and cause the boot process to take much longer than usual so I had to wait 20-30 minutes until I could SSH into the machine. I worked around that issue by changing the rc.d boot order to load SSH before fail2ban so for now I can deal with that but I'd like to get the mysql issue fixed so I can at least use the machine to server webpages.
 
You can not binary upgrade jails with ezjail.
Code:
     ezjail-admin update -u
             Update the base jail to the next release using freebsd-update(8)
             (i.e. using binary packages). This may be used only to update an
             existing installation.

     ezjail-admin update -U -s 8.0-RELEASE
             Upgrade the base jail to the host system's release using
             freebsd-update(8). This may be used only to upgrade an existing
             installation. Tell freebsd-update which OS version to expect in
             the basejail via the -s option.

             Note: Check uname(1) and especially the UNAME_r environment vari-
             able to upgrade to different versions.
 
I'm sorry I forgot to mention that, I upgraded the basejail after upgrading the host by running

ezjail-admin update -U -s 10.2-RELEASE

That's what is mentioned in the handbook
 
The -s option should indicate the 'old' version of the base jail (10.1-RELEASE in your case), not the version you're going to upgrade to. It'll always upgrade to the same -RELEASE version as the host.
 
The -s option should indicate the 'old' version of the base jail (10.1-RELEASE in your case), not the version you're going to upgrade to. It'll always upgrade to the same -RELEASE version as the host.

I guess I misunderstood that. I'll try it again and report back

Thanks
 
Make sure you've completed the upgrade on the host first. There shouldn't be a problem running one or more 10.1 jails on a 10.2 host.
 
OK, I managed to upgrade successfully and also tempted fate and decided to upgrade to 10.3 while I was at it.
Along the way I still had a few messages popup during the host and basejail upgrades but they didn't seem to cause any issues with the upgrade.

I received these messages during 10.1 to 10.2 upgrade on the host:
Code:
Installing updates...install: ///var/db/etcupdate/current/etc/autofs/special_media: No such file or directory
install: ///var/db/etcupdate/current/etc/autofs/special_noauto: No such file or directory
install: ///var/db/etcupdate/current/etc/devd/zfs.conf: No such file or directory
install: ///var/db/etcupdate/current/etc/periodic/daily/510.status-world-kernel: No such file or directory
install: ///var/db/etcupdate/current/etc/rc.d/growfs: No such file or directory

And these messages during 10.1 to 10.2 basejail upgrade:
Code:
The following files will be added as part of updating to 10.2-RELEASE-p22:
/boot/kernel/if_cxl.ko
/boot/kernel/if_cxl.ko.symbols
/boot/kernel/if_ix.ko
/boot/kernel/if_ix.ko.symbols
/boot/kernel/if_ixv.ko
/boot/kernel/if_ixv.ko.symbols
/boot/kernel/if_me.ko
/boot/kernel/if_me.ko.symbols
/boot/kernel/if_oce.ko
/boot/kernel/if_oce.ko.symbols
/boot/kernel/if_vxlan.ko
/boot/kernel/if_vxlan.ko.symbols
/boot/kernel/mrsas_linux.ko
/boot/kernel/mrsas_linux.ko.symbols
/boot/kernel/pmspcv.ko
/boot/kernel/pmspcv.ko.symbols
/boot/kernel/uled.ko
/boot/kernel/uled.ko.symbols
/boot/kernel/virtio_console.ko
/boot/kernel/virtio_console.ko.symbols
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
Installing updates...mkdir: /usr/jails/newjail//boot: No such file or directory
mtree: mtree: /usr/jails/newjail//boot/kernel.old: No such file or directory
/usr/jails/newjail//boot/kernel: No such file or directory
touch: /usr/jails/newjail//boot/kernel.old/.freebsd-update: No such file or directory
Could not create kernel backup directory

The following files are affected by updates, but no changes have
been downloaded because the files have been modified locally:
/etc/snmpd.config
/var/db/etcupdate/current/etc/snmpd.config
/var/db/etcupdate/log
/var/db/mergemaster.mtree

Then these messages during the 10.2 to 10.3 host upgrade:
Code:
Installing updates...install: ///var/db/etcupdate/current/etc/mtree/BSD.debug.dist: No such file or directory
install: ///var/db/etcupdate/current/etc/periodic/daily/480.leapfile-ntpd: No such file or directory

And these messages during the 10.2 to 10.3 basejail upgrade:
Code:
"/usr/sbin/freebsd-update install" again to finish installing updates.
Installing updates...install: /usr/jails/basejail//etc/mtree/BSD.debug.dist: No such file or directory
install: /usr/jails/basejail//etc/ntp/leap-seconds: No such file or directory
install: /usr/jails/basejail//etc/periodic/daily/480.leapfile-ntpd: No such file or directory
install: /usr/jails/basejail//var/db/etcupdate/current/etc/mtree/BSD.debug.dist: No such file or directory
install: /usr/jails/basejail//var/db/etcupdate/current/etc/periodic/daily/480.leapfile-ntpd: No such file or directory

The following files will be added as part of updating to 10.3-RELEASE-p9:
/boot/kernel/ismt.ko
/boot/kernel/ismt.ko.symbols
/boot/kernel/linux64.ko
/boot/kernel/linux64.ko.symbols
/boot/kernel/linux_common.ko
/boot/kernel/linux_common.ko.symbols
/boot/kernel/mlx5.ko
/boot/kernel/mlx5.ko.symbols
/boot/kernel/mlx5en.ko
/boot/kernel/mlx5en.ko.symbols
/boot/kernel/plasma_saver.ko
/boot/kernel/plasma_saver.ko.symbols
/boot/kernel/systrace_linux.ko
/boot/kernel/systrace_linux.ko.symbols
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".
Installing updates...mkdir: /usr/jails/newjail//boot: No such file or directory
mtree: mtree: /usr/jails/newjail//boot/kernel.old: No such file or directory
/usr/jails/newjail//boot/kernel: No such file or directory
touch: /usr/jails/newjail//boot/kernel.old/.freebsd-update: No such file or directory
Could not create kernel backup directory

So far everything is running smoothly.
 
Back
Top