Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2009 15:30:48 -0800
From:      Andrew Moran <amoran@forsythia.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Upgrade from FreeBSD 7.1/i386 to FreeBSD 7.1/AMD64?
Message-ID:  <4C74AB92-D535-42AB-A326-351ADB5BF667@forsythia.net>
In-Reply-To: <20090223213225.GC45976@dan.emsphone.com>
References:  <A8482213-D958-4084-8214-AFC201471991@forsythia.net> <20090223200512.GA47390@slackbox.xs4all.nl> <54B6CFF8-1C2C-40C6-AB90-AABA3ADFA0E7@forsythia.net> <20090223213225.GC45976@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Feb 23, 2009, at 1:32 PM, Dan Nelson wrote:

> 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
>


Thank you for this posting.   This is exactly what I wanted to do.   
However, booting into the new kernel didn't work for some reason, so I  
wound up burning an AMD64 boot-only CD and reinstalling the minimal  
64bit version to the boot partition.  I was able to read all my ZFS  
filesystems, so no real loss of data.

I'm now going through the portupgrade -fa to upgrade all my ports.

--Andy




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C74AB92-D535-42AB-A326-351ADB5BF667>