Re: Hostname (none) after dist-upgrade
On Tue, Mar 20, 2007 at 12:08:48PM -0700, Jeff Dickison wrote:
> On Tue, 20 Mar 2007, Hans du Plooy wrote:
>
> >Hi guys,
> >
> >I did a dist-upgrade from sarge to etch on a server and all went well,
> >except for one thing. At console, I now see this:
> >
> >root@(none):~#hostname
> >(none)
> >root@(none):~# hostname -f
> >hostname: Unknown host
> >
> >BUT:
> >
> >root@(none):~# cat /etc/hostname
> >rimwards.obscured.tld
> >root@(none):~# cat /etc/hosts
> >127.0.0.1 localhost
> >80.xxx.xxx.xxx rimwards.obscured.tld rimwards
> >
> >If I set the hostname manually with hostname <hostname>
> >
> >Has anyone seen this or know how to fix it? I'm chasing my tail right now.
> >
> >Thanks
> >Hans
>
>
> Having it in /etc/hostname should do it, it's actually referenced by
> /etc/init.d/hostname.sh. So, you might also want to check that it is
> actually being called at boot.
>
> you can also set it in /etc/sysctl.conf , add:
> kernel.hostname=your.host.name
>
> then, sysctl -p , and you are all set.
>
> hth,
> Jeff
>
DO NOT edit /etc/hostnames without editing /etc/hosts first! From what
I remember reading doing so makes your system unusable, although I'm
not 100% sure if that's true. Just warning you, though.
Reply to: