Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I compiled my own custom kernel in a 64 bit linux mint 16 installation. I've also heard that the 64 bit kernel could also run 32 bit applications too. Would it be possible to install it and use it in the 32-bit Ubuntu 13.10 installation or do I have to recompile it again for the 32-bit? If 32 bit Ubuntu would run on this kernel, Is there any problems I am going to encounter while using this kernel?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

The following combinations will work:

32 bit CPU with 32 bit kernel and 32 bit software
64 bit CPU with 32 bit kernel and 32 bit software
64 bit CPU with 64 bit kernel and 32 bit software
64 bit CPU with 64 bit kernel and 64 bit software

In general running 32 bit software with a 64 bit kernel means having most of your system 64 bit and just running a few 32 bit applications - usually things like skype or steam for which we do not have source code and hence cannot recompile for a new processor.

In theory it should be possible to run an entirely 32-bit userland with only a 64 bit kernel. See, eg reports of people doing this successfully on Arch. But the package manager is unlikely to be happy with this, so it would involve quite a lot of DIY.

In the past this was an attractive option because running 32 bit applications in a 64 bit userland was fraught with problems. This is now largely solved, so running a mixed system in this way seems to have few advantages, and many disadvantages, compared to just running a pure 64 bit system.

share|improve this answer
    
I've did it, I've appended "--force-architecture" and running the whole 32-bit OS in 64-bit kernel. Also the package manager is very confused which libraries to load. It looks up something like /usr/lib/x86_64-linux-gnu or /lib/x86_64-linux-gnu, which clearly I don't have. Creating symlinks solve it. Still I can't run 64 bit binaries in the 32 bit system. It just says "No such file or directory" but chrooting to my 64-bit install works and able to run 64 bit binaries. How come? –  user128712 Dec 6 '13 at 12:24
    
To run 64 bit binaries you'll need all the necessary 64 bit libraries - the 64-bit equivalent of the old ia32-libs metapackage. (Unless you have a completely statically linked 64 bit binary which depends on nothing). You can't dynamically link a binary and a library with different pointer/int sizes - the ABI doesn't match (see stackoverflow.com/questions/2412893/… ). –  chronitis Dec 6 '13 at 13:41

I don't believe that you can.

Kernels exist for 32-bit and 64-bit systems, make sure that you have the kernel matching your system. If you have 64-bit, then install and use the 64bit kernel. If you have a 32-bit system, then use 32bit kernel.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.