Skip to main content
Topic: hostname and more (Read 1912 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

hostname and more

Hello I got some Problems with the hostname and login, and shutdown. the shutdown did not work before I install, and reinstall different distros.

I start to have this issue by using antix 19.4 with runit
there it was

Code: [Select]
algori@dhcppc4:~
$ hostname
dhcppc4
algori@dhcppc4:~
$ cat /etc/hostname
thmus
algori@dhcppc4:~
$


by the way the entry for

/etc/hosts

127.0.0.1 localhost
127.0.0.1 thmus

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

# BEGIN (below) – IPs added by antiX Advert Blocker #
……

but I got the same issue by useing artix

the hostname I want to have is thmus!
I post it already as code, but

if I cat /etc/hostname it is mentioned as thmus
if I run hostname it says dhcppc4

also in /etc/hosts
it’s thmus

here is some more weird about this,
but maybe it’s also important to mention, my laptop isn’t able to shut down, if I try, it seem to shut everything down, but instead my laptop reboot. shutdown and instant goes up again. I got this Problem for a while, even before I started to do the following, wich will proceed something to the host issue.

to get used to some init systems, grub, and other package manager, and to get a general picture of some differences between distros, I started to install some as multiboot.

right now I’m on

antix 19.4 runit, debian
artix open rc, pacman (maybe adding some tools for using the aur database, but not right now)
and void, xbps

first install was antix
second artix
third void

while I install void startup of artix kinda crash, not even the bios boot mentioned its existence anymore, so I reinstall artix.

and here comes the weird thing

as I try to login after the reinstall, on the top of the loginscreen it is “thmus”,
enter, nothing happens, seem to crash, reboot by button, kind of a shutdownscreen mentioned:

broadcast message root@dhcppc0

new login, loginscreen now on the top “dhcppc0”
first try by password after press enter nothing happens, but a loginscreen move, second try I’m able to enter artix, everything seem to work fine, but I’m also algori@dhcppc0

since than, If I go back to antix,

here its the same issue like before, but the host now change to dhcppc0!

so I guess it’s something messing with these broadcast thing,
however even if I make all the changes

/etc/hostname
/etc/hosts

nothing changes its still

dpcppc0

if I run hostname

and also the terminal says

algori@dhcppc0

I really want to change that.
could you please give me some advise?

thank you for your support!

best regards
diffeom

Re: hostname and more

Reply #1
Code: [Select]
sudo hostname thmus

Then reboot with
Code: [Select]
sudo reboot

yes I already tried that, but it changes the hostname just untill I reboot,
after reboot it is dhcppc0 again.

of curse I googled the issue before and tried everything I could found before I started this thread.

best regards
diffeom

Re: hostname and more

Reply #2
Having multiple GNU/Linux distributions installed at the same time is both unnecessary and error-prone, as evident from your issue. If you really need to test things under multiple distros, it would be better to install one distro and then run others from QEMU under that single distro. For example, I have Alpine Linux and KISS Linux setup in QEMU in Artix like that.


Re: hostname and more

Reply #4
hello, yes I did read all of this, but I still not get to resolve the issue!


Quote
  GNU nano 5.7                      /etc/hosts                                 
# Host addresses
127.0.0.1  localhost
127.0.1.1  thmus.localdomain thmus
::1        localhost ip6-localhost ip6-loopback
ff02::1    ip6-allnodes
ff02::2    ip6-allrouters

Quote
dhcppc0:[algori]:~$ hostname
dhcppc0
dhcppc0:[algori]:~$ cat /etc/hostname
thmus

and yes, like I mentioned before I am able to set
Quote
sudo hostname thmus

and after this it is
Quote
dhcppc0:[algori]:~$ hostname
thmus
dhcppc0:[algori]:~$ cat /etc/hostname
thmus

but if I reboot everything is like it was before.

right now, if I reboot the shutdownscreen so to say, mentioned:
broadcast message root@thmus

that changes, but nothing else.

the loginscreen still needs two trys to get me in, and after the first insert, a short black screen with - gets me right back to loginscreen, and I get in by the second try.

what else could I read, or try?

thank you for support.
best regards diffeom.


Re: hostname and more

Reply #5
from gentoo forum, with similar problem:
1) Don't request it in dhcpcd.conf
2) If the server send it anyway, tell dhcpcd not to use it.

check your dhcpcd.conf, and change/add to
Code: [Select]
nooption hostname

you can try install only dhclient instead dhcpcd 
Code: [Select]
pacman -S dhclient
pacman -R dhcpcd


 

Re: hostname and more

Reply #7
What network manager do you use? Is it connman? If so, it automatically changes your hostname when connected via DHCP. In order to make him stop, modify /etc/connman/main.conf (or whatever file has the AllowHostnameUpdates option) and write there:
Code: [Select]
AllowHostnameUpdates=false

Re: hostname and more

Reply #8
while I install void startup of artix kinda crash, not even the bios boot mentioned its existence anymore, so I reinstall artix.
Do you use a kernel microcode package? intel-ucode or its amd equivalent? If you do, you likely won't be able to boot artix via grub entries of other distros. The reason is, in Artix (and AFAIK in Arch in general), ucode file serves as "first initrd image". Thus in Artix grub is configured to boot with two initrd images: ucode and real initrd. Grub in other distros works differently, and while configured automatically, it loads only ucode, but not initrd image for Artiix. That's why it failes to start via another distro's grub entry.

The solution is the following: use Artix' grub entry to boot Artix, not another distro's.

Probably, installing lsb-release package in all of the installed distros (i.e. Artix and Void) would help, but I don't know exactly.

Re: hostname and more

Reply #9
Did you use a graphical installer to install Artix? If memory serves, they ship with Connman, not Networkmanager, which by default will automatically update the hostname on a per-network basis.

If you're using Connman, try the following.

https://wiki.archlinux.org/title/ConnMan#Avoid_changing_the_hostname
I use connman, and it doesn't automatically change my hostname. By default, that line is commented out along with other options in /etc/connman/main.conf.

Re: hostname and more

Reply #10
I had some odd issues using a hostname with numbers a while ago, although that's OK according to the docs it didn't work,  letters only was fine.