Using An x86_64 Kernel On An i686 Userland

I have been experimenting with running an x86_64 kernel with an i686 userland. The motivation for me was to be able to build both i686 and x86_64 packages on my primary system, because the access to the machine I have an x86_64 install on is becoming limited. I could have just reinstalled with x86_64, but I use wine regularly (I need MS Office for work, among other things) and I really dislike needing multilib or a chroot to run this in x86_64. Also, I did not want to do a reinstall on my primary production system (but other “risky” changes are fine…). Fedora had planned to ship an x86_64 kernel on 32-bit x86 with Fedora 11, but decided against it, so there is probably some issues with this setup.

The advantages I see of this setup are:

  • The ability to use more than 4GB RAM without compiling (a reportedly slower) PAE kernel. However, individual processes will still have the 32bit memory limitation.
  • Being able to create chroots for building both 32 and 64 bit packages.
  • There is no need for ugly multilib packages for wine, skype or whatever 32bit only software you need.

The last one is the only real advantage over running pure x86_64. The disadvantages are:

  • Not being able to automatically update the kernel and modules using the standard Arch repos.
  • Some configure scripts use uname to figure out which architecture to build for. This is worked around by using linux32.

I work around the update issue by creating a local repo containing just the kernel and its firmware and having this automatically updated when I rsync my local package mirror. I suspect that the second issue is probably a factor in Fedora backing out this change as it would not be very user friendly (although I have no confirmation of this).

Actually achieving this setup is easy. Just download the x86_64 version of the kernel26-firmware, kernel26 and any additional drivers you need and then install them. Reboot and marvel as the output of “uname -m” says x86_64! It is now several days since I did this and I have noticed no issues, although I have not done any major package building in that time.

I had to make a couple of changes to get the Arch devtools to run correctly (using linux32 when appropriate within i686 build scripts, using /etc/makepkg64.conf and a separate package cache for x86_64), but the changes are very minor. One day I will look into patching these properly as it would probably be useful for people wanting to use these on a pure x86_64 system to build i686 packages.

Comments are closed.