make installworld/kernel of an amd64 system into an i386 system
David Wolfskill
david at catwhisker.org
Wed Jan 21 15:15:01 UTC 2015
On Wed, Jan 21, 2015 at 01:11:17PM +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
> ...
> 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=/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=/mnt
mergemaster -F -U -u 0022 -i -D /mnt
make delete-old DESTDIR=/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
--
David H. Wolfskill david at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 949 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20150121/c5211c0d/attachment.sig>
More information about the freebsd-hackers
mailing list