On Wed, Dec 22, 2010 at 5:34 PM, Jim Stichnoth <span dir="ltr">&lt;<a href="mailto:stichnot@gmail.com">stichnot@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Wed, Dec 22, 2010 at 10:01 AM, Greg Oliver &lt;<a href="mailto:oliver.greg@gmail.com">oliver.greg@gmail.com</a>&gt; wrote:<br>
&gt; On Wed, Dec 22, 2010 at 11:02 AM, Jim Stichnoth &lt;<a href="mailto:stichnot@gmail.com">stichnot@gmail.com</a>&gt; wrote:<br>
&gt;&gt; I&#39;m moving to mythbuntu 10.04 (for the LTS aspect -- I build my own<br>
&gt;&gt; myth binaries from source) and I want to set up my 3 netbooting ION<br>
&gt;&gt; frontends as Mythbuntu-Diskless clients according to the instructions<br>
&gt;&gt; at <a href="http://www.mythbuntu.org/wiki/network-boot-mythbuntu-diskless" target="_blank">http://www.mythbuntu.org/wiki/network-boot-mythbuntu-diskless</a> .<br>
&gt;&gt; The only issue so far is that when the diskless client boots, it<br>
&gt;&gt; insists on settings its hostname as the MAC address. A related issue<br>
&gt;&gt; is that it auto-generates an /etc/hosts file whereas I would like to<br>
&gt;&gt; use a system-wide hosts file.<br>
&gt;&gt;<br>
&gt;&gt; Does anyone have experience getting this to work &quot;right&quot;? Or do I<br>
&gt;&gt; need to resort to something like overriding hostname and /etc/hosts in<br>
&gt;&gt; rc.local?<br>
&gt;&gt;<br>
&gt;<br>
&gt; I remember digging for this for a couple of hours when I wanted my<br>
&gt; router to set my hostnames. The config file is &quot;inside&quot; the chroot<br>
&gt; environment.<br>
&gt;<br>
&gt; /etc/initramfs-tools/conf.d/ltsp<br>
&gt;<br>
&gt; change OVERLAYKEY=&quot;HOSTNAME&quot;<br>
&gt;<br>
&gt; and rebuild the initrd - you&#39;ll be good to go and have friendly<br>
&gt; hostnames again..<br>
<br>
</div>I made the OVERLAYKEY change, then regenerated the initrd by running<br>
mkinitramfs on the client, then copied the initrd to the server&#39;s tftp<br>
area and rebooted the client. Now the hostname ends up being &quot;ltsp&quot;.<br>
What could I be doing wrong?<br>
<font color="#888888"><br></font></blockquote><div> </div><div>I had a similar problem when I moved to mythbuntu 9.10 (never did go to
10.04). I don&#39;t have an ltsp file in /etc/initramfs-tools/conf.d/ltsp,
but the trick for me was to add &quot;hostnameoverride=HOSTNAME&quot; (just like
that, don&#39;t put in your hostname for HOSTNAME) to the kernel boot
options. My final option line looks like this: <br>
<br>
append ro initrd=initrd.img quiet splash hostnameoverride=HOSTNAME<br><br>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.<br>

<br>
I don&#39;t remember what exactly I did to get that to stick, but I have that part appended to the following files:<br>
<br>
/opt/ltsp/amd64/boot/pxelinux.cfg/default (/opt/ltsp/and64 is my changeroot)<br>
/var/lib/tftpboot/ltsp/amd64/pxelinux.cfg/default<br>
<br>
It&#39;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 &quot;ltsp&quot; or &quot;(mac addr)&quot; and started getting my hostname from my
dhcp router.<br>
<br>
Again it&#39;s been a while, but I think I got my mac address for a
hostname, made the above edits and started getting &quot;ltsp&quot; instead.
Eventually I figured out that my router (running tomato) wasn&#39;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 &quot;static dhcp&quot; basic configuration page for
making the address static and instead added this line to the &quot;dnsmasq
custom configuration&quot; page in the advanced section:<br>
<br>
dhcp-host=(my:mac:addr),192.168.1.115,(my_hostname),1440m<br><br>I think I used wireshark/ethereal to figure out it was the router doing the wrong thing.<br><br>
Hope this helps. If not, I&#39;ll be able to search for my own answer when this bites me again in a year or so :)<br>
<br>
--Jack<br></div></div><br>