LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-19-2005, 09:20 AM   #1
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Rep: Reputation: 30
uname -p -i reports unknown


When I run Rkhunter (RootKitHunter) to detect any rootkits I may have on my system Rkhunter reports:

Quote:
Determining OS... Unknown
Warning: This operating system is not fully supported!
Warning: Cannot find md5_not_known
All MD5 checks will be skipped!
This is probably because uname -p and uname -i both report 'unknown'.

This is odd because KDE's KInfoCenter reports my processor information correctly.

What can I do to fix uname's problem?

Thanks in advance.

LocoMojo
 
Old 12-19-2005, 09:54 AM   #2
vls
Member
 
Registered: Jan 2005
Location: The grassy knoll
Distribution: Slackware,Debian
Posts: 192

Rep: Reputation: 31
uname is broken in slackware and the stock coreutils source.

Here's thread with a patch.
 
Old 12-19-2005, 10:13 AM   #3
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Thanks for that!

Downloading the packages now. Will report success/fail when I'm done.

Wonder why Pat doesn't fix this?

Thanks again!

LocoMojo
 
Old 12-19-2005, 10:44 AM   #4
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Worked like a charm!

Many thanks to you for telling me about this and many thanks to Carlos for making this patch available to us.

Unfortunately, it didn't solve my problem with rkhunter as it is still reporting unknown OS.

I wonder if this patch has solved anything functionally for me or is it was just a cosmetic thing?

Thanks again.

LocoMojo
 
Old 12-19-2005, 11:17 AM   #5
vls
Member
 
Registered: Jan 2005
Location: The grassy knoll
Distribution: Slackware,Debian
Posts: 192

Rep: Reputation: 31
Quote:
Originally Posted by LocoMojo
Worked like a charm!
...
I wonder if this patch has solved anything functionally for me or is it was just a cosmetic thing?

Thanks again.

LocoMojo
No problem.

It's really just cosmetic but you never know; something may depend on it to work properly.

Is this rkhunter: http://www.rootkit.nl/
If so, unfortunately I can't test it because my main linux box gave up the ghost and all I have is an old laptop that has no room for perl. But I can grep through the code and maybe figure out where it's trying to pull the info from.
 
Old 12-19-2005, 11:27 AM   #6
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by vls
No problem.

It's really just cosmetic but you never know; something may depend on it to work properly.

Is this rkhunter: http://www.rootkit.nl/
If so, unfortunately I can't test it because my main linux box gave up the ghost and all I have is an old laptop that has no room for perl. But I can grep through the code and maybe figure out where it's trying to pull the info from.
Ahh well, at least it'll look good when I show my Windows friends my Linux box. Unknown doesn't look very good and they'll just say, "see, Linux doesn't even know what it's running on".

Yep, that's the rkhunter I'm talking about.

I just found out that Slackware 10.2 isn't supported, but Slackware 10.1 is.

Shrug...go figure.

Thanks again and have a good one.

LocoMojo
 
Old 12-19-2005, 11:31 AM   #7
vls
Member
 
Registered: Jan 2005
Location: The grassy knoll
Distribution: Slackware,Debian
Posts: 192

Rep: Reputation: 31
I looked it over and it does use uname; make sure your new version is getting called instead of the broke uname

Have a better one.
 
Old 12-19-2005, 11:46 AM   #8
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by vls
I looked it over and it does use uname; make sure your new version is getting called instead of the broke uname

Have a better one.
Well, I used upgradepkg when I installed the patched coreutils so I'm assuming the broken uname is gone...right?

LocoMojo
 
Old 12-19-2005, 11:57 AM   #9
vls
Member
 
Registered: Jan 2005
Location: The grassy knoll
Distribution: Slackware,Debian
Posts: 192

Rep: Reputation: 31
Quote:
Originally Posted by LocoMojo
Well, I used upgradepkg when I installed the patched coreutils so I'm assuming the broken uname is gone...right?

LocoMojo
Yeah, it should. Damn, I need a new computer so I can test things properly.
 
Old 12-20-2005, 01:15 PM   #10
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Warning!

This patched coreutils package breaks swaret.

Quote:
root@slack:~# swaret --update
swaret 1.6.3-2

