Noob topic: Changing /etc/hosts file


Forum: Other Help Topics
Topic: Noob topic: Changing /etc/hosts file
started by: underdone

Posted by underdone on Aug. 23 2006,23:11
I have been working with DSL (very cool bit of kit) for about 2 days now and I am really struggling. I am getting the first of several linux boxes connected to a Windows server and I want to change the name of the box in the hosts file.

I have a DSL Frugal HDD install with the toram option enabled and I can't access the hosts folder. I know this a very basic question but how to I write to the hosts file?

Is it because the file is held in RAM and can't be altered whilst in RAM? I have tried changing the permissions but I can't seem to change anything. It just keeps coming up with read-only or permission denied.

Is there a work around or do I have to reinstall without the toram option and then reinstall once I have the thing up and running.

Many thanks for anyone helping out!!

Best wishes

Posted by mikshaw on Aug. 24 2006,03:19
dsl host=newhostname

< http://damnsmalllinux.org/wiki/index.php/Cheat_Codes >

Posted by underdone on Aug. 25 2006,23:38
thanks for the reply - unfortunately I don't appear to be able to use cheat codes with a hdd install.
Posted by ^thehatsrule^ on Aug. 25 2006,23:56
Uhh.. you say you are using a frugal installation on your hdd?
Just modify your bootloader's append line then.

Posted by underdone on Aug. 26 2006,01:59
Thanks for the response - I tried that, reran lilo and it just won't stick. One thing I am not sure about is where to put the extra line in and what format it should be...

append = "host=mylinuxbox"

or

host=mylinuxbox (which never seems to work - just get a error message)

Thanks

Posted by mikshaw on Aug. 26 2006,02:23
Put it in the existing append line.

Also, since frugal doesn't use the standard /etc/lilo.conf you need to specify the right one with the -C parameter:
sudo lilo -C /path/to/lilo.conf

The file should be in /cdrom/boot/lilo.conf, or /mnt/hdXX/boot/lilo.conf, which are both actually the same file. hdXX would be the partition where DSL is installed

Posted by underdone on Aug. 27 2006,11:59
great - many thanks!
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.