4.14. Changing the Pyramid Router's Hostname

Pyramid is a nice name, but you really want to change it to something else. You tried editing /etc/hostname, but the name reset to Pyramid after reboot. Arg! How do you make it what you want?

The files listed in /etc/rw/ are mounted in a temporary writeable filesystem, and are copied from /etc/ro at boot. /etc/hostname is symlinked to /rw/etc/hostname:

	pyramid:~# ls -l /etc/hostname
	lrwxrwxrwx 1 root root 18 Oct 30 2006 /etc/hostname -> ../rw/etc/hostname

So, you can make /etc/hostname immutable (remove the symlink to /rw/etc/ hostname), or edit /ro/etc/hostname.

The filesystem is set up this way to reduce writes, because Compact Flash supports a limited number of writes.

You can use find to see which files in /etc are symlinks:

	pyramid:~# find /etc -maxdepth 1 -type l -ls
	  6051    0 lrwxrwxrwx  1 root     root      14 Oct  4 2006 /etc/mtab -> ../proc/
	mounts
	  6052    0 lrwxrwxrwx  1 root     root      21 Oct  4 2006 /etc/resolv.conf -> ../
	rw/etc/resolv.conf
	  6079    0 lrwxrwxrwx  1 root     root      30 Dec 31 2006 /etc/localtime -> /usr/
	share/zoneinfo/US/Pacific
	  6081    0 lrwxrwxrwx 1 root      root      18 Oct  4 2006 /etc/hostname -> ../rw/
	etc/hostname
	  6156    0 lrwxrwxrwx 1 root      root      15 Oct  4 2006 /etc/issue -> ../rw/
	etc/issue
	  6195    0 lrwxrwxrwx 1 root      root      17 Oct  4 2006 /etc/zebra -> ../usr/
	local/etc/
	  6227    0 lrwxrwxrwx 1 root      root      16 Oct  4 2006 /etc/resolv -> ../rw/
	etc/resolv
	  6426    0 lrwxrwxrwx 1 root      root      19 Oct  4 2006 /etc/issue.net -> ../
	rw/etc/issue.net
	  6427    0 lrwxrwxrwx 1 root      root      17 Oct  4 2006 /etc/adjtime -> ../rw/
	etc/adjtime