How to change host name?Forum: HD Install Topic: How to change host name? started by: ggiles Posted by ggiles on Aug. 13 2006,21:54
Hi,I have a frugal laptop install, and can't figure out how to change the hostname. Tried searching the wiki and forum, found two approaches neither of them work, looking for help and ideas. 1. Added host 'cheat code' to lilo (/cdrom/boot/lilo.conf), tried various options / combos (including putting 'dsl' in front of 'host'), however entering 'hostname' from a shell still reports 'box'.
2. Tried changing /etc/hostname, /etc/hosts and /etc/init.d/knoppix-autoconfig. None of these survive a reboot, as these files are copied from the ISO image at bootup. Any ideas or suggestions most welcome Thanks Greg Posted by Del on Aug. 13 2006,22:13
When you modify lilo.conf you have to rerun lilo to make it take hold. To make this happen in a frugal install try this;mount /mnt/hdaX (where X is the partition containing /boot) edit /mnt/hdaX/boot/lilo.conf and add the host=blarg boot option ln -sf /mnt/hdaX/boot / (symlink /mnt/hdaX/boot to /boot ) lilo -C /mnt/hdaX/boot/lilo.conf (run lilo with desired config file) reboot --edited for correct lilo args-- Posted by ^thehatsrule^ on Aug. 13 2006,22:53
you could also just commit it to the mbr using lilo -C /path/to/lilo.conf
Posted by Del on Aug. 14 2006,00:51
If I don't "ln -sf /mnt/hdaX/boot /" before running "lilo -C /mnt/hdaX/boot/lilo.conf" I get an error "Fatal: Trying to map files from unnamed device 0x0007 (NFS ?)". After doing the symlinking lilo acts as expected.My mistake though in my previous post, you do indeed still have to use "lilo -C /mnt/hdaX/boot/lilo.conf", otherwise lilo tries to use /etc/lilo.conf. Posted by ggiles on Aug. 14 2006,02:54
Thanks guys, it worked perfectly. I wish the wiki was open for editing, it's been hard to find this info anywhere else.Thanks Greg |