[mythtv-users] mythbuntu-diskless - how to set client hostname?
perveilerj at gmail.com
Sat Dec 25 04:03:14 UTC 2010
On Wed, Dec 22, 2010 at 5:34 PM, Jim Stichnoth <stichnot at gmail.com> wrote:
> On Wed, Dec 22, 2010 at 10:01 AM, Greg Oliver <oliver.greg at gmail.com>
> > On Wed, Dec 22, 2010 at 11:02 AM, Jim Stichnoth <stichnot at gmail.com>
> >> I'm moving to mythbuntu 10.04 (for the LTS aspect -- I build my own
> >> myth binaries from source) and I want to set up my 3 netbooting ION
> >> frontends as Mythbuntu-Diskless clients according to the instructions
> >> at http://www.mythbuntu.org/wiki/network-boot-mythbuntu-diskless .
> >> The only issue so far is that when the diskless client boots, it
> >> insists on settings its hostname as the MAC address. A related issue
> >> is that it auto-generates an /etc/hosts file whereas I would like to
> >> use a system-wide hosts file.
> >> Does anyone have experience getting this to work "right"? Or do I
> >> need to resort to something like overriding hostname and /etc/hosts in
> >> rc.local?
> > I remember digging for this for a couple of hours when I wanted my
> > router to set my hostnames. The config file is "inside" the chroot
> > environment.
> > /etc/initramfs-tools/conf.d/ltsp
> > change OVERLAYKEY="HOSTNAME"
> > and rebuild the initrd - you'll be good to go and have friendly
> > hostnames again..
> I made the OVERLAYKEY change, then regenerated the initrd by running
> mkinitramfs on the client, then copied the initrd to the server's tftp
> area and rebooted the client. Now the hostname ends up being "ltsp".
> What could I be doing wrong?
I had a similar problem when I moved to mythbuntu 9.10 (never did go to
10.04). I don't have an ltsp file in /etc/initramfs-tools/conf.d/ltsp, but
the trick for me was to add "hostnameoverride=HOSTNAME" (just like that,
don't put in your hostname for HOSTNAME) to the kernel boot options. My
final option line looks like this:
append ro initrd=initrd.img quiet splash hostnameoverride=HOSTNAME
I think OVERLAYKEY does the same thing, except that your copy-on-write
directory in /var/cache/mythbuntu-diskless/overlay will also be named by
hostname instead of mac address. The old mythbuntu diskless stuff used mac
addrs in the overlay directory, and I already had overlays I wanted to keep,
so I went the hostnameoverride route instead.
I don't remember what exactly I did to get that to stick, but I have that
part appended to the following files:
/opt/ltsp/amd64/boot/pxelinux.cfg/default (/opt/ltsp/and64 is my changeroot)
It's been a while, but I THINK that I changed the /var/lib/tftpboot/ltsp
version first, and then ltsp-update-kernels copied it into the changeroot?
Or maybe the other way around? Either way, I stopped getting "ltsp" or
"(mac addr)" and started getting my hostname from my dhcp router.
Again it's been a while, but I think I got my mac address for a hostname,
made the above edits and started getting "ltsp" instead. Eventually I
figured out that my router (running tomato) wasn't setting itself properly
to actually hand out host names if I assigned a static dhcp name through the
gui (the dhcp-host line in the dnsmasq configuration file it generated
lacked the actual host name, stupidly). Eventually I ignored the "static
dhcp" basic configuration page for making the address static and instead
added this line to the "dnsmasq custom configuration" page in the advanced
I think I used wireshark/ethereal to figure out it was the router doing the
Hope this helps. If not, I'll be able to search for my own answer when this
bites me again in a year or so :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mythtv-users