how to tell i386 from x86-64 kernel
Hi!
Quiz: on a booted system, how do you tell 32bit from 64bit kernel?
A1: zcat /proc/config.gz | grep CONFIG_64
...but config.gz is optional
A2: cat /proc/meminfo | grep High
...but i386 kernel could have highmem disabled
What is _your_ answer? ;-)>
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 1 line · Pavel Machek
Quiz: on a booted system, how do you tell 32bit from 64bit kernel?
Uhm, is this a trick question? What's wrong with uname(2)?
Quoted 4 lines · Ray Lee
Quoted 1 line · Pavel Machek
Quiz: on a booted system, how do you tell 32bit from 64bit kernel?
Uhm, is this a trick question? What's wrong with uname(2)?
# uname -m I won't tell you. # linux32 uname -m i686
Now what? :-)
Well, the answer is simple, a 64-bit kernel will allow you (minus selinux voodoo) to load 64-bit binaries.
Quoted 4 lines · Ray Lee
Quoted 1 line · Pavel Machek
Quiz: on a booted system, how do you tell 32bit from 64bit kernel?
Uhm, is this a trick question? What's wrong with uname(2)?
No, it is a tricky question. You are right, uname -a tells me. Sorry.
Still, it would be nice to print it as a first message of dmesg, so that it automatically gets included with problem reports... on easy-to-see place.
Pavel
Linux version 2.6.24-rc8 (pavel@amd) (gcc version 4.1.3 20071209 (prerelease) (Debian 4.1.2-18)) #65 SMP Thu Jan 31 00:02:37 CET 2008 BIOS-provided physical RAM map:
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Quoted 6 lines · Pavel Machek
Hi!
Quiz: on a booted system, how do you tell 32bit from 64bit kernel?
A1: zcat
/proc/config.gz| grepCONFIG_64
Quoted 8 lines
...but config.gz is optional
A2: cat
/proc/meminfo| grep High...but i386 kernel could have highmem disabled
What is _your_ answer? ;-)>
Pavel
uname -m
-hpa
Quoted 2 lines · H. Peter Anvin
Quoted 1 line
Quiz: on a booted system, how do you tell 32bit from 64bit kernel?
uname -m
I think that the real point here is that there is no general way how to determine whether the kernel is 32bit or 64bit from full dmesg output, which could sometimes make debugging user-reported bugs a little bit harder.
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 5 lines · El Fri, 1 Feb 2008 01:59:03 +0100 (CET) Jan Engelhardt…
# uname -m I won't tell you. # linux32 uname -m i686
Ubuntu 7.10 64 bit userland 2.6.24
$ uname -m x86_64 $ linux32 uname -m i686
Quoted 5 lines
Now what? :-)
Well, the answer is simple, a 64-bit kernel will allow you (minus selinux voodoo) to load 64-bit binaries.
Quoted 6 lines · Alejandro Riveira Fernández
Quoted 5 lines
# uname -m I won't tell you. # linux32 uname -m i686
Quoted 6 lines
Ubuntu 7.10 64 bit userland 2.6.24
$ uname -m x86_64 $ linux32 uname -m i686
What I am saying is that uname(2) does not reliably tell you whether you have a 64-bit kernel underneath unless you have other sources of information.
Quoted 10 lines · On Sat, 9 Feb 2008 21:13:43 +0100 (CET) Jan Engelhardt…
Quoted 8 lines · Alejandro Riveira Fernández
Quoted 5 lines
# uname -m I won't tell you. # linux32 uname -m i686Ubuntu 7.10 64 bit userland 2.6.24
Quoted 8 lines
Quoted 4 lines
$ uname -m x86_64 $ linux32 uname -m i686What I am saying is that uname(2) does not reliably tell you whether you have a 64-bit kernel underneath unless you have other sources of information.
that's sort of a rabbit-and-the-frog problem. The 32 bit emulator tries to look EXACTLY like the 32 bit kernel, and it really should.
If someone wants a method to detect even that... we would really want to know the exact usecase.. because very likely it's the wrong answer to some other problem ;-)
Signature · 3 lines
If you want to reach me at my work email, use [email protected] For development, discussion and tips for power savings, visit http://www.lesswatts.org
Quoted 22 lines · Arjan van de Ven
Quoted 10 lines · On Sat, 9 Feb 2008 21:13:43 +0100 (CET) Jan Engelhardt…
Quoted 8 lines · Alejandro Riveira Fernández
Quoted 5 lines
# uname -m I won't tell you. # linux32 uname -m i686Ubuntu 7.10 64 bit userland 2.6.24
Quoted 8 lines
Quoted 4 lines
$ uname -m x86_64 $ linux32 uname -m i686What I am saying is that uname(2) does not reliably tell you whether you have a 64-bit kernel underneath unless you have other sources of information.
Quoted 5 lines
that's sort of a rabbit-and-the-frog problem. The 32 bit emulator tries to look EXACTLY like the 32 bit kernel, and it really should.
If someone wants a method to detect even that... we would really want to know the exact usecase.. because very likely it's the wrong answer to some other problem ;-)
dmesg should really really tell you 32 vs. 64 bit, at the first line where it prints versions... so you easily know what you are dealing with when someone sends a bugreport.
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html