Deleted a wpad file by mistake

Either you are not actually running squashfs (unlikely, based on your previous answers), did some of the steps wrong or a misconfiguration somewhere (like the wpad service being disabled).
If the service was indeed disabled, it created a deletion entry at /overlay/upper/etc/rc.d, like these:

If the service was automatically enabled in the image:

root@router2:~# ls /rom/etc/rc.d/*wpad*
/rom/etc/rc.d/K21wpad  /rom/etc/rc.d/S19wpad

Deleting these entries from /overlay/upper/etc/rc.d is enough (S* means this linked service script will be run at startup, and K* means this linked service script will be run at shutdown).

If the service was not enabled in the image, you do service wpad enable as usual.

If you ran the script I've posted or deleted the entries manually, what was the output of find /overlay/upper -type c -size 0c afterwards? Did you sync && reboot to both flush your changes to disk and reboot the system to erase kernel caching, were /usr/sbin/wpad and /usr/sbin/hostapd valid after all the steps?

What's the output of these commands?

root@router2:~# grep squashfs /proc/mounts
/dev/root /rom squashfs ro,relatime,errors=continue 0 0
root@router2:~# grep overlayfs /proc/mounts
overlayfs:/overlay / overlay rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work 0 0

If you actually need WPA-Enterprise and as such, need full wpad, I recommend you to build a custom firmware image replacing wpad-basic with wpad, write any remaining to be preserved files to /etc/sysupgrade.conf and upgrade through auc or directly, via sysupgrade.

1 Like

With hnyman's explanation and this tidbit from you... it all clicked. I was looking for a file to delete, not the marker. I put the original microSD card back into the original RPi 4b and removed the deletion marker and rebooted. It came back up and worked fine with the old wpad-basic-mbedtls.

Thanks to both of you, I have a much better understanding of squashfs and how it works.

This still leaves me with the question... and perhaps best asked in another thread....

Since this is on RPi and not traditional router, a travel router at that, with the only outbound data-link being wifi how is the best way to replace the wpad-basic-mbedtls with full wpad? This has not been an issue on my primary OpenWRT devices as they are always connected to the internet. I have 4 or 5 OpenWRT devices running at any given time but I don't use OpenWRT as a router, they are all WAPs with an ethernet backhaul. My router is pfSense on a Netgate appliance.

As to your question on full wpad... as mentioned on other messages,I only use OpenWRT for WAPs. I left DD-WRT for DSA in OpenWRT. I originally used WRT1200AC v2s but moved to WRT3200ACMs and while I didn't see any data leaks with my implementation of VLANs, I waited for the fix... Once I had everything working I was contantly having intermittent WiFi issues, disconnects, false bad password notifications, etc. Knowing one of the Devs had been brought onboad with MediaTek I thought the Linksys e8450 would be a good move to updated hardware.... While my build and extensive use of 802.1q and Bridge Bridge VLAN filtering works exceptionally well, I was still seeing some anomylous behavior on WiFi. I mentioned it on another site and it was recommended to replace wpad-basic with full wpad... this cured all the issues. Very stable now... except for the KoD issues. Since I have the memory and disc space on an RPi, I just wanted to change it as a precautionary effort.

I don't know about these issues you've mentioned, I don't use wifi myself and just keep it around to suit the needs of the rest of the household.

As for the best way to replace it, I've mentioned it above. Build a custom image with packages you actually need at the moment, and opkg install new packages as your requirements increase over time.

You can also just drop squashfs and use ext4 instead, assuming you've a couple of GBs in your Pi. It isn't as easy as deleting /overlay/upper to restore to factory, but disk performance should be considerably better and replacement of packages doesn't require all those overlayfs tricks (nor do they keep replaced packages in ROM).

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.