From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 21 14:55:38 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CE45A65 for ; Wed, 21 Jan 2015 14:55:38 +0000 (UTC) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.fagskolen.gjovik.no", Issuer "Fagskolen i Gj??vik" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F1981C86 for ; Wed, 21 Jan 2015 14:55:37 +0000 (UTC) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.14.9/8.14.9) with ESMTP id t0LEtUTQ084004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Jan 2015 15:55:30 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.14.9/8.14.9/Submit) with ESMTP id t0LEtTWN084001; Wed, 21 Jan 2015 15:55:30 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Wed, 21 Jan 2015 15:55:29 +0100 (CET) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: Matthias Apitz Subject: Re: make installworld/kernel of an amd64 system into an i386 system In-Reply-To: <20150121121117.GA10645@sh4-5.1blu.de> Message-ID: References: <20150121121117.GA10645@sh4-5.1blu.de> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.fig.ol.no Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 14:55:38 -0000 On Wed, 21 Jan 2015 13:11+0100, Matthias Apitz wrote: > > Hello, > > I actually run on one of my laptops (Acer C720) a very fresh -HEAD > (r276659), but in 32bit; I want to change this to amd64; I produced a > amd64 memstick which boots fine and also has the sources and obj tree which > was used to create the memstick in > > /usr/local/acerc720/src > /usr/local/acerc720/obj-amd64 > > What I now think as update procedure to install amd64 into the laptop > is: > > - boot the amd64 system from USB > - mount the old i386 root in /dev/ada0p2 as /mnt (there is only this one big > file system, /dev/ada0p1 is boot and /dev/ada0p3 is swap) > - run > cd /usr/local/acerc720/src > MAKEOBJDIRPREFIX=/usr/local/acerc720/obj-amd64 export MAKEOBJDIRPREFIX > make installworld DESTDIR=/mnt > make installkernel DESTDIR=/mnt > make distrib-dirs DESTDIR=/mnt > make distribution DESTDIR=/mnt > mv /mnt/usr/local/lib /mnt/usr/local/lib32 > cp /etc/rc.conf /mnt/etc > cp /boot/loader.conf /mnt/boot > echo 'ldconfig32_paths="/usr/lib32 /usr/local/lib32"' >> /mnt/etc/rc.conf > reboot > > I know that it may happen that not all of the installed packages (with the shared > objects now in /usr/local/lib32) will work, and I have to recompile > some (or even all) of them, but the system should come up, I think. > > Any comments about the procedure or something I missed out? I experimented with migrating i386 to amd64 earlier this January. I used the official snapshots to do the main part of the transition, and that route is a timesaver in my book. Be sure to omit /boot, /etc, /root, and /var from the base distribution (base.txz). I ensured all ports were up-to-date before committing the transition to amd64. And I never messed with /usr/local/lib, since I instantly rebuilt all ports. Using ports-mgmt/portmaster is better than using ports-mgmt/portupgrade, at least until all ports are 64-bit native executables/libraries. My writeup is available for anyone interested: http://ximalas.info/2015/01/17/migrating-freebsd-from-i386-to-amd64/ Use at your own risk. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 21 15:15:01 2015 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CD0C11F for ; Wed, 21 Jan 2015 15:15:01 +0000 (UTC) Received: from albert.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DD74EE0 for ; Wed, 21 Jan 2015 15:15:00 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.9/8.14.9) with ESMTP id t0LFEwPs030704; Wed, 21 Jan 2015 07:14:58 -0800 (PST) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.9/8.14.9/Submit) id t0LFEwLf030703; Wed, 21 Jan 2015 07:14:58 -0800 (PST) (envelope-from david) Date: Wed, 21 Jan 2015 07:14:58 -0800 From: David Wolfskill To: Matthias Apitz Subject: Re: make installworld/kernel of an amd64 system into an i386 system Message-ID: <20150121151458.GO1059@albert.catwhisker.org> Reply-To: hackers@freebsd.org Mail-Followup-To: hackers@freebsd.org, Matthias Apitz , freebsd-hackers@freebsd.org References: <20150121121117.GA10645@sh4-5.1blu.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="991t1H9DIskWxVIu" Content-Disposition: inline In-Reply-To: <20150121121117.GA10645@sh4-5.1blu.de> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 15:15:01 -0000 --991t1H9DIskWxVIu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 21, 2015 at 01:11:17PM +0100, Matthias Apitz wrote: >=20 > Hello, >=20 > I actually run on one of my laptops (Acer C720) a very fresh -HEAD > (r276659), but in 32bit; I want to change this to amd64; I produced a > amd64 memstick which boots fine and also has the sources and obj tree whi= ch > was used to create the memstick in >=20 > /usr/local/acerc720/src > /usr/local/acerc720/obj-amd64 >=20 > What I now think as update procedure to install amd64 into the laptop > is: >=20 > - boot the amd64 system from USB > - mount the old i386 root in /dev/ada0p2 as /mnt (there is only this one = big > file system, /dev/ada0p1 is boot and /dev/ada0p3 is swap) > - run > cd /usr/local/acerc720/src > MAKEOBJDIRPREFIX=3D/usr/local/acerc720/obj-amd64 export MAKEOBJDIRPREFIX > make installworld DESTDIR=3D/mnt > make installkernel DESTDIR=3D/mnt > make distrib-dirs DESTDIR=3D/mnt > make distribution DESTDIR=3D/mnt > mv /mnt/usr/local/lib /mnt/usr/local/lib32 > cp /etc/rc.conf /mnt/etc > cp /boot/loader.conf /mnt/boot > echo 'ldconfig32_paths=3D"/usr/lib32 /usr/local/lib32"' >> /mnt/etc/rc.= conf > reboot > ... > Any comments about the procedure or something I missed out? > ... I am in the habit of setting up machines to use MBR, and have at least 2 of the resulting slices bootable. In a situation similar to yours, I had bootstrapped a new desktop to running stable/10 i386, and wanted to switch it to amd64 (while preserving the rest of the configuration). It was already set up so I could build world & kernel; I did that again, but issued "setenv TARGET_ARCH amd64" first. Once that completed, I mounted partitions 1 & 4 (a & d) from the "other slice" to a suitable mountpoint (e.g., /mnt), then: make installkernel DESTDIR=3D/mnt mergemaster -U -u 0022 -p -D /mnt rm -fr /mnt/usr/include.old mv -f /mnt/usr/include /mnt/usr/include.old rm -fr /mnt/usr/share/man make installworld DESTDIR=3D/mnt mergemaster -F -U -u 0022 -i -D /mnt make delete-old DESTDIR=3D/mnt I then rebooted from the "other slice"... and it came up running: FreeBSD 10.1-STABLE #127 r274634M/274637:1001502: Tue Nov 18 12:57:35 PST 2014 amd64 (I then used the procedure at the end of the portmaster man page to rebuild all ports, rebooted, and "cd /usr/src && make delete-old-libs".) That was back on 18 Nov, and the machine's been running without issues since. (I've been doing native source updates on it on Sundays recently, so it's now running FreeBSD 10.1-STABLE #129 r277317M/277317:1001506: Sun Jan 18 04:47:44 PST 2015 amd64.) Peace, david --=20 David H. Wolfskill david@catwhisker.org Those who murder in the name of God or prophet are blasphemous cowards. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --991t1H9DIskWxVIu Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUv8JxXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RThEMDY4QTIxMjc1MDZFRDIzODYzRTc4 QTY3RjlDOERFRjQxOTNCAAoJEIpn+cje9Bk7qEMP/13gMs/1NEr5kRVuXA/VQegD FNEFRGkhTzmDLU8qKNl726gwmu9a03KaHmcBJ1xZZpc6n+1rVbhjXTzy5jzYBFRh oIr2I94ylGKIHLL3y1ncaZy5PTOLrYc4Sk0uWVXnHLU/AM74nLc4oAh75suNKZaC g44a8CFlF6V1nLqz09vz41HxCjNKuFh1aweY008W7RUz8Hiw6OI87k91MpONhaLg /lGpuo5YZcGruvrE+z3CgxYgSCcmOrT0P5ccXxp+A4Ainczu2BE/nI1GqIcMo4bm fB5Ia4KQDYeS7Y4Y5QVrZ5QF4z8aMHgxw/e1NHwfjyx1pSfaq8DiAPWvrE7leJnt TCp41fPs5CloMzlSgxS4bXSEBgZBbX2BgVz08vmtXYgZGEuYdGf5so9F+cUozadw xEF0GsU7owSg+83YSzAarcdag+9+gF2u40r8GXS0RKoI+AzPzdH/Y98fW4YUzpdk 3du7Tu3zehxDK0v3ZSowRrdsIAKifmPbQ3ufeWsij9JnZXYa9rAwNmFlatDW1LYH QQCEc4+62DyiRy4yMBsh6vtfH2DkbFUDYu4XIaBwgTEdjf1fGbPEo5f72XXucpP/ OCy+qjBBiWQOZ3o3UFaL7UiW/cz/Nj/18DkB9a8zlRApTRzDERVi1HuyOJTDkc5Z QiOLRakINVZkNgyjEtV8 =HLtE -----END PGP SIGNATURE----- --991t1H9DIskWxVIu--