Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Well, I've been running linux, for, I don't know, 2 years maybe and this topic is still a bit blurry to me.
Regarding the 64 BIT CPU architecture, when I install a 64bit distro on a 64 bit PC, is all the software 64 bit on it or is it just the kernel 64 bit and it handles everything else ?
If so, that means that every program written for linux can operate both on a 32 bit CPU and a 64 bit one. Is that statement correct ?
If it's not, if every software is 64 bit, can normal 32bit applications be runned on a 64 bit linux install or it is impossible?
Now, if I have a 64 bit CPU for example, and I have a 32 bit linux distro installed on it, and I add lets say 10GB ram on it, in order for the distro to recognize that amount of RAM I need to have a 64 OS. Can I just replace my current 32bit kernel on the distro with a 64 bit one so I don't have to make a full reinstall ?
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,306
Rep:
A 32 Bits OS runs on 32 bits Box and on 64 bits box
64 Bits OS do not run on 32 bits Box
Having a 64 Bits OS does not mean that all programs are already 64 Bits in this case you find Lib64 and lib32
Why did you like to have 10GB ?
No not only the kernel
Hope this will help
The kernel can be compiled with both the 64 and 32-bit interface (well, for x86_64). So it should be possible to have a 64-bit kernel while libc and most other apps are 32-bit; you just have to make sure your other tools (like udev) are compatible with the version of kernel you are installing.
As ronlau9 already pointed out, 64-bit apps will not run on a 32-bit system.
The 32-bit kernel should also be able to see all your RAM; you will have to compile the kernel and activate the necessary options in the configuration (large memory and PAE). If I recall correctly, the 32-bit kernel was able to address at least 16GB using this scheme about 4 years ago.
1) multilib - here the kernel is 64-bit with 32-bit compatibility enabled, this allows you to run both 64-bit and 32-bit apps, but each much have their own respective libraries and dependencies. So there is a lib/lib32 and lib64, each with their own libraries and dependencies, this is because you cannot link between 32-bit and 64-bit libraries. If setup correctly you can even compile both 32-bit and 64-bit apps.
2) purelib - here the kernel is 64-bit without 32-bit compatibility, you can only run 64-bit apps.
And then there's the 32-bit distro which only runs 32-bit apps.
The CPU, if it is classified as x86_64 can run in 2 modes, a 64-bit mode and a 32-bit mode, this is usually automagic and depends on the kernel's word length. Note that it is advantageous to run in 64-bit mode because it will allow for greater performance when using lots of RAM, and on many processors some SIMD registers are only available in 64-bit mode. Read more here: http://en.wikipedia.org/wiki/X86_64
I'm running a 64bit distro other than being a whole lot faster it's the exact same as 32bit
All the apps in the distro are 64bit
I can run 32bit apps
if you have a 64bit machine go for it
when I install a 64bit distro on a 64 bit PC, is all the software 64 bit on it
Probably (but that may depend on what you mean by "software"). Most distributions are built entirely from open source material. Since there is source code available, there is almost never a good reason to use any 32 executables.
Quote:
If so, that means that every program written for linux can operate both on a 32 bit CPU and a 64 bit one. Is that statement correct ?
That's probably true of the type of thing one might include in a distribution. But there are plenty of non open source programs written for Linux that aren't available compiled for 64 bit and even some open source programs that wouldn't work if compiled for 64 bit.
Quote:
can normal 32bit applications be runned on a 64 bit linux install or it is impossible?
Most x86_64 distributions include support for running ordinary 32 bit applications. That support includes some 32 bit library binaries that are the reason I questioned what you meant in your first question.
Quote:
Now, if I have a 64 bit CPU for example, and I have a 32 bit linux distro installed on it, and I add lets say 10GB ram on it, in order for the distro to recognize that amount of RAM I need to have a 64 OS.
Not true. A 32bit Linux kernel can be configured to handle 10GB of ram.
Quote:
Can I just replace my current 32bit kernel on the distro with a 64 bit one so I don't have to make a full reinstall ?
I'm pretty sure you can't use a 64 bit kernel in a 32 bit install.
The ability for 32 bit applications to run under a 64 bit kernel within a 64 bit distribution is not quite enough to mean that 32 bit for everything but the kernel would work with a 64 bit kernel.
I don't know the details of why it wouldn't work. But the various expert comments I've seen on that question all agree it won't work.
I'm pretty sure you can't use a 64 bit kernel in a 32 bit install.
The ability for 32 bit applications to run under a 64 bit kernel within a 64 bit distribution is not quite enough to mean that 32 bit for everything but the kernel would work with a 64 bit kernel.
I don't know the details of why it wouldn't work. But the various expert comments I've seen on that question all agree it won't work.
Oh, you can use a 64-bit kernel in a 32-bit install, but not a 32-bit kernel in a 64-bit install. Just make sure you enable 32-bit emulation. I don't see why anyone would do this, because there would be very little if any benefit.
Oh, you can use a 64-bit kernel in a 32-bit install, but not a 32-bit kernel in a 64-bit install. Just make sure you enable 32-bit emulation. I don't see why anyone would do this, because there would be very little if any benefit.
The reason seems to be clear in this thread, and has been clear in several other threads:
Someone has already installed a 32 bit distribution on 64 bit hardware. They then want to change kernels, either because they added ram or they changed their mind about how they wanted existing ram supported. They don't want to reinstall an entire distribution. Dropping in a new kernel is much simpler.
The answers I recall seeing in the past say you can't do that. If you have installed a 32-bit distribution, you can drop in a differently configured 32-bit kernel (that may support ram over 4GB, even if the original distribution didn't) but you can't drop in a 64-bit kernel.
I haven't tried it myself, nor do I recall seeing any posts from anyone who tried it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.