Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Another boot error to fix: Hostname? - Beginner
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
MTUser2007
n00b
n00b


Joined: 19 Feb 2008
Posts: 34
Location: Shepherd, MT, USA

PostPosted: Sun Feb 24, 2008 9:06 pm    Post subject: [SOLVED] Another boot error to fix: Hostname? - Beginner Reply with quote

In trying to learn as much and as fast as I can, to take care of the Gentoo server I inherited, I scrolled through the messages as Gentoo boots up. I see the following:

You should stop using /etc/hostname and use /etc/conf.d/hostname

What does this mean? and how do I fix it?

PS. I love what I learn here. THANK YOU. I was always root before. From reading here, I see that is bad thing. Well I managed to add a user. I could not su to root, but I fixed this with the FAQ SA2 by adding myself to the wheel group and fixed the permissions in root!

So it is not true, you can teach and old dog new tricks - I am old!


Last edited by MTUser2007 on Sun Feb 24, 2008 10:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
OnlyTux
Apprentice
Apprentice


Joined: 15 Mar 2007
Posts: 174

PostPosted: Sun Feb 24, 2008 9:19 pm    Post subject: Reply with quote

Hello,
if you want to learn very fast, one of the best things to do is to read the Gentoo official documentation. In this case, I suggest this chapter of the installation manual.

Have a look at the other documents, too. For example the ones that deal with portage.

Cheers
_________________
ANTONIO: How every fool can play upon the world! I think the best grace of wit will shortly turn into silence, and discourse grow commendable in none only but parrots...

Shakespeare, The Merchant of Venice
Back to top
View user's profile Send private message
MTUser2007
n00b
n00b


Joined: 19 Feb 2008
Posts: 34
Location: Shepherd, MT, USA

PostPosted: Sun Feb 24, 2008 9:38 pm    Post subject: Reply with quote

I had a look in /etc/hostname and found the machine's name "gentoo". I also looked in /etc/conf.d/hostname and found HOSTNAME = "gentoo"

So does this mean that I should delete the file /etc/hostname or remove the word gentoo from it instead.

On your suggestion, I did read the chapter 8 you referenced, the first part about a network. Thank you. It looks to me that /etc/conf.d/hostname is set up correctly, but that does not tell me what to do with /etc/hostname.

Please could I get advice about this? Thanks.
Back to top
View user's profile Send private message
cjubon
Guru
Guru


Joined: 03 Jul 2007
Posts: 450
Location: Vienna/Europe

PostPosted: Sun Feb 24, 2008 9:39 pm    Post subject: Reply with quote

MTUser2007 wrote:
You should stop using /etc/hostname and use /etc/conf.d/hostname
What does this mean? and how do I fix it?
It means that you should stop using /etc/hostname and use /etc/conf.d/hostname instead :-). Your Gentoo box has a hostname, doesn't it? It appears on your command line prompt, usually like this:
Code:
user@hostname ~$
On many Linux distros, that hostname is expected to be found in the file /etc/hostname. This was the case on Gentoo, too, but it is now deprecated. The preferred and future proof style is now to have the hostname in /etc/conf.d/hostname.
As root, just do
Code:
# mv /etc/hostname /etc/conf.d/hostname
# /etc/init.d/hostname restart
The message should disappear.
_________________
Mandrake Dec 2001 · Debian "Woody" Aug 2002 · Gentoo Jan 2004 · Funtoo Oct 2009
Back to top
View user's profile Send private message
cjubon
Guru
Guru


Joined: 03 Jul 2007
Posts: 450
Location: Vienna/Europe

PostPosted: Sun Feb 24, 2008 9:45 pm    Post subject: Reply with quote

Ooops, you seem to have posted while I was writing. Yes, you can savely remove /etc/hostneme. If you run /etc/init.d/hostname after that, you can verify that everything is okay: actually, it's that init-script that outputted the message.
_________________
Mandrake Dec 2001 · Debian "Woody" Aug 2002 · Gentoo Jan 2004 · Funtoo Oct 2009
Back to top
View user's profile Send private message
MTUser2007
n00b
n00b


Joined: 19 Feb 2008
Posts: 34
Location: Shepherd, MT, USA

PostPosted: Sun Feb 24, 2008 10:12 pm    Post subject: Reply with quote

thanks for the help. I am all set now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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