Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] This is (none) unknown_domain (Linux x86_64)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pstickar
n00b
n00b


Joined: 26 Nov 2006
Posts: 53
Location: Germany

PostPosted: Fri Feb 15, 2013 8:51 pm    Post subject: [solved] This is (none) unknown_domain (Linux x86_64) Reply with quote

Hi,

i'm not able to set the hostname. I can login and internet is reachable. During boot, syslog-ng gives the error message: "ERROR: syslog-ng needs (service(s): hostname".
If I type
Code:
hostname laptop
I get a solution (there is a hostname at the next login), but I need to re-type that command after every reboot. I would prefer a more solid solution.

The context: this is an installation of Gentoo as a VirtualBox guest on windows, and

Code:

#cat /etc/hosts
127.0.0.1 laptop.tenaris laptop localhost

#cat /etc/conf.d/hostname
hostname="laptop"

#cat /etc/conf.d/net
dns_domain_lo="tenaris"
config_eth0="dhcp"

#rc-update show
...
dhcpcd | default
hostname | default
net.eth0 | default
net.lo | boot
syslog-ng | default
...


Thanks in avance!

Kind regards,
_________________
p.


Last edited by pstickar on Sat Feb 16, 2013 5:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri Feb 15, 2013 9:46 pm    Post subject: Reply with quote

I can't tell you when, i think going from baselayout1 to 2, but hostname is boot service for a long time.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sat Feb 16, 2013 4:04 am    Post subject: Reply with quote

hostname should be in the boot runlevel
recommend deleting dns_domain_lo="tenaris" ; it causes an overwrite of resolv.conf.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Sat Feb 16, 2013 4:24 am    Post subject: Reply with quote

mkultra@mksrv [ ~ ]$ cat /etc/conf.d/hostname
# Set to the hostname of this machine
hostname="mksrv"

yeah hostname is boot.....

mkultra@mksrv [ ~ ]$ sudo rc-update | grep hostname
hostname | boot

the 1st part of this response is because traditional linux systems command is hostname to set the hostname, and it is not controlled by a /etc/conf.d/hostname file.
Back to top
View user's profile Send private message
pstickar
n00b
n00b


Joined: 26 Nov 2006
Posts: 53
Location: Germany

PostPosted: Sat Feb 16, 2013 1:31 pm    Post subject: Reply with quote

Hi!

Thank you for the suggestions and the comments.

First I removed the hostname service from the default runlevel, then re-added it to the boot runlevel:
Code:
rc-update del hostname
rc-update add hostname boot


Besides, I commented out the line
dns_domain_lo="tenaris"
in /etc/conf.d/net.

After the reboot, still no luck.

#rc-update show | grep hostname
hostname | boot

And something very strange to me:
Code:

# rc-status boot

Runlevel: boot
 hwclock                                                           [  started  ]
 sysctl                                                            [  started  ]
 modules                                                           [  started  ]
 fsck                                                              [  started  ]
 root                                                              [  started  ]
 mtab                                                              [  started  ]
 swap                                                              [  started  ]
 localmount                                                        [  started  ]
 tmpfiles.setup                                                    [  started  ]
 bootmisc                                                          [  started  ]
 net.lo                                                            [  started  ]
 procfs                                                            [  started  ]
 termencoding                                                      [  started  ]
 swapfiles                                                         [  started  ]
 urandom                                                           [  started  ]
 keymaps                                                           [  started  ]


It looks like I'm not getting the hostname service in the boot runlevel.

According to the installation guidelines, I shouldn't do anything. Just give "hostname laptop" and then move on to "emerge gentoo-sources". I'm now suspecting that I misstyped something somewhere, and I'm not able to realize where.

As before, any help will be very appreciated.

Kind regards
p.
_________________
p.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sat Feb 16, 2013 2:35 pm    Post subject: Reply with quote

here:
Code:
rc-status boot
does not show hostname, just as yours does not, --must be a "feature"--
Code:
rc-update show boot
does show hostname
Code:
/etc/init.d/hostname start
produces
Quote:
* WARNING: hostname has already been started
Code:
/etc/init.d/hostname restart
produces
Quote:
* WARNING: you are stopping a boot service
* Setting hostname to fx8150 ...
Code:
 cat /etc/init.d/hostname
produces
Quote:
#!/sbin/runscript
# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
# Released under the 2-clause BSD license.

description="Sets the hostname of the machine."

depend() {
keyword -prefix -lxc
}

start()
{
hostname=${hostname-${HOSTNAME-localhost}}
ebegin "Setting hostname to $hostname"
hostname "$hostname"
eend $? "Failed to set the hostname"
}
suggesting you should either see an error message or Setting hostname to laptop on the screen
_________________
Defund the FCC.
Back to top
View user's profile Send private message
pstickar
n00b
n00b


Joined: 26 Nov 2006
Posts: 53
Location: Germany

PostPosted: Sat Feb 16, 2013 2:56 pm    Post subject: Reply with quote

Donahue, your answer lead me to the solution. It seems to be that I misstakenly overwrote the file /etc/init.d/hostname (was identical to /etc/cond.d/hostname).
I just retyped it from your answer, rebooted, and now it works. Just hope gentoo does not preserve my modifications over upcoming upgrades.

Thank you very much for your help, people!

Kind regards,

PS. I should probably change the status of this question to "solved", but I do not realize how. I'll research some more...
_________________
p.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sat Feb 16, 2013 4:22 pm    Post subject: Reply with quote

edit subject line of your original post
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum