Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Sep 2007 20:08:46 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Aryeh Friedman <aryeh.friedman@gmail.com>
Cc:        josh.carroll@gmail.com, Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>, FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: what cpu type to use for a intel duo e6850 (i386 or amd64)
Message-ID:  <46FEA2BE.30302@infracaninophile.co.uk>
In-Reply-To: <bef9a7920709291121s73a44b95p87c9d61ed011bc53@mail.gmail.com>
References:  <bef9a7920709262135l1daa6a45k3a2fc492f8711d42@mail.gmail.com>	<44r6khh4xh.fsf@Lowell-Desk.lan>	<bef9a7920709290903q3ab2a7e3x22de338ecd6af49e@mail.gmail.com>	<8cb6106e0709290907j3babcbabt83c97712045b3d0e@mail.gmail.com>	<bef9a7920709290911u10bcc4afq48a8bb2e483ebc09@mail.gmail.com>	<499c70c0709290937r63c7118dn9474885b02fc5eb8@mail.gmail.com> <bef9a7920709291121s73a44b95p87c9d61ed011bc53@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Aryeh Friedman wrote:
> Would the following procedure work to do an inplace upgrade:
> 
> 1. Download the amd64 iso
> 2. Install it on a spare disk/partition
> 3. Do a cvsup on it's /usr/src
> 4. Make buildworld/buildkernel

4.5 Install the updated kernel on the spare disk, reboot, then do
the usual installworld stuff to verify that the amd64 world you
built works correctly.

> 5. Mount the x86 disk/partition
> 6. Copy /usr/obj (and /usr/src for good measure) from the amd
> partition to the x48

No need to do this.  If you're booted from your temporary amd64
root and have your original i386 root+world mounted at eg
/mnt/i386/ then you can do this:

    cd /usr/src
    make installkernel installworld DESTDIR=/mnt/i386
    mergemaster -D /mnt/i386

However you'ld better have done a test reboot with the new amd64 kernel
before installing it like this -- if the new kernel won't boot then
the commands above will have very effectively hosed your system such
that the only way back is to recover from backup.


> 7. Reboot with x86 partition
> 8. Make installkernel/installworld mergemaster on x86 partition

No need to do 7 and 8 -- just reboot here.  You'll end up with an
amd64 system trying to run a bunch of i386 ports -- probably best
to have temporarily commented out large parts of /etc/rc.conf around
step (6) to keep things a little more sane.  Or just reboot to single
user mode, and do all of the ports recompiling in single user.

> 9. Now the non-ports section OS is amd64
> 10. pkg_del /var/db/pkg/*; rm -rf /usr/ports/ /usr/local
> 11. Reftp ports.tar.gz and rebuild all the ports (I have about 10 top
> level ports installed the rest are dependicies so this straight
> forward)

No need to blow away /usr/ports -- it's the same for all
architectures after all, plus you would have to re-download all
the source tarballs too.

No need to completely blow away /usr/local either -- unless you've
got a lot of other software not installed from ports.  Not blowing
away /usr/local means that your config files, web content etc. should
still be there, and usually there's little or nothing to change in
that sort of stuff between i386 and amd64.

   cd /var/db/pkg
   pkg_delete * 
   cd  /usr/ports/foo/bar
   make install
   etc...

Other things to consider -- are you running any databases -- MySQL,
Postgres, LDAP, that sort of thing?  In which case you should dump out
the DB contents to some device independant format before you start.
I can't say for certain, but it's quite possible that there will be
architecture dependant binary data structures used by that sort of
program, which could mean you would have to reload your data into a
fresh install of the application.

> So does it work?

Don't see why not.  The plan looks quite workable to me.  This is a
major operation however, and will take all day even if it goes smoothly.
Plus you're at quite high risk of rendering your system so completely
banjaxed that your only recourse is to recover from backup.  So make
sure you've got good backups.

	Cheers,

	Matthew

- -- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG/qK+8Mjk52CukIwRCKPmAJ0T0kmuyLnTL97cfJ1Sh+wAc/L61ACgj/R1
sYRHeSIKWwapAIp59SMLaAg=
=yg2W
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46FEA2BE.30302>