# After rebooting Ubuntu 18.04 Pi-hole doesn’t work until I run the command “pihole restartdns”

**URL:** https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151
**Category:** Help
**Created:** [June 27, 2019, 11:09am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151 "2019-06-27T11:09:07Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 27, 2019, 11:09am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/1 "2019-06-27T11:09:08Z")

</div>

Every time I reboot pihole I have to do a "pihole restartdns" and everything then comes up and starts working.

I've searched here and askubuntu and nothing is working for me.

Tried this:

[https://discourse.pi-hole.net/t/ubuntu-mint-after-rebooting-pi-hole-doesnt-work-until-i-run-the-command-pihole-restartdns/1645](https://discourse.pi-hole.net/t/ubuntu-mint-after-rebooting-pi-hole-doesnt-work-until-i-run-the-command-pihole-restartdns/1645)

Doesn't work for me.

Tried this:

[https://askubuntu.com/questions/536787/dnsmasq-starting-before-eth0-is-ready-and-therefore-not-binding](https://askubuntu.com/questions/536787/dnsmasq-starting-before-eth0-is-ready-and-therefore-not-binding)

Doesn't work for me because I don't have dnsmasq.service

I've searched for other ways to try and delay dnsmasq from starting but seem to be going round in circles.

So can anyone tell me how to fix this problem. I'm pretty sure if I can just delay the start of dns it will fix the problem.

thanks

---

<div class="post-metadata">

### Author: ![mibere](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mibere/32/18057_2.png) [@mibere](https://discourse.pi-hole.net/u/mibere)
#### Post date: [June 27, 2019, 12:04pm UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/2 "2019-06-27T12:04:11Z")

</div>

After the reboot and before you run `pihole restartdns`, run  
`sudo systemctl status --full --no-pager pihole-FTL.service` and post the output here.

---

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 28, 2019, 7:16am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/3 "2019-06-28T07:16:05Z")

</div>

? pihole-FTL.service - LSB: pihole-FTL daemon  
Loaded: loaded (/etc/init.d/pihole-FTL; generated)  
Active: active (exited) since Sat 2019-06-29 03:02:05 AEST; 1min 17s ago  
Docs: man:systemd-sysv-generator(8)  
Process: 822 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=0/SUCCESS)

Jun 29 03:01:59 USPH1804 systemd[1]: Starting LSB: pihole-FTL daemon...  
Jun 29 03:02:00 USPH1804 pihole-FTL[822]: Not running  
Jun 29 03:02:02 USPH1804 su[1003]: Successful su for pihole by root  
Jun 29 03:02:02 USPH1804 su[1003]: + ??? root:pihole  
Jun 29 03:02:02 USPH1804 su[1003]: pam\_unix(su:session): session opened for user pihole by (uid=0)  
Jun 29 03:02:05 USPH1804 pihole-FTL[822]: FTL started!  
Jun 29 03:02:05 USPH1804 systemd[1]: Started LSB: pihole-FTL daemon.

---

<div class="post-metadata">

### Author: ![mibere](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mibere/32/18057_2.png) [@mibere](https://discourse.pi-hole.net/u/mibere)
#### Post date: [June 28, 2019, 8:28am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/4 "2019-06-28T08:28:19Z")

</div>

Output looks ok.

After the reboot

- any errors or interesting messages in `/var/log/pihole-FTL.log` ?
- run `sudo netstat -tulpen | grep "pihole\|dhcp\|lighttpd"` and post it here.

---

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 28, 2019, 9:14am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/5 "2019-06-28T09:14:31Z")

</div>

Only thing that looks sus to me is:

```auto
ERROR compiling regex on line 1: Invalid preceding regular expression (13)

```

And the outout from netstat before restarting DNS

```auto
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 21063 928/lighttpd
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 999 21580 1047/pihole-FTL
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 999 21591 1047/pihole-FTL
tcp6 0 0 :::80 :::* LISTEN 0 21064 928/lighttpd
tcp6 0 0 fe80::e852:c420:4de::53 :::* LISTEN 999 21912 1047/pihole-FTL
tcp6 0 0 ::1:53 :::* LISTEN 999 21582 1047/pihole-FTL
tcp6 0 0 ::1:4711 :::* LISTEN 999 21593 1047/pihole-FTL
udp 0 0 127.0.0.1:53 0.0.0.0:* 999 21579 1047/pihole-FTL
udp 0 0 0.0.0.0:68 0.0.0.0:* 0 21376 975/dhcpcd
udp6 0 0 fe80::e852:c420:4de::53 :::* 999 21911 1047/pihole-FTL
udp6 0 0 ::1:53 :::* 999 21581 1047/pihole-FTL

```

