{"id":31,"date":"2009-01-27T12:48:27","date_gmt":"2009-01-27T20:48:27","guid":{"rendered":"http:\/\/porkrind.org\/missives2\/?p=31"},"modified":"2013-05-30T01:47:19","modified_gmt":"2013-05-30T08:47:19","slug":"upgrading-from-debian-32-bit-to-64-bit","status":"publish","type":"post","link":"https:\/\/porkrind.org\/missives\/upgrading-from-debian-32-bit-to-64-bit\/","title":{"rendered":"Upgrading from Debian 32 bit to 64 bit"},"content":{"rendered":"<p>I got a new Intel core i7 computer and migrated my Debian server over to it. Here&#8217;s how to do it without installing from scratch:<\/p>\n<p>First off, <a href=\"http:\/\/www.digitalkingdom.org\/~rlpowell\/hobbies\/debian_arch_up\/index.html\">read this article.<\/a> I followed the instructions and only deviated in a couple places.<\/p>\n<p>I found that during the 64-bit libc install I had to run<\/p>\n<pre>dpkg --force-architecture -i libc6-i386_2.7-18_amd64.deb libc6_2.7-18_amd64.deb<\/pre>\n<p>instead of:<\/p>\n<pre>dpkg --force-architecture -i libc6-i386_2.7-18_amd64.deb<\/pre>\n<p>Yeah, even though libc6-i386_2.7-18_amd64.deb had already been installed.<\/p>\n<h1>Cheating with a chroot<\/h1>\n<p>One thing I did in addition to what the article suggested was to build a chroot for 64 bit stuff so I could download things with ease.<\/p>\n<pre>debootstrap --arch=amd64 lenny `pwd`\/root64<\/pre>\n<p>Then,<\/p>\n<pre>chroot root64<\/pre>\n<p>From there I could &#8220;<tt>apt-get install<\/tt>&#8221; and look through dependencies and none of it was impacted by the state of my main machine. Apt gets screwed up for a while in the process and it was helpful to go find what a packages real dependencies were.<\/p>\n<p>In particular I did &#8220;<tt>apt-get install ia32-libs<\/tt>&#8221; which got all the compat libraries. From there I could go into root64\/var\/cache\/apt\/archives\/ and get right to the .deb files.<\/p>\n<p>I also used aptitude to resolve many of the <tt>apt-get -f install<\/tt> problems (once I had reinstalled enough by hand to stop the ELFCLASS errors).<\/p>\n<h1>apt-get -f install<\/h1>\n<p>My biggest &#8220;<tt>apt-get -f install<\/tt>&#8221; problem was some old java stuff that couldn&#8217;t run its post-upgrade or post-rm scripts and so couldn&#8217;t be upgraded or removed. Paying very close attention to what the script was doing I was able to remove a package the script used, rendering it a NOP (it was only doing something if the other package was installed).<\/p>\n<h1>Binary incompatibility<\/h1>\n<p>My biggest problem in general was that stupid Sleepycat morons made their %$#@! db&#8217;s binary format incompatible between 32 and 64 bit machines. Way to go guys\u2014that&#8217;s thinking. This means that any packages you have that rely on libdb4.2 are screwed. For me this was Netatalk and the Cyrus IMAP server.<\/p>\n<h2>Netatalk<\/h2>\n<p>Netatalk turned out to be pretty easy. Just delete the .AppleDB files in the share directories. Netatalk uses them as caches and so it&#8217;s perfectly acceptable for them to go away (though if you have aliases that point into your share then they may break\u2014I didn&#8217;t so I didn&#8217;t care).<\/p>\n<h2>Cyrus<\/h2>\n<p>Cyrus turned out to be pretty easy too, once I figured out what was happening. <a href=\"http:\/\/bugs.gentoo.org\/show_bug.cgi?id=232464#c4\">This post on the gentoo bugzilla<\/a> explained how to recover, and it worked as advertised. Thanks to Rumi Szabolcs for posting that.<\/p>\n<p>I installed Cyrus on a 32 bit linux machine I (luckily) had and converted the mailboxes file. Though it looks from the man page of cyrreconstruct (what it&#8217;s called in debian, by the way) that the -f command will reconstruct the mailboxes.db file from the directory layout, which might be handy if you don&#8217;t have a 32 bit Debian machine handy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got a new Intel core i7 computer and migrated my Debian server over to it. Here&#8217;s how to do it without installing from scratch.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-31","post","type-post","status-publish","format-standard","hentry","category-sysadmin"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/posts\/31","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":9,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"predecessor-version":[{"id":81,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/posts\/31\/revisions\/81"}],"wp:attachment":[{"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/porkrind.org\/missives\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}