Changing Hostname


Forum: Networking
Topic: Changing Hostname
started by: mrpgmr

Posted by mrpgmr on Oct. 02 2006,23:16
Does anybody know how to automatically change the hostname in DSL linux?  I've been able to set IP addresses and change just about everything related to the network except the box name.  I'm running this on several computers (using the HD install) and modifying the /etc/hostname file seems to have no effect.  How do I do this in DSL?

Thanks

Posted by mikshaw on Oct. 02 2006,23:31
use the boot option "host=newhostname"
< http://damnsmalllinux.org/wiki/index.php/Cheat_Codes >

Posted by mrpgmr on Oct. 03 2006,00:49
I should have included that in my original post.  I tried the cheat codes, both through editing the menu.lst and manually editing it.  The boot loader I selected was GRUB.  Do I need to reimage the HD and select LILO for it to work?
Posted by mikshaw on Oct. 03 2006,01:23
no.  Adding boot options to grub is actually a lot easier to do than with Lilo, considering they can be added at boottime.

Are you editing the right menu.lst? I'm not sure about a traditional harddrive install, but in frugal the file is in the boot directory of your dsl partition

Posted by mrpgmr on Oct. 03 2006,01:34
Actually I think you got me on the right track.  I edited the boot script in the /opt directory to include the entry

hostname my_host_name

and it worked.  I still have no idea why the cheat code would not work, but it looks like the HD install will always use that file.  Thanks for the quick response and the help.

Posted by ^thehatsrule^ on Oct. 03 2006,13:19
That file would probably be /opt/bootlocal.sh

I guess then for the non-frugal hd-installs, that bootcode doesn't work...

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.