britannic / blacklist

Blacklist and Adware Blocking for the Ubiquiti EdgeMax Router
Other
532 stars 35 forks source link

Hangs EdgeOS Upgrade When in firstboot Directory #27

Closed dotsam closed 4 years ago

dotsam commented 4 years ago

Hi there,

Thanks for making this package, it's great to be able to have dns blacklisting right on my ER without any separate network hardware.

EdgeOS has a feature where any .deb files placed in /config/data/firstboot/install-packages will be installed when the OS is first booted (ie. when upgrading from one release to another). This is a useful feature to install some packages that aren't included by default, and ensure they'll be available to the system when it is being configured.

Ideally, I could put the edgeos-dnsmasq-blacklist file here and the existing config that's being loaded would take effect. Unfortunately, some part of the process does not work, and the device hangs somewhere and never completes the boot process, and I lose access to it. Unfortunately, I can't provide many more details than that. If I had a spare device, I would console in and see what exactly is happening, but I'm unwilling to intentionally break my device at the moment.

If you're willing to investigate further, the script that kicks all this off is /etc/ubnt/ubnt-rcS/ubnt-rcS.sh, and it attempts to install all packages with the following command:

DEBIAN_FRONTEND=noninteractive dpkg --force-confold --force-confdef -i "${pkgs[@]}" 2>&1 >> /var/log/ubnt-firstboot-pkg-install.log

I suspect that the auto-config setup portion of the Debian installation script isn't happy when being run this early in the boot process, but again, I have no other data, that's just a hunch. Oh, further info, this has happened to me at least twice, under 2.0.x releases, and most likely all with 1.7.7.x releases of blacklist.

At the very least, you could possibly add a warning in the readme about this, and how it might just be the best idea to re-install the package after the first boot has been completed.

britannic commented 4 years ago

Hi Sam, I'll welcome a pull request on the documentation. Automatic reinstallation isn't supported, although the documents do reference some scripts I put together elsewhere on github.com. You can also post your question over on Ubiquiti's community EdgeRouter forums.