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

Notices


Reply
  Search this Thread
Old 01-01-2018, 10:52 PM   #1
asarangan
Member
 
Registered: Jul 2009
Posts: 36

Rep: Reputation: 5
/bin/hostname is missing in recent upgrade


The Dec 21 2017 upgrade of util-linux-2.31.1-arm-1.txz seems to be missing the /bin/hostname utility. Why did it disappear? As a result, my login prompt is showing "none" for the hostname.
 
Old 01-01-2018, 11:11 PM   #2
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 633

Rep: Reputation: 188Reputation: 188
Hard to say why it disappeared. You should just be able to reinstall from your distro repositories
Code:
apt-get install hostname
for instance. Obviously, use the package manager for your system
 
Old 01-02-2018, 02:02 AM   #3
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 232

Rep: Reputation: 67
Quote:
Originally Posted by asarangan View Post
The Dec 21 2017 upgrade of util-linux-2.31.1-arm-1.txz seems to be missing the /bin/hostname utility. Why did it disappear? As a result, my login prompt is showing "none" for the hostname.
Try this to see if it gives any output about your hostname:

Code:
root@vuur:~# uname -n
vuur

root@vuur:~# hostname
vuur
You could run 'netconfig' to use the Slackware setup wizard to try and resolve the issue:

Code:
root@vuur:~# netconfig
There's always the manual method:

Code:
root@vuur:~# hostname vesp
root@vuur:~# nano -w /etc/HOSTNAME

vesp.yourdomain.lan

root@vuur:~# nano -w /etc/hosts

# For loopbacking.
127.0.0.1               localhost
127.0.0.1               vesp.yourdomain.lan vesp

# End of hosts.

root@vuur:~# reboot
It should now be fixed. Try 'uname -n' command after rebooting.

Quote:
Originally Posted by TheEzekielProject View Post
Hard to say why it disappeared. You should just be able to reinstall from your distro repositories
Code:
apt-get install hostname
for instance. Obviously, use the package manager for your system
Code:
root@vesp:~# apt-get install hostname
-bash: apt-get: command not found
I personally wouldn't try (or advise) to fix this problem by installing any packages. Especially with 'apt-get'.

Last edited by Penthux; 01-02-2018 at 02:04 AM.
 
Old 01-02-2018, 02:08 AM   #4
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 633

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by Penthux View Post



Code:
root@vesp:~# apt-get install hostname
-bash: apt-get: command not found
I personally wouldn't try (or advise) to fix this problem by installing any packages. Especially with 'apt-get'.

If he is missing the binary in /bin, and apt-get is his package manager, that is certainly an appropriate course of action.

What issue do you have with apt-get? hostname is, in fact, a package
Code:
apt-cache search hostname
hostname - utility to set/show the host name or domain name
 
Old 01-02-2018, 02:30 AM   #5
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 232

Rep: Reputation: 67
Quote:
Originally Posted by TheEzekielProject View Post
If he is missing the binary in /bin, and apt-get is his package manager, that is certainly an appropriate course of action.

What issue do you have with apt-get? hostname is, in fact, a package
Code:
apt-cache search hostname
hostname - utility to set/show the host name or domain name
Code:
root@vuur:~# slackpkg search hostname

Looking for hostname in package list. Please wait... DONE

No package name matches the pattern.
My issue is that this is Slackware. Not Debian/Ubuntu? Your advice may be good for the latter, but on Slackware there is no advanced package tool (apt) command/function.

Code:
root@vesp:~# apt-get install hostname
-bash: apt-get: command not found

root@vuur:~# apt-cache search hostname
-bash: apt-cache: command not found
Why would you even want it on Slackware? Apt goes against the Slackware Way and takes control away from the Admin (i.e. me and you) with regards to package management.

Slackware uses 'pkgtool' (installpkg, removepkg, etc.) or 'slackpkg'. There is no 'apt-get' or 'apt-whatever' on my Slackware ARM system.

Last edited by Penthux; 01-02-2018 at 02:33 AM. Reason: forgot some code
 
Old 01-02-2018, 02:44 AM   #6
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 633

Rep: Reputation: 188Reputation: 188
Which is why I said in that very same post
Quote:
Originally Posted by TheEzekielProject View Post
Obviously, use the package manager for your system
Also, you may not have it on your ARM system, but it is in current
https://packages.slackware.com/?r=sl....18-i586-1.txz

Last edited by TheEzekielProject; 01-02-2018 at 02:57 AM.
 
Old 01-02-2018, 03:02 AM   #7
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,310

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
I'm guessing that OP forgot to do "slackpkg install-new" before "slackpkg upgrade-all" -- hostname was split out into a separate package somewhat recently.
 
1 members found this post helpful.
Old 01-02-2018, 03:03 AM   #8
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 702

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by asarangan View Post
The Dec 21 2017 upgrade of util-linux-2.31.1-arm-1.txz seems to be missing the /bin/hostname utility. Why did it disappear? As a result, my login prompt is showing "none" for the hostname.
The package was split out -- the information is in the Change Log - search for "hostname".
 
Old 01-02-2018, 03:20 AM   #9
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 232

Rep: Reputation: 67
Quote:
Originally Posted by TheEzekielProject View Post
Which is why I said in that very same post

Also, you may not have it on your ARM system, but it is in current
https://packages.slackware.com/?r=sl....18-i586-1.txz
Well, we deal with Slackware ARM in this forum. So, unless the OP has posted in the wrong section then he'll need the ARM version of the package you're referring to: ftp://ftp.arm.slackware.com/slackwar...3.18-arm-1.txz.

Furthermore, as you correctly stated, this package only exists in Slackware ARM -current. So, if the OP is running Slackware ARM 14.2 (as I did previously) he will not be able to install, or find, this package for his system. Slackware ARM 14.2 is the soft float port and -current is the hard float port.

Apologies for being a stickler but I love to see accurate and helpful advice. The whole 'apt-get' thing is not relevant to Slackware and with a little more time and effort a lot more concise information could have been relayed. We got there in the end.
 
Old 01-02-2018, 03:43 AM   #10
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 633

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by Penthux View Post
Apologies for being a stickler but I love to see accurate and helpful advice. The whole 'apt-get' thing is not relevant to Slackware and with a little more time and effort a lot more concise information could have been relayed. We got there in the end.
Yes, I missed that this was the Slackware ARM forum, I was just searching in the 'View New Posts' section, and saw no mention of the distro in the OP or OP's bio. Which is why I made sure to clarify that the OP should use his distro's package manager. Sorry for confusing you.

I thought I had relayed the information well enough to the OP that he could figure it out.

Regardless, the fact stands that in current, hostname is a package.

It may not be in 14.2, but OP has not stated what he is running. Or I missed it
 
Old 01-02-2018, 08:59 AM   #11
asarangan
Member
 
Registered: Jul 2009
Posts: 36

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by rworkman View Post
I'm guessing that OP forgot to do "slackpkg install-new" before "slackpkg upgrade-all" -- hostname was split out into a separate package somewhat recently.
This is exactly what happened. Thank you for your reply. I didn't realize I had to run install-new, but that brings me to the question how to use it correctly. My system is minimal, and does not include the 'kde', 'xap' and a few other series. When I run install-new, it brings up every package in all the series, and I am not sure how to sort through that huge list to find out which packages to select. In this particular case it is obvious, because I know I am missing "hostname". But if I didn't know that, is there a way to bring up only the new packages that were not in the original installation of my system?
 
Old 01-02-2018, 09:37 AM   #12
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 232

Rep: Reputation: 67
Quote:
Originally Posted by asarangan View Post
is there a way to bring up only the new packages that were not in the original installation of my system?
Code:
root@tvar:~# slackpkg install slackware
The above command will give you a list of all uninstalled Slackware packages on your system. From here you can select to install them.

Code:
root@tvar:~# man slackpkg
The above command will hopefully lead you to what you need to know.
 
Old 01-02-2018, 10:28 AM   #13
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 6,883

Rep: Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393Reputation: 1393
Code:
Fri Dec 29 08:08:08 UTC 2017
a/kernel-modules-armv7-4.14.9_armv7-arm-1.txz: Upgraded.

#located in dir 'a'

a/hostname-3.18-arm-1.txz: Added.
       This is the latest version of the hostname utility, broken out into a new
       package to get rid of duplication between util-linux and net-tools.
http://www.slackware.com/changelog/current.php?cpu=arm

change log

Last edited by BW-userx; 01-02-2018 at 10:29 AM.
 
Old 01-02-2018, 12:09 PM   #14
abga
Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 702

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
@asarangan

https://www.linuxquestions.org/quest...nt-4175618768/

(it's still on the first page of the Slackware ARM Forum)
 
Old 01-02-2018, 12:23 PM   #15
asarangan
Member
 
Registered: Jul 2009
Posts: 36

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by Penthux View Post
Code:
root@tvar:~# slackpkg install slackware
The above command will give you a list of all uninstalled Slackware packages on your system. From here you can select to install them.

Code:
root@tvar:~# man slackpkg
The above command will hopefully lead you to what you need to know.
Great, thank you. There is no way I would have figured out from the man page that "slackpkg install slackware" would bring up only the uninstalled packages. But when I do that, I get several hundred items to scroll through (because mine is a minimal system), and all of them are selected by default with the "*". I don't mean to sound lazy, but how do I deselect them all without having to deselect them one by one?
 
  


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
how to recover /bin/hostname file mcs_o8_01 Linux - Newbie 1 08-20-2010 02:52 AM
setting /bin/hostname [failed] tulsi Linux - Networking 6 11-29-2009 06:36 AM
svnserve after recent upgrade biol75 Slackware 0 09-07-2009 04:29 AM
recent applications/documents in menu missing Mugatu Mandriva 3 02-07-2005 01:30 PM
broke /bin/hostname nitsky416 Linux - Networking 2 11-30-2003 04:45 AM

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

All times are GMT -5. The time now is 08:56 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