This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hostname on RPi client is always the first octet of the IP address #582
Comments
Could you please:
|
Updated ltsp from the proposed ppa. Do note that herein I am trying to get Ubuntu Mate 20.04 image working on the RPi.
|
As you can see, the contents of that file mention that HOSTNAME=192. What is the output of this command, as root on the client? sudo /usr/lib/klibc/bin/ipconfig -n eth0 If it says hostname=192, then the issue is in your DHCP server configuration. |
It doesn't return However, it does return a key-value pair for
Since there is no key-value pair except for
Prior to upgrade from the proposed ppa, this did seem consistent. Whenever Scenarios tested: |
When dnsmasq is used in proxy mode, |
So initramfs-tools seem consistent in their function in all these scenarios. Do you see
dnsmasq from the gateway server of my network. |
Yes, root@raspberrypi:~# /usr/lib/klibc/bin/ipconfig -n eth0
IP-Config: eth0 hardware address b8:27:eb:c4:a5:4a mtu 1500 DHCP RARP
IP-Config: eth0 complete (dhcp from 192.168.67.1):
address: 192.168.67.100 broadcast: 192.168.67.255 netmask: 255.255.255.0
gateway: 192.168.67.254 dns0 : 192.168.67.1 dns1 : 0.0.0.0
host : rpi
domain : ioa.sch.gr
rootserver: 192.168.67.1 rootpath:
filename : ...where my dhcp-hosts/plinet.csv contains: b8:27:eb:c4:a5:4a,set:plinet,192.168.67.100,rpi |
I guess if you remove the contents from the csv, If that's the case, then there is nothing to probe further into initramfs-tools.
Your thoughts on this? |
Right.
I'm not sure what's wrong with root@192, what did you expect to see other than user@hostname? Also above, you said that Regarding the Ubuntu MATE login screen, I don't know how it works, maybe it shows the IP in some cases, e.g. when it considers the hostname to be invalid (all numbers)? |
Nothing wrong with What has changed after the upgrade from the proposed ppa is the "string" displayed on the login screen. Earlier it was just |
The related change is this one: d4a67e7 If your DHCP server sends hostname=192.168.2.105, LTSP eventually runs
So, lightdm displays your full hostname, including its "domain name" of 168.2.105. Everything is working as expected except for your main dnsmasq configuration (which also might be working as expected, if you've set some option to provide the IP as hostname; see what the dnsmasq list says about that). |
Related dnsmasq mailing list post - https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q4/015875.html |
From what I can see, in https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q4/015882.html you uploaded the wrong configuration files, as they are the ones from the LTSP server, instead of the real DHCP server which causes the issue. Proxy dhcp servers cannot send hostnames; they are sent from real dhcp servers. |
I checked again. I have uploaded the correct file (ltsp-dnsmasq-noproxy.conf) when ltsp server is in fact the authoritative DHCP server. The problem manifests in both the proxy and non-proxy modes with the RPi as I have shared in the screenshots herein above. |
Ah, sorry I misunderstood then. Heh, it seems I can't reproduce any of the issues that you're reporting! Running dnsmasq in real DHCP mode, and Could it be related to the recent dnsmasq patches? Have you tried with the stock Ubuntu 20.04 dnsmasq? |
I am using a RPi 4B. And yours is 2B? But it is eerie that my hardware seems to be from another world always (at least 2 of 2 cases now). ;)
Yes same result. Rather this was the first problem I had noticed when testing with a RPi but since there is an easy workaround via |
At my office I have an rpi2b, the one I tested with. At home I also have rpi3 and rpi4. |
@alkisg pls try to address this - There is definitely something wierd in the way dnsmasq's handling of serving the IP address as hostname works when one is not explicitly set anywhere. Leaving this to the dnsmasq ml. Why would the same ltsp server config, without RPi - IP address - e.g. 192.168.67.105 Ideally for RPi it should have been ltsp105, isn't it? Isn't this something ltsp is handling implicitly? As stated earlier, when I define I rest with this note and am fine with the workaround via ltsp.conf. |
LTSP reads HOSTNAME from /run/net*.conf, which comes from the initramfs DHCP request, which is outside the LTSP code base. I don't think this issue is related to the LTSP code; I'll convert it into a discussion. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hostname on Pi client is always the first octet of the IP address.
Server address is 192.168.2.97/24
Hostname is always 192.
Defining
HOSTNAME=ltsp%{IP}
explicitly in ltsp.conf fixes it to the expected ltsp+last octet of IP address e.g. ltsp115This problem manifests only on Pis and not on x86 clients.
The text was updated successfully, but these errors were encountered: