Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Solaris on a AMD-

uname -a gives

OS Solaris 10 x86_64 (SunOS goldtpus34 5.10 Generic_144489-11

I wanted to find whether it has a 32bit or 64 bit kernel so I did

/usr/bin/isainfo -k

it says


but when i do

file /sbin/init 

it says

ELF 32-bit LSB executable 80386 Version 1, dynamically linked, stripped

Also if I do file it says

ELF 64-bit LSB executable AMD64 Version 1 [SSE2 SSE FXSR FPU], dynamically linked, not stripped 

So is it possible to have a Kernel working in 64bit mode but System utils/process spawner(init) in 32bit mode.

I am confused.

How to accurately get if the OS Kernel is in 64/32 bit mode on Solaris and on Linux?

share|improve this question
The majority of binaries in a 64-bit installation of Solaris are 32-bit binaries. There is a historic reason for this related to the differences between SPARC chips and x86 chips. This is different than the approach taken with Linux. So even if the kernel is booted in 64-bit mode, you will see that init is a 32-bit binary. As Bon Gart says, the "isainfo" command is specifically designed to show which kinds of programs the kernel can run. – Chris Quenelle May 22 '12 at 5:42

The output of isainfo -k shows you in what mode the kernel is running. In your case you are running a 64-bit kernel. Everything inside the kernel is run in 64-bit mode (device drivers, system calls, etc. etc.)

The beauty of Solaris (and plenty other OSs, I assume) is that it can natively execute 32-bit binaries as well. Most programs, tools, utilities that come with the Solaris OS are 32-bit tools. The only exceptions are the ones you can find in /usr/bin/amd64. Those are usually the ones that have to work with kernel structures directly or want to take advantage of the bigger directly addressable memory space. They are chosen automatically (their 32-bit counterparts can be found in /usr/bin/i86) through /usr/lib/isaexec which the tools in question are hard-linked to (/usr/bin/ps, for example, is a hard link to /usr/lib/isaexec).

init only comes in the shape of a 32-bit binary, which is a-okay. It doesn't say anything about what kernel you are running. I am quite sure that the same init from a Solaris 2.3 image will still run perfectly fine under Solaris 11 (under SPARC, that is). It doesn't really do anything exciting.

share|improve this answer

This thread at the Oracle forums explains your situation quite well, in that it deals with someone else who shares your confusion. I'll quote a few of the relevant points, but you should read through the thread.

Solaris 10 is delivered in both architectures, 32-bit and 64-bit, in the same media. The right mode will be automatically selected on first boot after installation.

If the system is booted in 32-bit, then Solaris has detected a 32-bit CPU.

What are the outputs of this commands :

# isainfo -kv

# psrinfo -pv

So, if the OS reports that it has detected a 64 bit processor, then it will be working in 64 bit mode.

share|improve this answer
Thanks. Read the thread at oracle forums. But still I am wondering why would /sbin/init show as 32 bit when the 64 bit Solaris 10 Kernel is booted up(in my case). init is the first main process launched by kernel after bootup so it still is strange to me. – goldenmean May 18 '12 at 16:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .