LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-28-2007, 06:33 AM   #1
sgaray
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
"My Hostname is changed after the boot.....(FC6)"


Hi all

My name is Sergio, and recently I installed FC6 with a partial success. My PC is connected to internet through a router and I think this could be the problem. I read almost everything posted about this topic in this forum, but anyone give a solution. Below, there are some of the command I've used to check the hostname of my PC

When I use the command: uname -a, the answer is:
Linux localhost.locald\300\250>2\377\377\377 2.6.22.7-57.fc6 #1 SMP Fri Sep 21 19:45:12 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
when I use the command: hostname, the answer is:
localhost.locald\300\250>2\377\377\377

I am going to describe some of my config files in order someone can help me to fix it.

/etc/host
::1 localhost.localdomain localhost

/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=localhost.localdomain

/etc/sysconfig/network-scripts/ifcfg-eth0
# Intel Corporation 82566DC Gigabit Network Connection
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:191:7C:0E:65
ONBOOT=yes
DHCP_HOSTNAME=localhost.localdomain
TYPE=Ethernet

/etc/sysconfig/networking/devices/ifcfg-eth0
# Intel Corporation 82566DC Gigabit Network Connection
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:191:7C:0E:65
ONBOOT=yes
DHCP_HOSTNAME=localhost.localdomain
TYPE=Ethernet

/etc/sysconfig/networking/profiles/default/host
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1 localhost.localdomain localhost

/etc/sysconfig/networking/profiles/default/ifcfg-eth0
# Intel Corporation 82566DC Gigabit Network Connection
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:191:7C:0E:65
ONBOOT=yes
DHCP_HOSTNAME=localhost.localdomain
TYPE=Ethernet

/etc/sysconfig/networking/profiles/default/resolv.conf
; generated by /sbin/dhclient-script
nameserver 192.168.62.1
nameserver 0.0.0.0

/etc/sysconfig/networking/profiles/default/network
empty..

I've tried to change:

/etc/host to:
1:: localhost.localdomain localhost.localdomain
But when a I boot it is replaced by the first describe above.

Can someone give me any clue of how to solve this problem?

Thank you in advance
 
Old 10-28-2007, 08:05 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
clearly not an intro but a problem. moved to Linux - Newbie.
 
Old 10-28-2007, 09:16 AM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
You have a nasty looking hostname!
Try editing the file /etc/hostname to change your hostname to something without all those extra \'s and numbers, like linuxpc
Then reboot for the change to take effect.

Why are you using IPV6? Most of us have stuck with IPV4 until the rest of the net and routers catch up.

Using IPV4 /etc/hosts needs to look something like this:
Code:
tg@vaio:~$ cat /etc/hosts
127.0.0.1          localhost    vaio
192.168.62.2     p3.home.net    p3
192.168.62.3     p4.home.net    p4
192.168.62.4   vaio.home.net    vaio
But then I am using static IPs.
Hope this helps
 
Old 10-29-2007, 04:38 AM   #4
sgaray
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Original Poster
Rep: Reputation: 0
I have no /etc/hostname file.....

I have no /etc/hostname file to edit. I'm working in FC6, and I think this file belong to other distro. All that ugly symbols ( / \ and number ) were put automatically. I think it was taken as a hostname from the server name of my internet provider, or maybe from my router.

I'm using IPV6, basically, because it was set up during the installation, but I do not understand to much about network connections.

Thank you for your help!

Quote:
Originally Posted by tredegar View Post
You have a nasty looking hostname!
Try editing the file /etc/hostname to change your hostname to something without all those extra \'s and numbers, like linuxpc
Then reboot for the change to take effect.

Why are you using IPV6? Most of us have stuck with IPV4 until the rest of the net and routers catch up.

Using IPV4 /etc/hosts needs to look something like this:
Code:
tg@vaio:~$ cat /etc/hosts
127.0.0.1          localhost    vaio
192.168.62.2     p3.home.net    p3
192.168.62.3     p4.home.net    p4
192.168.62.4   vaio.home.net    vaio
But then I am using static IPs.
Hope this helps
 
Old 10-29-2007, 07:52 AM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Well if your distro doesn't use the /etc/hostname file, it certainly wouldn't hurt anything to create the file..

How-To Change the hostname on a Linux system

This link will walk you through all the sections necessary to change a hostname on Linux to ensure you don't miss anything..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC6 Won't Boot: "Critical Temperature Reached (128 C), shutting down" sancho Linux - Laptop and Netbook 11 04-23-2007 06:01 AM
Lost "Shutdown" and "Restart" From system menu in FC6 Nader1 Linux - Software 3 02-12-2007 04:40 PM
FC2 freezes on boot "setting hostname" munkymonkjr Fedora 2 10-03-2004 10:07 PM
"No kernel packages were installed... Boot loader will not be changed..." error messa ptexpress Linux - Newbie 1 11-03-2003 03:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration