dnsmasq won't start automatically. [SOLVED]
-
Sorry guys I am frazzled been up all night messing more with Linux.
dnsmasq is in rc.d and after booting
service --status-all
shows dnsmasq present in the list but it has a minus sign (not started). Starting dnsmasq manually - all good no errors.
My router runs DHCP and dnsmasq is (now) on the FOG server for UEFI and Legacy PXE boot. The awesome guide by @george1421 worked like a charm.
https://forums.fogproject.org/topic/12796/installing-dnsmasq-on-your-fog-server
I found this in syslog
Apr 26 07:25:25 fogger systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server... Apr 26 07:25:25 fogger dnsmasq[2610]: started, version 2.84rc2 DNS disabled Apr 26 07:25:25 fogger dnsmasq[2610]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset auth cryptohash DNSSEC loop-detect inotify dumpfile Apr 26 07:25:25 fogger dnsmasq-dhcp[2610]: DHCP, proxy on subnet 192.168.1.100 Apr 26 07:25:25 fogger systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server. Apr 26 07:25:25 fogger systemd[1]: Reached target Host and Network Name Lookups.
Then further down in syslog dnsmasq entries related to the ltsp.conf settings. There are no errors or anything.
I can provide any logs or confs if needed to solve the problem. I am so close and was thinking I could just start the service using cron
@reboot sudo service dnsmasq start
That seems like cheating and there has to be a correct way to do it.
Thanks
-
@Fog_Newb After a reboot of the system run
systemctl status dnsmasq
and post output here. -
Ooops I got the formatting wrong. Here is a text output.
-
@fog_newb For systemd based systems if you want the service to start every time you would key in
sudo systemctl enable dnsmasq
That will set dnsmasq to start up automatically after every reboot. -
Hello,
Nice! that worked. I’d swear I had tried that before as I was scouring different dnsmasq guides most of the night trying to get it started automatically.
Thanks again.
That thing it did after running the command, I never saw that come up last night.
-
@fog_newb Well there are really two commands you need to use.
- Enable the service to start every reboot
systemctl enable dnsmasq
- To start the service now
systemctl start dnsmasq
These are two distinct actions and one doesn’t depend on the other.
- Enable the service to start every reboot
-
@george1421 said in dnsmasq won't start automatically. [SOLVED]:
@fog_newb Well there are really two commands you need to use.
- Enable the service to start every reboot
systemctl enable dnsmasq
- To start the service now
systemctl start dnsmasq
These are two distinct actions and one doesn’t depend on the other.
Thanks. I have used both of those commands before trying to get it to autostart on boot. I haven’t used them since running
sudo systemctl enable dnsmasq
, which was the one that got dnsmasq starting on boot for me. Perhaps since I used those commands prior it is all good?I went through my bash history and saw I almost used
sudo systemctl enable dnsmasq
I had the syntax messed up though. I usedsudo systemctl dnsmasq enable
I am really starting to like Linux. I digress, I am mostly a casual so I doubt I will ever have it on my daily driver but I am thinking about trying it on a laptop. I don’t know though, sometimes, I just like to point and click.
- Enable the service to start every reboot