[Solved]Debian 6.0 reverts to default hosthame

Since my last re-install on my node it keeps reverting to the default hostname. Typically it takes around an 1 hour where i'm not logged in to take affect. And it's getting quite annoying to set it each time I've logged out :)

I've commented out the part in /etc/default/dhcpd #SET_HOSTNAME='yes' - But it doesn't help?

Anything else i'm missing?

8 Replies

@thmo:

Since my last re-install on my node it keeps reverting to the default hostname. Typically it takes around an 1 hour where i'm not logged in to take affect. And it's getting quite annoying to set it each time I've logged out :)

I've commented out the part in /etc/default/dhcpd #SET_HOSTNAME='yes' - But it doesn't help?

Anything else i'm missing?

did you recycle dhcpd after making that change?

http://www.debianadmin.com/change-hostn … chine.html">http://www.debianadmin.com/change-hostname-or-server-name-of-a-linux-machine.html

Why not set up your linode network statically and eliminate dhcp altogether?

http://library.linode.com/networking/co … interfaces">http://library.linode.com/networking/configuring-static-ip-interfaces

http://library.linode.com/getting-start … e-hostname">http://library.linode.com/getting-started#sph_set-the-hostname

--

Travis

@otherbbs:

Why not set up your linode network statically and eliminate dhcp altogether?

This makes linodes less portable. Moving/cloning a linode then requires manual configuration through Lish (since your moved/cloned linode won't be accessible to the outside world). If you use DHCP, it just comes up with a new IP.

IMO, you shouldn't be ditching DHCP unless you specifically need to configure something static.

@Waldo - Thx the link info worked perfectly haven't reverted since i used it's info.

said to soon - Reverted to default again - Can't really figure what causes it :/

Check /etc/default/dhcpcd and comment out the SET_HOSTNAME line.

I also set up the reverse DNS for my server's IP. My theory is that DHCP is updating the hostname when it renews the lease. Telling it not to update on renewal should fix it, but if for some reason it doesn't, perhaps something else is using 'hostname -f', which the reverse DNS should handle.

I actually had the same issue, but after rebooting (not a good solution I know, but I wanted to see if that works) the hostname sticks…

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct