Host name?


Forum: Networking
Topic: Host name?
started by: C0LDI30oT

Posted by C0LDI30oT on Jan. 26 2006,03:53
How does one change the host name. I guess the default is 'box'?
Posted by Grim on Jan. 26 2006,08:02
sudo echo "NewHostName" > /etc/hostname
Posted by newOldUser on Jan. 26 2006,12:15
I think there's a boot code 'host='

So when you start DSL you would type (or have grub or lilo enter)

DSL host=myHostname

The < Wiki Page > has a nice writeup under DSL Booting.....Cheat Codes

Posted by jbreher on Feb. 01 2006,21:23
Neither method seems to work for a Hard Drive install.

In my situation, I booted the CD with
dsl dma host=MyHostName noscsi nopcmcia nousb noagp noapm nomce noddc nofirewire nfs toram vga=normal

At this point, the machine identified itself as MyHostName, as I would hope. [1]

I then immediately did a:
rt-clk>Apps>Tools>Install to Hard Drive

upon reboot, it had forgotten all my boot options, so it was back to being box.

vi /boot/grub/menu.lst to add host=MyHostName (as well as the other options)

reboot with new boot line - hostname is still box (though it seems that it caught the other boot options - dma, nousb, etc)

rm -f /etc/hostname
echo "MyHostName" > /etc/hostname

reboot

machine still identifies itself as box [2]

[1] interestingly, nfs does not seem to be started by this - ps aux shows none of the required daemons (e.g. portmap) to be running.

[2] also tried
echo MyHostName > /etc/hostname
(no quotes) - didn't make any difference

also modified /etc/hosts, replacing box with MyHostName - didn't help

  • where do I get a *complete* listing of cheatcodes? The one listed by the wiki does not contain the nofirewire option, but it is quite evident that dsl actually acts upon it.

    [**] what is mce? what is ddc?

    Posted by roberts on Feb. 01 2006,22:46
    Try editing /etc/init.d/knoppix-autoconfig the line
    hostname=box

    Posted by Joe Breher on Feb. 03 2006,20:40
    I'll try that. Perhaps not hard code it, but read it from the /etc/hostname file. Funny it doesn't do that already.

    One other thing I'll try - in a debian netinstall, I tried to enter a hostname at the appropriate point in the install process. It puked on that name, telling me that only lower case alpha, numeric, and '-' characters are legal in a hostname. I hadn't heard this before. The name I had been trying to use contained upper case, and the '_' character. I haven't read the RFCs to see what is truly legal, but it's worth a shot....

    Joe

    Posted by Your Fuzzy God on Feb. 03 2006,21:49
    WHOOPS WHOOPS!  DOUBLE DOUBLE POST POST!!

     |
    V

    Posted by Your Fuzzy God on Feb. 03 2006,21:52
    1.  Open /opt/bootlocal.sh and add "hostname COMPUTERNAME" to the end of the file
    2.  Open /etc/hostname and change "box" to "COMPUTERNAME"
    3.  Open /etc/hosts and change "box" to "COMPUTER NAME"

    For more info try < here >.

    Posted by starcannon on Feb. 23 2006,21:29
    Quote (roberts @ Feb. 01 2006,17:46)
    Try editing /etc/init.d/knoppix-autoconfig the line
    hostname=box


    Quote (yourfuzzygod @ Feb. 03 2006,16:52)

    1.  Open /opt/bootlocal.sh and add "hostname COMPUTERNAME" to the end of the file
    2.  Open /etc/hostname and change "box" to "COMPUTERNAME"
    3.  Open /etc/hosts and change "box" to "COMPUTER NAME"


    /etc/init.d/knoppix-autoconfig
    /etc/hostname
    /etc/hosts
    are Read Only files on my Frugal install of DSL 2.2

    I'd really like to be able to give all 3 of my dsl laptops unique identities on the network. Changing the Host name seems the best way. What is required to do this on a frugal install?

    Thanks,
    Rob

    Posted by doobit on Feb. 23 2006,21:43
    With Frugal you can put the cheat code host=whatever somewhere after frugal or toram in the grub menu.lst
    Posted by starcannon on Feb. 23 2006,21:46
    Quote (doobit @ Feb. 23 2006,16:43)
    With Frugal you can put the cheat code host=whatever somewhere after frugal or toram in the grub menu.lst

    Yeah I usle LiLo and was just trying to get away with not having to reinstall my image (call me lazy lol) seemed easier if i could just mod a few text files and be done, but I'll use the
    Code Sample
    host=mybox
    cheatcode at the apropriate spot during the frugal install.

    Thanks,
    Rob

    Posted by cbagger01 on Feb. 23 2006,23:57
    Read-only files in /etc are probably symlinks back to the compressed livecd image at /KNOPPIX.  This image is read-only, so all files inside it are also read-only.

    Here is a way to be able to edit one.  For example:

    sudo su
    rm /etc/init.d/knoppix-autoconfig
    cp /KNOPPIX/etc/init.d/knoppix-autoconfig /etc/init.d/knoppix-autoconfig
    beaver /etc/init.d/knoppix-autoconfig

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