And after restarting DNS

```auto
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 21063 928/lighttpd
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 999 23766 1425/pihole-FTL
tcp 0 0 192.168.0.15:53 0.0.0.0:* LISTEN 999 23764 1425/pihole-FTL
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 999 23784 1425/pihole-FTL
tcp6 0 0 :::80 :::* LISTEN 0 21064 928/lighttpd
tcp6 0 0 ::1:53 :::* LISTEN 999 23770 1425/pihole-FTL
tcp6 0 0 fe80::e852:c420:4de::53 :::* LISTEN 999 23768 1425/pihole-FTL
tcp6 0 0 ::1:4711 :::* LISTEN 999 23786 1425/pihole-FTL
udp 0 0 0.0.0.0:65358 0.0.0.0:* 999 24138 1425/pihole-FTL
udp 0 0 127.0.0.1:53 0.0.0.0:* 999 23765 1425/pihole-FTL
udp 0 0 192.168.0.15:53 0.0.0.0:* 999 23763 1425/pihole-FTL
udp 0 0 0.0.0.0:68 0.0.0.0:* 0 21376 975/dhcpcd
udp 0 0 0.0.0.0:7765 0.0.0.0:* 999 24151 1425/pihole-FTL
udp 0 0 0.0.0.0:65125 0.0.0.0:* 999 24135 1425/pihole-FTL
udp 0 0 0.0.0.0:24197 0.0.0.0:* 999 24142 1425/pihole-FTL
udp6 0 0 ::1:53 :::* 999 23769 1425/pihole-FTL
udp6 0 0 fe80::e852:c420:4de::53 :::* 999 23767 1425/pihole-FTL

```

_Mod Edit: formatted output_

---

<div class="post-metadata">

### Author: ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)
#### Post date: [June 29, 2019, 1:08am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/6 "2019-06-29T01:08:14Z")

</div>

Try editing these lines in `/etc/init.d/pihole-FTL`

```auto
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog

```

and replace them with these lines:

```auto
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network

```

And then reboot your device.

---

<div class="post-metadata">

### Author: ![Forceflow](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/forceflow/32/6353_2.png) [@Forceflow](https://discourse.pi-hole.net/u/Forceflow)
#### Post date: [June 29, 2019, 1:26am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/7 "2019-06-29T01:26:18Z")

</div>

For a (silly) temporary fix, you could add

@reboot sleep 1m && pihole restartdns

To your crontab.

Disclaimer: this is just to automate the restartdns on boot and will not fix the root of your problem.

---

<div class="post-metadata">

### Author: ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)
#### Post date: [June 29, 2019, 2:46am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/8 "2019-06-29T02:46:49Z")

</div>

If @Mcat12 method dont work, below Ubuntu user had something similar.  
Solution in that thread is more like a patch and not really a fix.  
If have similar issue, you need to figure out why the interface comes up late (`dmesg` etc).

> [@\[Resolved \]Recent ubuntu update causes strange DNS issue](https://discourse.pi-hole.net/t/resolved-recent-ubuntu-update-causes-strange-dns-issue/20449/5):
>
> Sounds a bit like the interface is reported a bit late. Check dmesg. Could be driver issue. Not sure if works but for diagnosing, you could try delay pihole-FTL a bit by editing below file: sudo nano /etc/init.d/pihole-FTL And squeeze in a sleep command (30 seconds just to be sure wink ) somewhere here: #!/bin/bash ### BEGIN INIT INFO # Provides: pihole-FTL # Required-Start: $remote\_fs $syslog # Required-Stop: $remote\_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop…

And your `netstat` looks a bit fragmented.  
Below how a clean `netstat` could look like:

```auto
pi@noads:~ $ sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471[1-8] '
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 2957/pihole-FTL
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 2957/pihole-FTL
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 579/lighttpd
tcp6 0 0 :::53 :::* LISTEN 2957/pihole-FTL
tcp6 0 0 ::1:4711 :::* LISTEN 2957/pihole-FTL
tcp6 0 0 :::80 :::* LISTEN 579/lighttpd
udp 0 0 0.0.0.0:53 0.0.0.0:* 2957/pihole-FTL
udp 0 0 0.0.0.0:67 0.0.0.0:* 2957/pihole-FTL
udp6 0 0 :::53 :::* 2957/pihole-FTL

```

Check for alien config files not belonging to Pi-hole with below one:

`sudo grep -v '^#\|^$' -R /etc/dnsmasq.* | sort`

---

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 29, 2019, 2:58am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/9 "2019-06-29T02:58:05Z")

