Skip to content

Today I migrated from 32-bit to 64-bit, in-place

This evening I sat down and migrated my personal virtual machine from a 32-bit installation of Debian GNU/Linux to a 64-bit installation.

I've been meaning to make this change for a good few months, but it took me until this evening until I decided it was as good a time as any.

Mostly the process is painless:

  • Ensure you have a 64-bit kernel, with support for 32-bit binaries too.
  • Install the 32-bit compatibility libraries, such that your old binaries work.
  • Overwrite your binaries and libraries in-place so you have a 64-bit base system.
  • Patch it up afterwards.

I overwrote a lot of the libraries and binaries on the system such that I had a working 64-bit apt-get, dpkg, sash, etc, and associated libraries. Then once I had that I could use those tools to pull the resto of the system up to date.

One thing I hadn't counted on is that I needed to have a 64-bit version of bzip such that "apt-get update" didn't complain about errors. I suspect I could have fixed that by re-configuring my system to disable compression. Still it was easily solved.

Along the way I also shot myself in the foot by having a local caching DNS resolver, listening on 127.0.0.1, which broke. With no DNS I couldn't use apt-get - but once the problem was identified it was trivial to fix.

Anyway all seems OK now. My websites are up, email is flowing and I guess anything else can wait until the morning.

ObQuote: "Somebody's coming up. Somebody serious." - Leon

Comments On This Entry

  1. [gravitar] Joshua

    Would you mind elaborating a bit about what you had to do to do this cleanly? I want to eventually do something similar, though I have little reason to right now, so the information could be helpful.

    Specifically, some more information on what you replaced and how (manually extracted the amd64 debs? Some other way?), and notes about any other gotchas to look for, like the bzip one. Did you have to do anything to force all packages to update, did it update them all automatically on the next update, or is it just slowly phasing out the i3866 packages as new versions appear?

    I intend to test the process thoroughly in a VM install before trying it on a live system, but extra information from someone that's already done it would be appreciated. I've searched online, but found very little useful information on it so far.

  2. [gravitar] Samuel Orr

    I am quite impressed. I never knew Debian was capable of such a thing.

  3. [gravitar] Joshua

    Thanks for the link; I don't know if I looked into this before that page was created (I researched this a while back) or if my searching was just flawed, but I had no luck finding anything on the process at the time.

    I have it and this post bookmarked for reference later, when I get around to doing the same thing. Thanks again :)

  4. [author] Steve Kemp

    Mostly I followed this guide:

    (I made a minor edit to the page, which might be helpful. Other problems I encountered were a little more Steve-specific. e.g. updating from my own repositories wasn't possible until my webserver could start..)

  5. [gravitar] Claudius

    It might also be worth to have a look at http://users.digitalkingdom.org/~rlpowell/hobbies/debian_arch_up/ which worked quite well for me back in 12/2010.

  6. [gravitar] Zac Slade

    I'm still working through this on my first machine, but I should be successful once I can load /sbin/init.

    A heads up to any LVM users out there. Make sure you install LVM, mdadm or any other tools needed to mount your root volume in the 64-bit chroot, otherwise you'll be spending a lot longer in the recovery environment than you want!

    Other than that these instructions and the one's linked make this process fairly straightforward.

    Thanks!

  7. [gravitar] Guillermo Garron

    If someone would have asked me if it is possible to switch from 32 to 64 bits in a working installation of Linux.
    I would have said "No, you have to re-install everything"

    You proved me wrong, thanks for this article.