Fetching 2 metadata files... failed (freebsd-update)

Polytropon freebsd at edvax.de
Thu Sep 12 01:10:08 UTC 2019

On Wed, 11 Sep 2019 22:19:27 +0100, tech-lists wrote:
> Hi,
> ◙ontext:
> I upgraded a 12-stable system @r349995 to 12-release-p10 @r352201.
> Before upgrading, I checked to make sure FREEBSD_UPDATE was not present in
> /etc/src.conf. Then downloaded sources, make cleanworld buildworld buildkernel
> installkernel mergemaster -p installworld mergemaster -Ui reboot then make
> check-old delete-old delete-old-libs reboot again

That order sounds a bit off. Have a look at /usr/src/Makefile,
at the comment header, which states:

#  1.  `cd /usr/src'       (or to the directory containing your source tree).
#  2.  `make buildworld'
#  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE'     (default is GENERIC).
#  4.  `make installkernel KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC).
#       [steps 3. & 4. can be combined by using the "kernel" target]
#  5.  `reboot'        (in single user mode: boot -s from the loader prompt).
#  6.  `mergemaster -p'
#  7.  `make installworld'
#  8.  `mergemaster'            (you may wish to use -i, along with -U or -F).
#  9.  `make delete-old'
# 10.  `reboot'
# 11.  `make delete-old-libs' (in case no 3rd party program uses them anymore)

The world is to be installed in single-user mode.

> Found that freebsd-update still not installed, so cd into
> /usr/src/usr.sbin/freebsd-update && make && make install
> freebsd-update was found but couldn't find any servers so copied
> /var/db/etcupdate/current/etc/freebsd-update.conf into /etc

Do you also have /etc/freebsd-update.conf present?

> Now it finds the server to update from but it fails to get the metadata like
> this:
> # freebsd-update fetch
> Looking up update.FreeBSD.org mirrors... 3 mirrors found.
> Fetching metadata signature for 12.0-RELEASE from update1.freebsd.org... done.
> Fetching metadata index... done.
> Fetching 2 metadata files... failed.

Looks like the correct server.

> files and perms in /var/db/freebsd-update look like this:
> drwxr-xr-x  18 root  wheel   512B Sep 11 21:52 ..
> -rw-r--r--   1 root  wheel   225B Aug 20 18:36
> cae42a89f90be555b530a759cd400925bce03ed73ee78e665bef3fe5293e872f

On my system, that entry is a symlink:

f465c3739385890c221dff1a05e578c6cae0d0430e46996d319db7439f884336-rollback -> install.oDEqit

Not sure if it's an automatically generated one. It does
point to a directory with drwx------ permissions, there are
several ones named install.<xxxxx>.

> -rw-r--r--   1 root  wheel   130B Sep 11 21:52 filelist
> drwxr-xr-x   2 root  wheel   512B Sep 11 21:52 files
> -rw-r--r--   1 root  wheel     0B Sep 11 21:52 patchlist
> -rw-r--r--   1 root  wheel   800B Aug 20 18:36 pub.ssl
> -rw-r--r--   1 root  wheel    75B Sep 11 21:52 serverlist
> -rw-r--r--   1 root  wheel    75B Sep 11 21:52 serverlist_full
> -rw-r--r--   1 root  wheel    25B Sep 11 21:52 serverlist_tried
> -rw-r--r--   1 root  wheel   150B Sep 11 21:52 tINDEX.new
> -rw-r--r--   1 root  wheel     0B Sep 11 21:52 tINDEX.present
> -rw-r--r--   1 root  wheel   113B Sep 11 21:52 tag.new

Looks correct.

> What am I doing wrong? There's plenty of space on the system.

It's not a matter of free disk space. Something has gone wrong
with your OS installation. I assume you didn't follow the correct
order of steps, and somehow (I cannot imagine why), freebsd-update
didn't get installed properly.

You can verify correct structure and permissions with the mtree
file at /etc/mtree/BSD.var.dist - freebsd-update has an entry
there, which suggests that after a clean install, that directory
(/var/db/freebsd-update) is empty, and will be populated by the
freebsd-update program itself.

You could try this:

	# cd /var/db
	# mv freebsd-update freebsd-update.old
	# mkdir freebsd-update
	# chmod -R 0700 freebsd-update

That should initialize the directory entry as if it was a clean
installation. Also check that you have the configuration file in
/etc as mentioned above.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list