You are not logged in.

#1 2008-10-14 17:31:20

Blu3D
Member
Registered: 2008-10-14
Posts: 8

Hostname disappeared

I wasn't sure if I should've put this here or in the network forum, but since I am a newbie to Archlinux I'll post it here.


I installed Arch today, following the tutorial on the wiki, and everything seemed to be working smoothly.  After a reboot, after installing a LXDE and rebooting, however:

My hostname seems to have disappeared, or in some way unable to set.

When I boot up and get to the login prompt I get:

Arch Linux (Core Dump) 2.6.25-ARCH    ((none)) (vc/1)

(none)  login:

once I've logged in, my prompt agrees with the login, there is no hostname:

[user@(none) ~]$

HOSTNAME is set properly in both /etc/rc.conf and /etc/hosts, yet the hostname stays as (none).

If I type hostname in the prompt, I get the same "(none)", even if I try to set it manually with hostname=myhost.


Anyone got a suggestion?

Thanks for your help smile

Offline

#2 2008-10-14 18:06:59

Onwards
Member
From: Pakistan
Registered: 2007-04-18
Posts: 108

Re: Hostname disappeared

That's strange as just specifying it in /etc/rc.conf should do it (as /etc/rc.sysinit sets it up from there)...

You don't need /etc/hosts for setting up hostname, it's there to *associate* ur IP with ur hostname.

Offline

#3 2008-10-14 18:11:43

Blu3D
Member
Registered: 2008-10-14
Posts: 8

Re: Hostname disappeared

Thanks for your reply smile

It's specified in /etc/rc.conf, and associated to my ip (nothing else) in /etc/hosts.

Offline

#4 2008-10-14 18:12:50

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Hostname disappeared

Blu3D wrote:

Anyone got a suggestion?

Thanks for your help smile

Post your /etc/rc.conf and /etc/hosts, just in case it's a syntax error?

Last edited by thayer (2008-10-14 18:13:27)


thayer williams ~ cinderwick.ca

Offline

#5 2008-10-14 18:43:36

Blu3D
Member
Registered: 2008-10-14
Posts: 8

Re: Hostname disappeared

rc.conf:

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="CET"
KEYMAP="sv-latin1.map.gz"
CONSOLEFONT="lat-1-16.psfu.gz
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(e100 eepro100 mii ac97_bus snd-mixer-oss snd-pcm-oss snd-page-alloc snd-pcm snd-timer snd snd-ac97-codec snd-intel8x0 soundcore)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#

HOSTNAME="myhost"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
eth0="eth0 193... netmask 255.255.254.0 broadcast 193..."
INTERFACES=(eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 193..."
ROUTES=(gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network netfs crond alsa)

hosts:

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1        localhost.localdomain    localhost myhost
193... myhost.domain.org myhost
# End of file

As you can see I'm using a static ip, which I have to in order to access the net. And no, it doesn't actually say 193... in the files.

Last edited by Blu3D (2008-10-14 18:45:40)

Offline

#6 2008-10-14 19:02:05

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Hostname disappeared

I don't know if this is helpful, but you have myhost set as your host name in rc.conf and localhost set under <hostname.domain.org>. I would set them to match. For instance, my machine is called iasE. So in rc.conf I have HOSTNAME="iasE" and /etc/hosts I have 127.0.0.1   iasE.localdomain      iasE localhost

Offline

#7 2008-10-14 19:08:40

Blu3D
Member
Registered: 2008-10-14
Posts: 8

Re: Hostname disappeared

Tried that just now. No improvement, unfortunately.

Why can't I even set it manually? is something continuously making sure I've got no hostname?

Offline

#8 2008-10-14 19:23:31

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Hostname disappeared

Please post your hosts and rc.conf again - you said you tried what skottish suggested?

Offline

#9 2008-10-14 19:49:08

Blu3D
Member
Registered: 2008-10-14
Posts: 8

Re: Hostname disappeared

The only change is the line skottish told me about.

127.0.0.1        localhost.localdomain    localhost myhost

is now:

127.0.0.1        myhost.localdomain    localhost myhost

Offline

#10 2008-10-14 20:00:04

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Hostname disappeared

Did you reboot after making the changes?

Offline

#11 2008-10-14 20:19:01

Blu3D
Member
Registered: 2008-10-14
Posts: 8

Re: Hostname disappeared

Yes, naturally.

Offline

#12 2008-10-15 09:11:49

ashyanbhog
Member
From: India
Registered: 2008-08-19
Posts: 49

Re: Hostname disappeared

Try setting something other than "myhost",

Offline

#13 2008-10-15 10:12:05

filou.linux
Member
From: Zurich
Registered: 2008-04-17
Posts: 87

Re: Hostname disappeared

Just had a look at your rc.conf. There seems to be a syntaxerror indeed:

CONSOLEFONT="lat-1-16.psfu.gz

has no closing quote. I guess thats it.

Offline

#14 2008-10-15 11:17:33

Blu3D
Member
Registered: 2008-10-14
Posts: 8

Re: Hostname disappeared

I wish I'd waited with reinstalling it all until this was posted  hmm

Thanks anyway.

Offline

#15 2008-10-15 11:38:33

filou.linux
Member
From: Zurich
Registered: 2008-04-17
Posts: 87

Re: Hostname disappeared

Sorry sad

Offline

#16 2008-10-15 11:49:28

Blu3D
Member
Registered: 2008-10-14
Posts: 8

Re: Hostname disappeared

Not your fault that I'm impatient tongue

Offline

#17 2008-10-15 15:32:39

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: Hostname disappeared

Ouch.  Oh well, at least now you know that sometimes it's the smallest (and seemingly unrelated) things that can make or break a system. The ever-elusive missing quotation is a common one.


thayer williams ~ cinderwick.ca

Offline

Board footer

Powered by FluxBB