PDA

View Full Version : Set a persistent different hostname while booting from CDROM



lovetide
04-19-2006, 05:46 PM
Hi all:
I installed Knoppix 3.6 and Knoppix 4.0.2 in VMWare virtual machine, I have created persistent HOME directory and saved configurations for both of them.

I want to set the hostname of v3.6 to "Knoppix3", v4.0.2 to "Knoppix4", persistently. so that I can start samba server and see "Knoppix3" and "Knoppix4" or even more computers in the Windows Network Neighborhood.

I have already edit /etc/hostname (NOT a link of /KNOPPIX/etc/hostname), and save the configurations persistently.
After reboot, I got "Knoppix" when I type hostname command, but the /etc/hostname file contains "Knoppix3" or "Knoppix4".

I even try edit /etc/sysconfig/knoppix, add "HOSTNAME=Knoppix3" line, save it, but after reboot, hostname always be "Knoppix" (but the HOSTNAME environment variable is "Knoppix3").

I must manual change the hostname after reboot every time by using hostname command, so How to set a persistent different hostname while booting from CDROM :?:

Thanks!

My environments:
Virtual Machine: VMWare 5.5 Workstation for Windows
VMWare Host OS: Windows 2000 professional
VMWare Guest OS1: Knoppix 3.6
VMWare Guest OS2: knoppix 4.0.2
Guest OS1 & OS2 hard disk: /dev/sda, which is a VMWare disk file in Host OS, both are 100M size
Guest OS1 & OS2 persistent HOME directory created at: /dev/sda/knoppix.img, size=30M
Guest OS1 & OS2 configuration saved to: /dev/sda/config.tgz
Guest OS1 & OS2 boot option: knoppix myconfig=scan home=scan