Bug 548834 - uname -i started returning unknown
uname -i started returning unknown
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Kamil Dudka
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2009-12-18 13:47 EST by Bruno Wolff III
Modified: 2017-08-15 05:22 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-12-19 04:06:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bruno Wolff III 2009-12-18 13:47:13 EST
Description of problem:
I am running rawhide with f12 kernels (due to f13 kernels not booting) and recently uname -i started returning unknown instead of i386 which broke some scripts I was using.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Ondrej Vasik 2009-12-19 02:48:53 EST
Thanks for report, this was caused by my drop of one hacky patch for uname which never got upstream. It seems that I have to put at least parts of that patch back - but I'll check if there is some other way... sorry for troubles...
Comment 2 Ondrej Vasik 2009-12-19 03:03:29 EST
Looking into http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=193170 it seems there is no easy way to get the correct results other way - no <sys/systeminfo.h> header... I'll put the sysinfo patch back - except the part for athlon, which is really hacky and unreliable.
Comment 3 Ondrej Vasik 2009-12-19 04:06:32 EST
Fixed in coreutils-8.2-4.fc13. Closing RAWHIDE.
Comment 4 Bruno Wolff III 2009-12-19 11:37:45 EST
I am confirming that it is working again for me.
Thanks for fixing this quickly!
Comment 5 Kamil Dudka 2017-05-03 11:16:16 EDT
I believe the correct solution is to use 'uname -m' instead of 'uname -i' in your scripts.  The -p/-i options of uname are now documented as non-portable:


I am about to drop the downstream patch again to make uname work as documented: print "unknown" if the information is not available
Comment 6 Kamil Dudka 2017-05-03 11:35:06 EDT
Note that Gentoo Linux uses the following patch to get the info from /proc:

Comment 7 Jan Kurik 2017-08-15 05:22:05 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Note You need to log in before you can comment on or make changes to this bug.