[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to tell if kernel compiled from kernel.org is x86_64 or just 32 bit?



I'm not sure how it works for the kernel images because those are compressed. You can use file otherwise:

[rlc deafeng3 ~]$ file /usr/bin/zip
/usr/bin/zip: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

Here is my attempt to use file on a kernel image.

[rlc deafeng3 ~]$ file /boot/vmlinuz-2.6.29.4-167.fc11.x86_64
/boot/vmlinuz-2.6.29.4-167.fc11.x86_64: Linux kernel x86 boot executable bzImage, version 2.6.29.4-167.fc11.x86_64 (mockb, RO-rootFS, swap_dev 0x2, Normal VGA

file -k doesn't give much more:

[rlc deafeng3 ~]$ file -k /boot/vmlinuz-2.6.29.4-167.fc11.x86_64
/boot/vmlinuz-2.6.29.4-167.fc11.x86_64: Linux kernel x86 boot executable bzImage, version 2.6.29.4-167.fc11.x86_64 (mockb, RO-rootFS, swap_dev 0x2, Normal VGA\012- x86 boot sector, code offset 0x5

Bob



On 06/21/2009 12:56 PM, Antonio Olivares wrote:
Dear fellow Fedora users,

Is there a way to tell if a kernel is 64 bit or 32 bit? If one compiles and installs a kernel from kernel.org.  Why am I asking?  I have a 64 bit Fedora 11 installed and it showed 2.6.29.4-???x86_64 at the end so I know it is a 64 bit kernel.  I copy the config of that kernel and compile a new one and install it, is that kernel still a 64 bit kernel or is it a 32 bit kernel?  When compiling I see just x86/ directories in the source of the kernel and no x86_64?

I have a modem that needs drivers to con nect the modem is 32 bit only but can be compiled in 64 bit code, I tried without success compiling it against the 2.6.29.4-?? x86_64 kernel.  However, after compiling the kernel from kernel.org and compiling the same code it succeeded and it runs under the 2.6.30 kernel.  I know that `uname -a` will tell many things about our running kernels, but is there something else that can tell us?

Or when we compile a kernel.org kernel, do we have to say compile it in 64 bit?
I have compiled several kernels, but not knowing if the new kernel is indeed 64 bit or not?

BTW:  Hope you have an excellent Father's Day!

Regards,

Antonio






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]