help: lilo v. grub, mouse driver spastic, what happened?

Derek D. Martin ddm+gnhlug at pizzashack.org
Mon Sep 9 15:29:22 EDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At some point hitherto, Greg Rundlett hath spake thusly:
> It's hard to understand how this one issue could manifest itself in
> so many ways (from desktop to mouse and bootloader).  I definitely
> have to read up on the hostname setting, and how that impacts the
> system.

While not necessarily obvious, it's actually fairly simple: the
address 127.0.0.1 and the host name "localhost" must correspond to
eachother, by historical convention.  This is usually handled by
having a line in /etc/hosts that looks like:

  127.0.0.1	localhost

[Side note: I've no idea why Red Hat insists on sticking .localdomain
at the end of it.  This is unnecessary and has always seemed braindead
to me.  I usually remove it, with no ill effects.  That said, I don't
use any of their GUI tools to manage my network configuration -- this
might affect you if you do.  See RFC 1537, section 10.]

If they don't correspond on your system, network services (which
expect this) will simply not work, generally.  So, if you changed your
/etc/hosts file to something like:

  127.0.0.1     myhostname

then you've broken TCP/IP utterly and completely.  This mapping to
localhost is how TCP/IP services communicate with each other on the
local machine.  They will typically make a call to
gethostbyname("localhost") to get the address of localhost.  If you
don't have a localhost, everything breaks.

If you want to give your host a different name, you can still do this.
the best way is to assign the host name to the IP address associated
with your network card.  If you don't have one, you can use the dummy
interface to make one:

  # /sbin/ifconfig dummy0 10.1.1.1 up

You should choose RFC 1918 private addresses for this interface, since
it's not on the internet:

  http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1918.html#page-4

Now, in /etc/hosts, create an entry for this IP:

  10.1.1.1      myhostname

Finally, in /etc/sysconfig/network, change the HOSTNAME= to your
hostname.

Only, you'll want to make the dummy0 interface a permanent part of
your configuration.  On Red Hat systems, you can either use the GUI to
add a network interface (yucky), or go into
/etc/sysconfig/network-scripts and do it yourself:

  1. copy ifcfg-lo to ifcfg-dummy0
  2. change all references to lo to dummy0
  3. change addresses to reflect the one you pick.

Then restart networking or reboot, and you should be good to go.

HTH.

- -- 
Derek Martin               ddm at pizzashack.org    
- ---------------------------------------------
I prefer mail encrypted with PGP/GPG!
GnuPG Key ID: 0x81CFE75D
Retrieve my public key at http://pgp.mit.edu
Learn more about it at http://www.gnupg.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9fPaRdjdlQoHP510RApeFAKC3MWgjGjdGJS/VOXrZqCiHyCrXUwCgtQwJ
YmE7AVpxZZ+zaRx57VWOiDQ=
=+rd1
-----END PGP SIGNATURE-----



More information about the gnhlug-discuss mailing list