</div>

```auto
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network

```

Didn't work

---

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 29, 2019, 3:13am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/10 "2019-06-29T03:13:06Z")

</div>

```auto
#!/bin/bash
### BEGIN INIT INFO
# Provides: pihole-FTL
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: pihole-FTL daemon
# Description: Enable service provided by pihole-FTL daemon
### END INIT INFO

sleep 30

FTLUSER=pihole
PIDFILE=/var/run/pihole-FTL.pid
[..]

```

That worked! Changed it to 20 seconds though

---

<div class="post-metadata">

### Author: ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)
#### Post date: [June 29, 2019, 3:17am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/11 "2019-06-29T03:17:27Z")

</div>

Note that this change will be overwritten by any future updates.

---

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 29, 2019, 3:20am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/12 "2019-06-29T03:20:07Z")

</div>

> [@deHakkelaar](#):
>
> sudo grep -v '^#|^$' -R /etc/dnsmasq.\* | sort

No worries, I'll keep an eye on it after updating. Thanks for your help!

One last thing, the output of

`sudo grep -v '^#\|^$' -R /etc/dnsmasq.* | sort`

```auto
/etc/dnsmasq.conf:conf-dir=/etc/dnsmasq.d
/etc/dnsmasq.conf.old:conf-dir=/etc/dnsmasq.d
/etc/dnsmasq.d/01-pihole.conf~:addn-hosts=/etc/pihole/black.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/black.list
/etc/dnsmasq.d/01-pihole.conf~:addn-hosts=/etc/pihole/gravity.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/gravity.list
/etc/dnsmasq.d/01-pihole.conf~:addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf:addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf~:bogus-priv
/etc/dnsmasq.d/01-pihole.conf:bogus-priv
/etc/dnsmasq.d/01-pihole.conf~:cache-size=10000
/etc/dnsmasq.d/01-pihole.conf:cache-size=10000
/etc/dnsmasq.d/01-pihole.conf~:dhcp-ignore-names=tag:wpad-ignore
/etc/dnsmasq.d/01-pihole.conf:dhcp-ignore-names=tag:wpad-ignore
/etc/dnsmasq.d/01-pihole.conf~:dhcp-name-match=set:wpad-ignore,wpad
/etc/dnsmasq.d/01-pihole.conf:dhcp-name-match=set:wpad-ignore,wpad
/etc/dnsmasq.d/01-pihole.conf~:domain-needed
/etc/dnsmasq.d/01-pihole.conf:domain-needed
/etc/dnsmasq.d/01-pihole.conf:interface=enp0s4
/etc/dnsmasq.d/01-pihole.conf~:localise-queries
/etc/dnsmasq.d/01-pihole.conf:localise-queries
/etc/dnsmasq.d/01-pihole.conf~:local-ttl=2
/etc/dnsmasq.d/01-pihole.conf:local-ttl=2
/etc/dnsmasq.d/01-pihole.conf~:log-async
/etc/dnsmasq.d/01-pihole.conf:log-async
/etc/dnsmasq.d/01-pihole.conf~:log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf:log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf~:log-queries
/etc/dnsmasq.d/01-pihole.conf:log-queries
/etc/dnsmasq.d/01-pihole.conf~:no-resolv
/etc/dnsmasq.d/01-pihole.conf:no-resolv
/etc/dnsmasq.d/01-pihole.conf~:server=156.154.70.1#53
/etc/dnsmasq.d/01-pihole.conf:server=156.154.70.1#53
/etc/dnsmasq.d/01-pihole.conf~:server=8.8.8.8#53
/etc/dnsmasq.d/01-pihole.conf:server=8.8.8.8#53
/etc/dnsmasq.d-available/lxd:bind-interfaces
/etc/dnsmasq.d-available/lxd:except-interface=lxdbr0
/etc/dnsmasq.d/lxd:bind-interfaces
/etc/dnsmasq.d/lxd:except-interface=lxdbr0

```

Id there anything there that shouldn't be?

And thanks for all your help guys it was driving me crazy! 🙃

---

<div class="post-metadata">

### Author: ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)
#### Post date: [June 29, 2019, 3:23am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/13 "2019-06-29T03:23:51Z")

</div>

> [@spud](#):
>
> Id there anything there that shouldn’t be?

Yes.  
The config file `/etc/dnsmasq.d/lxd` is not a Pi-hole one.  
Try move it out of that folder to your home folder (for backup):

`sudo mv /etc/dnsmasq.d/lxd ~`

Restart pihole-FTL:

`sudo service pihole-FTL restart`

And check again:

`sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:471[1-8] '`

---

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 29, 2019, 3:27am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/14 "2019-06-29T03:27:44Z")

</div>

Yeah dude I was logged into the wrong linux box when I posted that, I've now edited it sorry about that 🙂

---

<div class="post-metadata">

### Author: ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)
#### Post date: [June 29, 2019, 3:29am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/15 "2019-06-29T03:29:36Z")

</div>

`netstat` clean now ?

---

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 29, 2019, 3:30am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/16 "2019-06-29T03:30:56Z")

