I did something (maybe stupid) with freebsd-update

I didn't realize this was a bad idea, but I ran two parallel instances of freebsd-update. One for the host system (on 14.3-RELEASE) and one for a jail (13.4-RELEASE).

freebsd-update fetch install
freebsd-update -j myjail -r 13.5-RELEASE upgrade

I realized this was 'wrong' once I saw these errors:

Code:
freebsd-update fetch install
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 14.3-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... done.
Fetching 2 metadata files... done.
cut: tINDEX.new: No such file or directory
rm: patchlist: No such file or directory
rm: filelist: No such file or directory
mv: tINDEX.new: No such file or directory
/usr/sbin/freebsd-update: cannot open files/c22aaa7d2254e94b05a502a6cb08463866a7d12c533c49eb7f6ff72a37113397.gz: No such file or directory
look: INDEX-NEW.all: No such file or directory
look: INDEX-NEW.all: No such file or directory
rm: INDEX-NEW.all: No such file or directory
/usr/sbin/freebsd-update: cannot open files/c730cbcb7b75e5f589d9d7c21d51c631f939e2e06be88f38fe496a36b887cf7e.gz: No such file or directory
look: INDEX-OLD.all: No such file or directory
look: INDEX-OLD.all: No such file or directory
rm: INDEX-OLD.all: No such file or directory
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 14.3-RELEASE-p7.
No updates are available to install.


Code:
freebsd-update -j myjail -r 13.5-RELEASE upgrade
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 13.4-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic world/base

The following components of FreeBSD do not seem to be installed:
kernel/generic-dbg world/base-dbg world/lib32 world/lib32-dbg

Does this look reasonable (y/n)? y

Fetching metadata signature for 13.5-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 3 metadata files... /usr/sbin/freebsd-update: cannot open filelist: No such file or directory
done.
/usr/sbin/freebsd-update: cannot open files/e51e446acdd5db43a2b0e7b2fdfed55ca2bfb3915e1b3f5bf6891dbd00c3824e.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/e51e446acdd5db43a2b0e7b2fdfed55ca2bfb3915e1b3f5bf6891dbd00c3824e.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/c22aaa7d2254e94b05a502a6cb08463866a7d12c533c49eb7f6ff72a37113397.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/c22aaa7d2254e94b05a502a6cb08463866a7d12c533c49eb7f6ff72a37113397.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/c730cbcb7b75e5f589d9d7c21d51c631f939e2e06be88f38fe496a36b887cf7e.gz: No such file or directory
/usr/sbin/freebsd-update: cannot open files/c730cbcb7b75e5f589d9d7c21d51c631f939e2e06be88f38fe496a36b887cf7e.gz: No such file or directory
rm: patchlist: No such file or directory
mv: tag.new: No such file or directory
/usr/sbin/freebsd-update: cannot open files/e51e446acdd5db43a2b0e7b2fdfed55ca2bfb3915e1b3f5bf6891dbd00c3824e.gz: No such file or directory
grep: INDEX-ALL.all: No such file or directory

WARNING: This system is running a "generic" kernel, which is not a
kernel configuration distributed as part of FreeBSD 13.5-RELEASE.
As part of upgrading to FreeBSD 13.5-RELEASE, this kernel will be
replaced with a "generic" kernel.
Does this look reasonable (y/n)? y
rm: INDEX-ALL.all: No such file or directory

What do I need to worry about? I haven't rebooted or restarted anything yet.
 
I feel your pain. You should have made a backup or some zfs snapshots before upgrading. Do it from now on.

I can't help you. I lack the knowledge. I'm sure the experts will come to your rescue as soon as they see your thread.
 
Unless I'm missing something, as long as the local package database hasn't been corrupted, it's probably not that big of a deal. The files in the /var/db/pkg directory, specifically the local.sqlite is rather important. I would make a point of backing up that directory to some place safe just in case as there isn't really any way of recreating it later on other than hoping you've got a recent backup.

From what I'm seeing, it looks like it's just a copy of the server side database that may have been improperly downloaded and/or corrupted, not the local one that stores the stuff you've got installed.
 
I feel your pain. You should have made a backup or some zfs snapshots before upgrading. Do it from now on.

I can't help you. I lack the knowledge. I'm sure the experts will come to your rescue as soon as they see your thread.

I have backups, the RTO is not ideal if the base system is trashed.

Unless I'm missing something, as long as the local package database hasn't been corrupted, it's probably not that big of a deal. The files in the /var/db/pkg directory, specifically the local.sqlite is rather important. I would make a point of backing up that directory to some place safe just in case as there isn't really any way of recreating it later on other than hoping you've got a recent backup.

This is freebsd-update, not pkg. I re-ran each freebsd-update command one at a time and it looked like things are okay. The jail restart fine, but I'm afraid to reboot the host.
 
I have backups, the RTO is not ideal if the base system is trashed.



This is freebsd-update, not pkg. I re-ran each freebsd-update command one at a time and it looked like things are okay. The jail restart fine, but I'm afraid to reboot the host.
Fair point, it's rather late here. It's been ages since I used that command. Did anything actually get installed as part of the update attempt here? Because the log that you posted seems to suggest that it barfed all over some update databases rather than actual system install files.

I can't do it on my system, but I think that freebsd-update IDS should be what you're looking for. I don't think it will cover you in terms of the bootloader stuff, but as far as the more typical stuff touched by an update it should verify.
 
According to what I understand, you did nothing wrong. You are using a thick jail, which is completely independent from the base system.

Wait for more people to chime in, but I think you'll be okay.


Edit: The link points to "thick jails" not to jails in general.
 
Back
Top