Problem with make buildworld during upgrade from 7.0-RELEASE to 7.2-RELEASE

Mel Flynn mel.flynn+fbsd.questions at mailing.thruhere.net
Tue Jul 14 19:51:43 UTC 2009


On Monday 13 July 2009 13:40:31 Joseph Bashe wrote:

> I am going thru my first FreeBSD upgrade and it's not going too smoothly. I
> originally started the upgrade using the "freebsd-update" method. This is
> what I've done so far (all as root user):

There's a few misconceptions in your understanding of the upgrade process, 
which I'll try to address below. However, you're also using the wrong sequence 
of events. You *first* want to update your kernel and base system, only then 
your ports.

> PS. I am using a custom kernel.

As such, freebsd-update cannot upgrade your kernel.

> 1. ran "portsnap fetch update" - [success]
>
> 2. ran "portupgrade -va" ["portupgrade"not found - i hadn't installed it
> yet"
>
> 3. ran "freebsd-update fetch" [success] (i know this was out of sequence
> from the guide)
>
> 4. installed portupgrade ("make install clean" from the dir in ports) [ssh
> connection dropped, so i had to login again]
>
> 5. installed portupgrade ("make install") [success] then "make clean"
> [success]
>
> 6. ran "portupgrade -va" [long process begins... strangely, several X
> components install although this is not desired]

echo WITHOUT_X11=yes >>/etc/make.conf

> 7. ran "freebsd-update fetch" again [success]
>
> 8. ran "freebsd-update upgrade -r 7.2-RELEASE" [ssh connection dies during
> "preparing to download files", so i log in again]
>
> 9. ran "freebsd-update upgrade -r 7.2-RELEASE" [~27,000 updates..] and of
> course ssh connection dies during "Fetching 3060 files" although "applying
> patches" succeeds. A note: these disconnects are not at all common during a
> normal ssh connection to this computer, it seems due to the
> resource-intense operations required for updating freebsd.

More likely to be bad queuing in the gateway or you're hitting the default 
session timeout of 5 minutes of inactivity. See man ssh_config for 
ServerAliveInteral and TCPKeepAlive.

> 10. log back in, ran "freebsd-update upgrade -r 7.2-RELEASE" [..success]
>
> 11. ran "freebsd-update install" [and of course ssh dies during "Installing
> updates..."]
>
> 12. log back in, ran "freebsd-update install".
>
> 13. Then i ran nextboot -k GENERIC and got "/boot/GENERIC doesn't exist".
> so, i copied kernel.old to /boot/GENERIC

This is out of sequence and likely the cause for some problems. First of all, 
you must be sure that kernel.old is really a GENERIC 7.0-RELEASE kernel. 
Secondly, this step /should/ have been run /before/ freebsd-update install.

> 14. Ok, maybe this was the problem. for some reason at this point i decide
> to run "freebsd-update install" again, and get "no updates are available".
>
> 15. Then I run "freebsd-update -r 7.2-RELEASE upgrade" again.. it downloads
> some patches, but then i get this error: "/usr/sbin/freebsd-update: cannot
> open files/.gz: No such file or directory" about 100 times.. plus, i get
> questions like

Running an upgrade again, without a rollback is generally not a good idea.

> "The following file will be removed, as it no longer exists in
> FreeBSD 7.2-RELEASE: /boot/device.hints
> Does this look reasonable (y/n)?"
>
> which doesn't look very good.
>
> 16. so, i issued a shutdown -r now command and crossed my fingers.. the
> system is still up, but it hasn't been upgraded (uname still reports
> 7.0-p11 for booting form the GENERIC kernel, and 7.0-p9 for the custom
> kernel). on top, make buildworld fails with:
>
> "Stop in /usr/src/secure/lib/libssh.
> *** Error code 1 "
>
> every time.
>
> and worse,
>
> any csup command dies with "/libexec/ld-elf.so.1: /lib/libc.so.7: version
> FBSD_1.1 required by /lib/libthr.so.3 not found" along with a lot of other
> commands... any ideas??

Your world and kernel are out of sync, because of loading a not upgraded 
kernel with a freebsd-update'd 7.2 world. I would try fetching the 7.2 livefs 
ISO, mount it as a vnode and install the GENERIC kernel from there to get your 
system back in working order.
Example steps:
$ sha256 /data/isos/7.2-RELEASE-i386-livefs.iso
SHA256 (/data/isos/7.2-RELEASE-i386-livefs.iso) = 
4faa7b9d78d125f9b28521247e32e1f0bef3b0b0f21b654ba22c6e79ca3301ce

$ sudo mdconfig -a -t vnode -f /data/isos/7.2-RELEASE-i386-livefs.iso -u 0
$ sudo mount -t cd9660 /dev/md0 /mnt
$ sudo mv /boot/kernel /boot/kernel.bogus
$ sudo cp -Rp /mnt/boot/kernel /boot/
$ shutdown -r now # may need sudo if you're not in operator group

If you still have problems after this, it's likely you need single user mode 
to get back into working order. Given the number of errors given by the second 
freebsd-update upgrade command I wouldn't trust a freebsd-update rollback.

This would be where I'd restore the backups using a livecd and restart the 
freebsd-update process, this time sticking verbatim to the handbook, but 
skipping the "portupgrade test run".
-- 
Mel


More information about the freebsd-questions mailing list