</div>

> [@deHakkelaar](#):
>
> sudo netstat -nltup | grep 'Proto|:53 |:67 |:80 |:471[1-8] '

```auto
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 882/lighttpd
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 1973/pihole-FTL
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 1973/pihole-FTL
tcp6 0 0 :::80 :::* LISTEN 882/lighttpd
tcp6 0 0 :::53 :::* LISTEN 1973/pihole-FTL
tcp6 0 0 ::1:4711 :::* LISTEN 1973/pihole-FTL
udp 0 0 0.0.0.0:53 0.0.0.0:* 1973/pihole-FTL
udp6 0 0 :::53 :::* 1973/pihole-FTL

```

Looks better to me

---

<div class="post-metadata">

### Author: ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)
#### Post date: [June 29, 2019, 3:32am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/17 "2019-06-29T03:32:25Z")

</div>

It sure does 😉

---

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 29, 2019, 3:34am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/18 "2019-06-29T03:34:34Z")

</div>

Thanks again dude, ya worth more money! 🤑

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [June 29, 2019, 1:25pm UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/19 "2019-06-29T13:25:00Z")

</div>

I have one further question for fixing it in upcoming releases if you don't mind: When you again remove the `sleep 20` in your init script (so that the command fails), what is the output in `/var/log/pihole.log`?

---

<div class="post-metadata">

### Author: ![spud](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@spud](https://discourse.pi-hole.net/u/spud)
#### Post date: [June 30, 2019, 1:02am UTC](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151/20 "2019-06-30T01:02:19Z")

</div>

> [@DL6ER](#):
>
> I have one further question for fixing it in upcoming releases if you don't mind:

No dramas

I removed the `sleep 20` from `/etc/init.d/pihole-FTL` and rebooted

System came back up with everything working. Strange so I rebooted again same thing, everythings working.

Changed this

```auto
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network

```

Back to this

```auto
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog

```

And it still came up working. So I then moved `lxd` back to `/etc/dnsmasq.d` and rebooted, it failed! So that was the problem all along.

I did a clean install of Ubuntu 18.04 Server as a VM and setup PiHole in that, I don't remember doing anything with DNS during that install so it might be a default thing I'm not sure.

Anyway, its now working and I now know it was this lxd symlink that was causing the problem all along and nothing to do with PiHole.

And if you hadn't asked me for the output of `/var/log/pihole.log` and I'd looked into this more we might never have gotten to the true cause of the problem.

I take it you don't need to see the output of `/var/log/pihole.log` anymore? 🙃

[Next page](https://discourse.pi-hole.net/t/after-rebooting-ubuntu-18-04-pi-hole-doesn-t-work-until-i-run-the-command-pihole-restartdns/21151.md?page=2)
