Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2002 21:01:25 -0700 (PDT)
From:      Annelise Anderson <andrsn@andrsn.stanford.edu>
To:        nate <freebsd@aphroland.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: how to do a binary upgrade on a live system?
Message-ID:  <Pine.BSF.4.10.10205292031190.63766-100000@andrsn.stanford.edu>
In-Reply-To: <64883.10.121.110.34.1022715990.squirrel@webmail.linuxpowered.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 May 2002, nate wrote:

> i have been using freebsd for a couple years(off and on)
> one thing i have never done much of is upgrading. from what
> i have seen sofar, there doesn't seem to be an elegant way
> to perform a binary upgrade on a freebsd system. most of

I think this is correct.  The elegant way to upgrade is to rebuild
from source, except for the binary upgrades available along a
release branch (e.g., 4.5).  The source upgrade is also a lot
safer, as if the new kernel doesn't boot, or the system doesn't
build, you can revert to the existing installation and kernel.

> my background is debian, and it is normal for me to upgrade
> a running system  to the next minor, or even major release
> without any need for shutdown/reboot or anything. e.g I
> upgraded my debian 2.2 workstation to 3.0 last august, and still
> have not rebooted, uptime of 376 days sofar. I do periodic
> upgrades every couple of months, usually 100-200 packages
> get upgraded each time. with about 800 packages getting upgraded
> during the major number change 2.2->3.0

The FreeBSD kernel and userland (base system) are more closely
related than in linux, and booting a new kernel is a basic part
of upgrading the system.  Third-party software doesn't require
a new kernel.  Some parts of the base system can, however, be
rebuilt and installed without doing the entire system, but whether
or not it will work depends on the changes.
 
> the freebsd install docs say to use the sysinstall with
> the version of freebsd that i am upgrading to. I am upgrading
> to 4.5 from 4.4(clean install). I am doing this just to see

Then you have someone at the "remote" location to put a CD in
the drive for you? 

> however, I cannot find a sysinstall binary on the freebsd 4.5
> install cd. i mounted it, and did a find . -name sysinstall and
> it came back with nothing. please don't tell me i have to boot
> from something to upgrade!! a major showstopper for openbsd
> for me was the fact that to do a binary upgrade I had to
> boot from the cdrom/floppy(from what i read/understood at
> the time of 2.8 anyways). which is very very difficult for
> remote machines.

Yes, that's why I do remote upgrades from source. I also do them
without going into single-user mode for installworld, but the
machine is not heavily loaded.

> I am running this test mainly to decide whether or not to
> upgrade my existing freebsd server(only have 1 sofar). so
> if i trash this system in the process it doesn't matter.
> nothing is on it.

The warnings on the binary upgrade process suggest it's not for
production servers. But the recommendation for production servers
is a hot spare, in any case--i.e., having a new system ready to
go and making sure it works before you switch.

> 
> reasons i don't want to a source install:
> - takes a long time
> - the system installs a lot of development packages to do
> the compile work(packages i don't need on a production system)
> - at least on openbsd 2.8, when I tried to upgrade, it tried to
> install stuff that I did not have installed, such as kerberos,

You can use /etc/make.conf to not build what you don't want to
build.  

All that said, for a 4.4 to 4.5 binary upgrade you'd probably
get by with using the existing sysinstall and changing the
release name in the options page to 4.5-RELEASE

Then you run sysinstall and select the Upgrade An Existing System
option from the main menu.  (Read the warnings carefully and back
out if you want to do so.)

Alternatively, you could install source code from the 4.5 CD (or
get it with cvsup) and build a new sysinstall binary and install it.

A binary upgrade from the sysinstall menu overwrites with new
binaries those distributions (FreeBSD doesn't have "packages" for
the base system, but it does have distros) you select.

You should save your existing /etc somewhere safe, although the
Upgrade option will probably do this and try to do a "reasonable"
merge of the old and new, leaving most of the work for you.  The
mergemaster program can't be used, although if you installed source
code you could use it after your binary upgrade.  (Merging configured
files is the hard part).

A binary upgrade isn't terribly different from mounting the installation
CD and typing as root "sh install.sh" in each of the distro directories,
but note that the bin distribution will entirely overwrite your /etc
directory and thus all your configuration files, so the machine may not
come on line when rebooted. I think (but am not sure) the bin distro
includes the kernel.

Full source code takes about 350 megabytes.  When you do a "make
buildworld" you need another 350 megs to store the output, but note
that after everything is done this stuff (/usr/obj and it subdirs)
can be deleted.

I think there are some on-line tutorials on doing a binary upgrade.
Whether you do a source or a binary upgrade, you will want someone
at the remote location who can at least reboot the machine and type
in a boot sequence for you in case things don't go right.

Good luck.

	Annelise
-- 
Annelise Anderson
Author of: 		 FreeBSD: An Open-Source Operating System for Your PC
Available from:	 BSDmall.com and amazon.com
Book Website:    http://www.bittreepress.com/FreeBSD/introbook/	




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10205292031190.63766-100000>