LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 03-04-2010, 06:47 PM   #1
sathyanext
LQ Newbie
 
Registered: Mar 2010
Posts: 12

Rep: Reputation: 0
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?

Last edited by sathyanext; 03-04-2010 at 06:52 PM.
 
Old 03-04-2010, 06:49 PM   #2
sathyanext
LQ Newbie
 
Registered: Mar 2010
Posts: 12

Original Poster
Rep: Reputation: 0
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?
 
Old 03-04-2010, 07:08 PM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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

Last edited by paulsm4; 03-04-2010 at 07:10 PM.
 
1 members found this post helpful.
Old 03-04-2010, 07:15 PM   #4
murankar
Member
 
Registered: Jan 2008
Location: Cleveland Ohio
Distribution: Current CentOS 5.6
Posts: 118

Rep: Reputation: 20
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
 
1 members found this post helpful.
Old 03-04-2010, 07:23 PM   #5
sathyanext
LQ Newbie
 
Registered: Mar 2010
Posts: 12

Original Poster
Rep: Reputation: 0
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......?
 
Old 03-04-2010, 08:03 PM   #6
sathyanext
LQ Newbie
 
Registered: Mar 2010
Posts: 12

Original Poster
Rep: Reputation: 0
Unhappy 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......?

Last edited by XavierP; 03-05-2010 at 05:42 AM. Reason: stop shouting
 
Old 03-04-2010, 08:15 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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
 
1 members found this post helpful.
Old 03-04-2010, 08:35 PM   #8
sathyanext
LQ Newbie
 
Registered: Mar 2010
Posts: 12

Original Poster
Rep: Reputation: 0
Talking

Quote:
Originally Posted by jschiwal View Post
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...?
 
Old 03-04-2010, 09:51 PM   #9
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,016
Blog Entries: 21

Rep: Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465
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.
 
Old 03-04-2010, 09:58 PM   #10
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,016
Blog Entries: 21

Rep: Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465
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
 
Old 03-04-2010, 11:19 PM   #11
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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?

Last edited by paulsm4; 03-04-2010 at 11:23 PM.
 
Old 03-05-2010, 05:34 AM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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
 
Old 03-05-2010, 05:42 AM   #13
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
@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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the difference between I386 and x86_64? aaronruss Linux - Newbie 22 10-25-2009 07:09 PM
x86_64 vs i386. Besides compiled for 64bit. Does it actually make a difference? MikeyCarter Linux - Software 10 06-04-2008 08:20 AM
i386 vs. X86_64 wfernley Linux - Software 9 10-16-2007 08:32 AM
i386 and x86_64 nmansour Fedora 2 09-18-2007 09:58 PM
i386 or x86_64? rssguy Linux - Newbie 2 04-20-2005 08:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration