Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Feb 2009 15:32:25 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Andrew Moran <amoran@forsythia.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Upgrade from FreeBSD 7.1/i386 to FreeBSD 7.1/AMD64?
Message-ID:  <20090223213225.GC45976@dan.emsphone.com>
In-Reply-To: <54B6CFF8-1C2C-40C6-AB90-AABA3ADFA0E7@forsythia.net>
References:  <A8482213-D958-4084-8214-AFC201471991@forsythia.net> <20090223200512.GA47390@slackbox.xs4all.nl> <54B6CFF8-1C2C-40C6-AB90-AABA3ADFA0E7@forsythia.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 23), Andrew Moran said:
> I have 8 gigs of memory in this system, and I decided go to the ZFS route,
> and am now getting kernel panics about kmem exhaustion.  I know there are
> some tweaks I can do to help alleviate these, but I want to address all my
> memory before I increase the kernel memory.
> 
> I don't need the ports to be 64-bit, but they SHOULD run just fine  
> without recompiling, yes?

As long as you never recompile anything again, yes :)  But as soon as you
upgrade (say) libX11 to 64-bit, all dependant libraries and program will
need to be brought up to 64-bit as well.  You might as well do them all.

I just did this 32->64 upgrade a few weeks ago, and since I had a ZFS root,
I was able to do this:

  Snapshot+clone a new copy of my root filesystem (called root.amd64)

  Do a cross-build+installworld into that partition

  Install a 64-bit kernel into my /boot partition (installed as
    /boot/kernel.amd64 temporarily)

  Edit /boot/loader.conf and add
    vfs.root.mountfrom="zfs:local_pool/root.amd64"
    kernel="kernel.amd64"

  Edit /etc/fstab on root.amd64 to mount / from local_pool/root.amd64

  Cross fingers, and reboot into amd64-land

  Portupgrade -fa (this step wan't flawless since I was also upgrading
    through the perl58 and gnome-2.24 updates, but still took less than 24
    hours)

All the while having my i386 kernel and root available to reboot back into
if I screwed something up horribly :)

If you use any programs that keep machine-dependant file formats (rrdtool
data files, for example), export them to a portable format before the
switch, and reimport them afterwards.

When I was satisfied I had a stable system, I moved my 64-bit kernel into
/boot/kernel, removed the kernel= line from boot.conf, promoted the cloned
root.amd64 filesystem and destroyed the i386 root and the snapshot.


-- 
	Dan Nelson
	dnelson@allantgroup.com



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