How to change the hostname at the end of pxe unattended installation on Debian
Hello,
I just installed a pxe server, and i'm installing debian with pxe . completely unattended with preseeding. Now, all my installations come with the same hostname, how I can change the hostname to something different? Thanks. |
Hi,
Change to show the correct hostname in Code:
/etc/hostname Kind regards, Eric |
The thing is that they come from a pxe unattended installation.
I was expecting a way to make it unattended, using the preseeding standard, if there is such thing. thanks. |
Ok, got it now ;) Not familiar with the whole PXE booting. Sorry.
Kind regards, Eric |
Quote:
If one day you need to install several machines , or the same machine several times, i suggest you to try pxe installation. ;) |
Thanks for the advice.
Kind regards, Eric |
answer from serverfault:
One simple way that comes to mind without setting up things in DHCP. Assuming there is a web site you can add files to. Place the hostname inside a file based on the Mac. Then retrieve it with wget. e.g.: mac=`ifconfig eth0 | grep HWaddr | sed 's/^.*HWaddr //; s/://g'` wget -O hostname.txt http://www.example.com/$mac hostname `cat hostname.txt` The mac file name would be in lower case with no colon (:) characters. |
All times are GMT -5. The time now is 07:33 AM. |