Date: Fri, 25 Nov 2016 16:51:11 +0000 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Subject: Re: FreeBSD upgrade 10.3 to 11.0 Message-ID: <447538f0-3507-3baa-e993-3652aa4aa655@FreeBSD.org> In-Reply-To: <CAP7QzkNZB7PrbtqKOXU5HJ-TCtkEe7n480Uj3KCYxGfn%2BEyf9w@mail.gmail.com> References: <21900172d2d5d5b4735453e274b5e86c.squirrel@webmail.harte-lyne.ca> <CAP7QzkNZB7PrbtqKOXU5HJ-TCtkEe7n480Uj3KCYxGfn%2BEyf9w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UDr1irx1C15OgFIVgqCtkoDR42UQRJjCo Content-Type: multipart/mixed; boundary="xNNMWD5TKA8GD1O0m42JpsBRkgJFvpiJI"; protected-headers="v1" From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-questions@freebsd.org Message-ID: <447538f0-3507-3baa-e993-3652aa4aa655@FreeBSD.org> Subject: Re: FreeBSD upgrade 10.3 to 11.0 References: <21900172d2d5d5b4735453e274b5e86c.squirrel@webmail.harte-lyne.ca> <CAP7QzkNZB7PrbtqKOXU5HJ-TCtkEe7n480Uj3KCYxGfn+Eyf9w@mail.gmail.com> In-Reply-To: <CAP7QzkNZB7PrbtqKOXU5HJ-TCtkEe7n480Uj3KCYxGfn+Eyf9w@mail.gmail.com> --xNNMWD5TKA8GD1O0m42JpsBRkgJFvpiJI Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016/11/25 15:42, B J wrote: > On 11/25/16, James B. Byrne via freebsd-questions > <freebsd-questions@freebsd.org> wrote: >> I am testing out the procedures to upgrade our existing FreeBSD hosts >> from 10.3 to 11.0 using a bhyve guest configured for the purpose. I >> have followed the instructions in the handbook/wiki to the best of my >> understanding. I have a question about the last step however. >> >> One is supposed to reinstall all of the port pkgs one has installed. >> Is there an automated way to do this provided by the FreeBSD >> community; or is this a case of roll your own script? >=20 > <snip> >=20 > I have two machines, each with two drives with FreeBSD. I upgraded > all of those systems to 11.0 recently and encountered the same thing. > What finally worked for me was to upgrade the ports with: >=20 > portsnap fetch > portsnap extract > portsnap update >=20 > and the packages as well with: >=20 > pkg update > pkg upgrade >=20 > It seemed that if I didn't do it, the upgrading process would > overwrite or remove some of the files and libraries, resulting in > things like Mate and Slim not working properly after I was finished. >=20 > BMJ Uh -- if you're using pkg(8) with precompiled packages, why do you need a ports tree installed? Anyhow, when upgrading from 10.x to 11.0 you should re-install all your packages. In fact, you don't need to do this *immediately* you upgrade your base system -- everything will keep working even though the OS has been upgraded beneath it. However, you will need to reinstall everything eventually -- basically before you start installing any new software or needing to upgrade some packages to a new version. That's because what tends to happen is that shared library ABI versions frequently get bumped at a major version increment. Now, libc and most of the important system shlibs are backwards compatible due to the use of ABI versioning, but that isn't true of *every* shared library in the OS. Plus the big problem comes when some program ends up trying to load two different ABI versions of the same shlib into the same binary -- that's pretty much a guaranteed crash and core dump. pkg(8) will upgrade almost everything for you if you simply run a 'pkg upgrade' after your OS upgrade, but it may not catch everything that needs to be reinstalled. Therefore the recommendation is to delete everything and reinstall. The best way to do that is: * Your backups are comprehensive and up to date and you've tested that you can restore from them haven't you? * Stop most daemons or other long-running software installed from ports. * Generate a list of everything you installed deliberately (ie. other than things pkg needed to install just to fulfil dependencies) # pkg query -e '%a =3D=3D 0' %n > /root/pkg-list * Delete all of your installed packages. (Be careful about deleting eg. bash if you use it as your login shell -- switch to /bin/sh or /bin/tcsh that comes with the system for this) # pkg delete -a That will remove everything except pkg(8) itself. You should make sure that /usr/local/bin, /usr/local/sbin and other subdirectories of /usr/local are now virtually empty. Config files under /usr/local/etc should still be present unless you've not modified them from the default versions supplied with the package, and web content under /usr/local/www/* or postgresql database content under /usr/local/pgsql/data should also be untouched. * Re-install all the packages from the list you made earlier. pkg(8) will automatically add all the packages it needs to fulfil dependencies, which can be different to what you needed with the previous version of the OS: # xargs pkg install < /root/pkg-list * Restart the daemons you stopped previously. Or it may be simpler just to reboot and let the normal startup process bring up all the daemons again. Cheers, Matthew --xNNMWD5TKA8GD1O0m42JpsBRkgJFvpiJI-- --UDr1irx1C15OgFIVgqCtkoDR42UQRJjCo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQJ8BAEBCgBmBQJYOGwSXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnwhAP/3iSzE8dy7Gqn9RO/mvlE0lr iRD2Lh4ilaNTGtqEGem2GuAj8M1AvYYPETwpaJKzA+nsYXF6PUePlQDnpsSfthHp 2MFLnReaceAbr3mj4Nnl+CZ1wxNkcg8bb6Im9Wzu79SA42LvG0blXlzyynCQD1ih 18nbmiXEJAapDWusL5WtnuidQo8vtd63544nnBWCqudzF8aVGnj7cfILng1+df7w faSflWHd5NlMhaPqMlG/4NMWyBMxgQpHogvkwDfZg8z7DeSwbp8IkGg0zKfHr3cS Z9WSJIKdHD/MC9mD0Iraa/jqhf//02sZYU4Mov8Po6jV2zT7qi47UUjdxfTqdBrW aUaSOi6ulIlKZRSZfPArphtn3AD9TAjkTEgP5sqPWRFFAVOVsXJwmnVVYvLW9b+F EzurtrabXKniDEr4A4tyzJMLXGTtWw1B2b7Jex2Gz+imxLVN5IoohkwSHQ265VXg JrJqj+hKAm3q7UZb9ICb+yzM31yZgZTwGI1yseBtNOw+z+k6nQej05b3K+8EJYaZ XzezYqFskIz4RzN/PmcIBgPcp+oa7hsZxxYwqhVua/bVzugcrl66WzpiRtV0Tnrc 18Ke7nPf7aY2rLayQ9jKmd2upPGRJwWXSDtkVjIiAbZHJ3qKUO9+gzrus8Yqmn5V gcFq6aEbggv7oRyDXpmk =FLnY -----END PGP SIGNATURE----- --UDr1irx1C15OgFIVgqCtkoDR42UQRJjCo--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?447538f0-3507-3baa-e993-3652aa4aa655>