LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   What is the difference between i386 and x86_64? (https://www.linuxquestions.org/questions/linux-from-scratch-13/what-is-the-difference-between-i386-and-x86_64-a-793274/)

sathyanext 03-04-2010 05:47 PM

What is the difference between i386 and x86_64?
 
I have built a LFS 6.5 and working in BLFS. My plan is to create an i386 distro. But i dont know what's the reason for my output of "uname -m" command. It gives x86_64. What debian package can i add from dpkg(which version)?
"gcc --print-libgcc-file-name" gives i686.
what is i386,i686 and x86_64? what should i do to add .deb packages?

sathyanext 03-04-2010 05:49 PM

What is the difference between i386 and x86_64?
 
I have built a LFS 6.5 and working in BLFS. My plan is to create an i386 distro. But i dont know what's the reason for my output of "uname -m" command. It gives x86_64. What debian package can i add from dpkg(which version)?
"gcc --print-libgcc-file-name" gives i686.
what are i386,i686 and x86_64? what should i do to add .deb packages?

paulsm4 03-04-2010 06:08 PM

Dude - you've got a 64-bit CPU, and you got the 64-bit version when you installed. If (for whatever reason), you want a 32-bit version, then you need to re-install.

I'm not exactly sure what you mean by "create a distro", but if you mean that you want to use your (running) LFS system to create a set of files that somebody can use to install their own system (for example, make an installable .iso image), then you can certainly use any runtime ("host") system to create any "target" distro you want. For example, you don't need to be running a 32-bit "host" to create a 32-bit "target".

But if you want to use dpkg (or yum) to install stuff: well, yes - you're going to install stuff that's compatible with your runtime architecture. Which is, of course, x86_64.

Finally, "i686" is a subset of "i386". "i386" generally includes *all* 32-bit Intel architectures (386 through current Pentiums; but, more realistically, assumes at least a Pentium 2 or better). "x86_64" is a 64-bit Intel (which, of course, originally came from AMD. While Intel was still vainly trying to get the world to accept the Itanium).

'Hope that helps .. PSM

murankar 03-04-2010 06:15 PM

i386 i686 are different chip families of the 32 bit platform. x86_64 is a 64 bit chip.
i386 is an older cpu platform "legacy" if you will. back in the days of tandy those were usually i286 platforms. Then Intel came out with the Pentium family and called it i386 based chip.

before I start making a noob of myself check out these links and see if they can explain what I can't.
i386 -> http://en.wikipedia.org/wiki/Intel_80386 (keep in mind this is wiki and should be used as a starting point not the end all be all.)
i686 -> http://linux.about.com/cs/linux101/g/i686.htm

sathyanext 03-04-2010 06:23 PM

Oh.. thanks for your reply.. can you please tell me how to find the exact method of identifying whether the system is i386 or x86_64? i already posted that i get two(x86_64 and i386)...

uname -m gives x86_64

"gcc --print-libgcc-file-name" gives i686


which is my system......?

sathyanext 03-04-2010 07:03 PM

Which is my system.....? Help me...
 
"uname -m" gives x86_64

"gcc --print-libgcc-file-name" gives i686

i have built and using LFS 6.5. working on BLFS


which is my system......?

jschiwal 03-04-2010 07:15 PM

You can use "uname -r" or "uname -a". Also "lscpu" will give information on your cpu.

Look at one of binaries and see if it is ELF32 or ELF64
file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped

sathyanext 03-04-2010 07:35 PM

Quote:

Originally Posted by jschiwal (Post 3886291)
You can use "uname -r" or "uname -a". Also "lscpu" will give information on your cpu.

Look at one of binaries and see if it is ELF32 or ELF64
file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped

very useful...:)

it has given me:
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped

which is my system? but why "uname -m" is giving x86_64? how to change it to i686...?

rokytnji 03-04-2010 08:51 PM

Quote:

what is i386,i686 and x86_64?
http://www.linuxforums.org/forum/per...tml#post188242

Quote:

what should i do to add .deb packages
if kernel is x86_64 I think (can't swear to it)
that 32 bit deb packages or 64 bit packages should be ok to install.

rokytnji 03-04-2010 08:58 PM

Refer to below links on running 32 bit packages on 64bit.

http://maketecheasier.com/run-32-bit...nux/2009/08/10

http://www.debian-administration.org/articles/534

paulsm4 03-04-2010 10:19 PM

As I said above:
Quote:

If (for whatever reason), you want a 32-bit version, then you need to re-install.
Please bear in mind, you can run (most) 32-bit apps on a 64-bit system, and most distros ship parallel 32- and 64-bit system libraries to insure maximum compatibility.

Please also bear in mind that "uname -m" (your kernel architecture) does NOT equal "gcc --print-libgcc-file-name" (your Gcc libgcc version).

Your "system" is, in fact, the aggregate of many different components. I might identify my "system" with the following two commands:
Quote:

cat /etc/redhat-release
Fedora release 11 (Leonidas)

uname -a
Linux powerspec2 2.6.30.10-105.2.23.fc11.x86_64 #1 SMP Thu Feb 11 07:06:34 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
*There is nothing necessarily wrong with your system*.

So what exactly is it that you want to do, that you believe reverting to a 686 runtime, might be necessary?

jschiwal 03-05-2010 04:34 AM

A 64 bit distro would install 64 bit versions of common commands such as /bin/ls. It looks like you installed a 32bit distro on an x86_64 architecture.

Look at "grep 64 /boot/config*" to confirm this.
grep 64 /boot/config-2.6.31.12-0.1-desktop | head
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
CONFIG_X86_64_SMP=y
CONFIG_RCU_FANOUT=64

XavierP 03-05-2010 04:42 AM

@Sathyanext - I have merged your three identical threads into this one. While you may think that this is of earth shettering importance, please post just once on any issue. This board is entirely made up of volunteers and what is urgent and important to you is less so to the rest of us. I would also suggest that you address the answers you already have before moving on.


All times are GMT -5. The time now is 02:38 AM.