head: `-1' option is obsolete; use `-n 1'
Try `head --help' for more information.
Network Connection down!
Please, take a look to 'NIC' in /etc/swaret.conf!
My NIC is fine as I'm able to browse the network with Firefox, email with Thunderbird, use FTP with ncftp, ping servers, etc.

I've touched nothing with the NIC part of my swaret.conf so I'm assuming it has something to do with the head problem.

Quote:
root@slack:/usr/sbin# less swaret | grep head
ip_address=`ifconfig | grep "inet addr" | grep -v 127.0.0.1 | tee | awk '{ print $2 }' | awk -F":" '{ print $2 }' | head -1`
rDATE=`head -1 $CDIR/rollback/ROLLBACK.TXT | awk {'print $3 " " $4'}`
OUTPUT=`cat /proc/$z/status | head -1`
TOPPER=`head -n 1 BUILDLIST.tmp`
PLACE=`grep -n ^$VAR /etc/swaret.conf | head -1 | awk -F : {'print $1'}`
PLACE=`grep -n ^[#]$VAR /etc/swaret.conf | head -1 | awk -F : {'print $1'}`
head -`echo $PLACE - 1 | bc` /etc/swaret.conf 2>/dev/null > /etc/swaret.conf.tmp 2>/dev/null
rDATE=`tail -n $1 ROLLBACK.TXT | head -n 1 | awk {'print $1'}`
rTIME=`tail -n $1 ROLLBACK.TXT | head -n 1 | awk {'print $2'} | sed s/':'//\g`
Obviously something has changed in the patched coreutils package to make head -1 obsolete. I went ahead and backed up my swaret then edited ip_address part like this:

Quote:
ip_address=`ifconfig | grep "inet addr" | grep -v 127.0.0.1 | tee | awk '{ print $2 }' | awk -F":" '{ print $2 }' | head -1`

to

ip_address=`ifconfig | grep "inet addr" | grep -v 127.0.0.1 | tee | awk '{ print $2 }' | awk -F":" '{ print $2 }' | head -n 1`
Then swaret worked fine again.

Obviously the patched coreutils package is making some fundamental changes to coreutils rather than just adding a little piece of code to enable uname to report -p -i information. Head -1 was made obsolete, who knows what else has been made obsolete or broken.

The uname deal, as far as I know, is simply cosmetic and has no impact on how things work so it isn't worth it to patch coreutils as it may break a number of things throughout the system.

Originally I wanted to fix the uname problem of reporting -p -i as unknown to get rkhunter working correctly on my system. Fixing uname with the patched coreutils didn't help rkhunter at all.

I'm downgrading back to Pat's coreutils release...screw uname -p -i.

LocoMojo

Edit: Something just dawned on me. I wonder if I'm having this problem because I compiled the patched coreutils package with the new gcc package. Maybe it's gcc-3.4.5 that made head -1 obsolete...kinda makes sense, doesn't it?

Edit2: Just downgraded to the old gcc version (3.3.6) and then compiled and installed the patched coreutils package. Still no go, same problem as above so now I know for sure that it is the patch that is the culprit somehow.

Last edited by LocoMojo; 12-20-2005 at 02:30 PM.
 
Old 12-20-2005, 02:52 PM   #11
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,693

Rep: Reputation: 6229Reputation: 6229Reputation: 6229Reputation: 6229Reputation: 6229Reputation: 6229Reputation: 6229Reputation: 6229Reputation: 6229Reputation: 6229Reputation: 6229
Actually, the problem with these error messages is the fact that a newer glibc version is now present on current Slackware systems. The Slackware coreutils were built with glibc 2.3.2 (for Slackware 10.0) and never re-compiled for newer Slackware releases.

I have a patched Slackware 10.2 package for coreutils uploaded here.
It has a patched uname, my output looks like this:
Quote:
$ uname -a
Linux icculus 2.6.13 #1 Sat Sep 3 21:11:20 PDT 2005 i686 athlon-4 i386 GNU/Linux
and it has properly working versions of head tail etc...

Eric
 
Old 12-20-2005, 04:07 PM   #12
LocoMojo
Member
 
Registered: Oct 2004
Distribution: Slackware 12
Posts: 165

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Alien Bob
Actually, the problem with these error messages is the fact that a newer glibc version is now present on current Slackware systems. The Slackware coreutils were built with glibc 2.3.2 (for Slackware 10.0) and never re-compiled for newer Slackware releases.

I have a patched Slackware 10.2 package for coreutils uploaded here.
It has a patched uname, my output looks like this:

and it has properly working versions of head tail etc...

Eric
That did the trick, thanks! Is it safe to assume that this patched coreutils package won't have any effect on anything else?

Can you tell me though, what's the difference between uname -m and uname -i (machine hardware name vs. hardware platform)?

My uname is reporting:

Quote:
Linux slack 2.6.14.4 #1 Sun Dec 18 17:58:58 EST 2005 i686 pentium4 i386 GNU/Linux
When I compile stuff without any compiler flags, is it, by default, optimized for i386 or i686?

Thanks again!

LocoMojo
 
Old 12-20-2005, 05:16 PM   #13
servnov
Member
 
Registered: Sep 2004
Distribution: Slackware 10.2
Posts: 276

Rep: Reputation: 30
Just tried using uname on slack and got that unknown stuff too. Hopefully it will be fixed in next release.
 
Old 12-20-2005, 06:44 PM   #14
sweetnsourbkr
Member
 
Registered: Aug 2005
Location: Bay
Distribution: Zenwalk, OpenBSD, Slackware
Posts: 167

Rep: Reputation: 30
The fix is actually quite easy, only takes about 15 mins, if that.
 
Old 12-20-2005, 08:32 PM   #15
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 545Reputation: 545Reputation: 545Reputation: 545Reputation: 545Reputation: 545
Quote:
I have a patched Slackware 10.2 package for coreutils uploaded here.
Eric, I downloaded the patch and the unknowns went bye-bye. Ya done good---thank you!

Will we have to download this patch with the next Slack release or will the coreutils programs be compiled in that release against the correct version of glibc?

If the next release will be compiled properly, will upgradepkg still work against your patched version or will we have to remember to uninstall your patched version before updating Slack to the next release?
 
  


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
Uname ? phr3nzal Linux - Software 4 10-07-2005 08:52 AM
uname -r reports wrong kernel version branque Fedora 5 09-16-2005 10:26 AM
uname -a Jeebizz Slackware 18 05-03-2005 04:53 PM
uname -a BRAHmS Linux - Newbie 1 05-11-2004 09:45 PM
uname -p = unknown? inv|s|ble Linux - General 1 01-20-2002 03:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration