From owner-freebsd-questions@FreeBSD.ORG Sat Sep 29 19:08:57 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A00BF16A41A for ; Sat, 29 Sep 2007 19:08:57 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 0F92413C467 for ; Sat, 29 Sep 2007 19:08:56 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.14.1/8.14.1) with ESMTP id l8TJ8k6u078826; Sat, 29 Sep 2007 20:08:48 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Message-ID: <46FEA2BE.30302@infracaninophile.co.uk> Date: Sat, 29 Sep 2007 20:08:46 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.6 (X11/20070803) MIME-Version: 1.0 To: Aryeh Friedman References: <44r6khh4xh.fsf@Lowell-Desk.lan> <8cb6106e0709290907j3babcbabt83c97712045b3d0e@mail.gmail.com> <499c70c0709290937r63c7118dn9474885b02fc5eb8@mail.gmail.com> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (smtp.infracaninophile.co.uk [IPv6:::1]); Sat, 29 Sep 2007 20:08:48 +0100 (BST) X-Virus-Scanned: ClamAV 0.91.2/4429/Sat Sep 29 07:49:25 2007 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,NO_RELAYS, URIBL_RHS_DOB autolearn=no version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on happy-idiot-talk.infracaninophile.co.uk Cc: josh.carroll@gmail.com, Lowell Gilbert , FreeBSD Mailing List Subject: Re: what cpu type to use for a intel duo e6850 (i386 or amd64) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Sep 2007 19:08:57 -0000 -----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-----