Move AdGurard To USB Drive

Consider setting up an extroot configuration to copy over the overlay partition onto a plugged in usb drive or SD card, as your case may be. See [OpenWrt Wiki] Extroot configuration

It works a treat with my Mango where in I could not install AdGuard. Now I have a 32GB Sandisk Cruzer Fit, holding it all!

Plan to set it up on my Beryl too with the sd card.

Has anyone tried any USB hubs to extend capabilities?

I have tested USB hub works with USB stick and USB SSD drive on both my GL-MV1000W and GL-AR750S, which only have USB 2.0 (max. 2.5W/0.5A power).

Spinning USB hard drive did not work even with a powered USB hub. Ethernet adapter and wifi adapter also did not work.

Hi just thought I would welcome you to the forum, Iā€™m pleased to say they are friendly and very helpful, unlike some forums Iā€™ve been on Iā€™ve tried the patience of wcs2228 helping me move AdGuard to USB so moving more might be pushing it.
I donā€™t mind moving programmes that donā€™t impact on the router, as if a USB or SD card develops a problem it might brick the router.

1 Like

Hi and thank you for welcoming me. :smiley:

While I have faced the issue of the external storage failing, the router just reverts to booting off the internal storage as it was unable to locate the external storage.

So if the extroot config was setup on a fresh factory reset device, then the router would appear as if it was factory reset when the external device failed.

The risk of Exroot failure is not that the router would not boot, but that it will not be configured to the same as before. The router would basically be offline, while it takes you time and effort to fully recover.

The backup of settings that can be done in LuCi only includes only /etc files and does not include related files that may be in other directories. In particular, packages that have been installed after the stock firmware or have been upgraded will not be in the LuCI backup and all of these have to reinstalled, assuming you kept records of them and any related data files.

Each owner can personally evaluate the risk-benefit and proceed accordingly. In the situation above, AdGuardHome was moved because it is quite large and there will only be 1 package to recover if the USB drive fails. In practice, the 64MB internal storage is quite a lot and 26% of it was freed up as a result, which leaves lots of plentiful space. I donā€™t think a multi-GB USB drive is necessary for this purpose.

Instead of and in spite of all the effort, I would prefer that GL.iNet build all new routers with 128MB or more internal storage, which both my GL-AR750S and GL-MV1000W have.

2 Likes

Hi any ideas a way round this AdGuard is working and blocking but will not update the DNS blocklists i get this error
image
The only way to update the list is take back to the original directory update it and move it back to the USB drive.

You may be missing a symbolic link to /etc/AdGuardHome to the same USB drive location.

It may be possible to download the file from the URL and move it into the directory on the USB drive.

Sorry donā€™t understand what to download, I looked at the AdGuard config file for any paths nothing in there, but if you do any confirmation to AdGuard it copies the config file to the original directory so itā€™s with the symbolic link

Fair enough. To each their own I suppose. Especially when one is happy with oneā€™s device and wishes a few additional essential features.

PS: I am using a Mango, to fiddle around. Iā€™m getting fairly decent results even with the oisd full list of >300k filters.

The error message refers to URL https://raw.githubusercontent.com/DandelionSprout/adfilt/master/GameConsoleAdblocklist.txt, which does not exist. On my router, the config.yaml file refers to filter file https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt, which does exist.

The error message also refers to /etc/AdGuardHome/ā€¦ and, if you moved that directory to the USB drive, there has to be a symbolic link to that location.

My way of thinking correct me (as Iā€™m probably wrong) but once AdGuard home is moved and all subfolders and files as well, it should make no difference where it is, the config.yaml file is the file that reproduces itself.
So the symbolic link should be to the subfolder data
image

I am not clear which are all the files that you moved to the USB drive. If you moved /etc/AdguardHome and created a symbolic link, then that is correct.

To test that the files/directories and symbolic link are set up correctly, run the following SSH commands that trace the missing file reference in the error message:

ls -l /etc/AdguardHome
ls -l /etc/AdguardHome/data
ls -l /etc/AdguardHome/data/filters
ls -l /etc/AdguardHome/data/filters/2389612069

I moved all the files and subfolders all thatā€™s there is the symbolic link,
image
Hence no files found
image

It looks like your symbolic link has not been set up correctly.

First, delete the symbolic link(s) you already created (rm command) and the /etc/AdguardHome directory (rmdir command).

Second, run the following commands:

cd /etc

ln -s /mnt/usb_drv/AdGuardHome ./AdGuardHome

ls -l /etc/AdguardHome
ls -l /etc/AdguardHome/data
ls -l /etc/AdguardHome/data/filters
ls -l /etc/AdguardHome/data/filters/2389612069

Hi i tried both
ln -s /mnt/usb_drv/AdGuardHome/AdGuardHome ./AdGuardHome
ln -s /mnt/usb_drv/AdGuardHome ./AdGuardHome
either produced
image
I had a feeling it was OK otherwise it wouldnā€™t find AdGuard at all

There is something wrong with the directory structures. Did you delete the old symbolic links first and were there any errors when you created the new links?

It is probably something simple. Post the output from the following SSH commands:

ls -l /etc

ls -l /mnt /usb_drv/AdGuardHome
ls -l /mnt /usb_drv/AdGuardHome/data
ls -l /mnt /usb_drv/AdGuardHome/data/filters
ls -l /mnt /usb_drv/AdGuardHome/data/filters/2389612069

The directory in the following command does not exist on the USB drive:

ln -s /mnt/usb_drv/AdGuardHome/AdGuardHome ./AdGuardHome

I take it you only want to see the bit that mentions AdGuard
image
Would it be better to change the original symbolic link
The other commands are the same not found

The /etc/AdGuardHome directory should not be there because the symbolic link is to replace the directory and all its contents, as I had indicated. The real directory with all the real content should have been copied to the USB drive. The idea is to have /etc/AdGuardHome as a symbolic link to /mnt/usb_drv/AdGuardHome.

The other commands are the directories that you copied to the USB drive as /mnt/usb_drv/AdGuardHome, so they have to exist as shown in Post 34 screenshot:

ls -l /mnt /usb_drv/AdGuardHome
ls -l /mnt /usb_drv/AdGuardHome/data
ls -l /mnt /usb_drv/AdGuardHome/data/filters
ls -l /mnt /usb_drv/AdGuardHome/data/filters/2389612069

I am not clear which are all the files that you copied to the USB drive and whether you left some files on /etc/AdGuardHome. If the the /mnt/usb_drv/AdGuard directories are there, then just to rename it and create the symbolic link:

cd /etc
mv ./AdGuardHome ./AdGuardHome.SAVE
ln -s /mnt/usb_drv/AdGuardHome ./AdGuardHome

I moved AdGuard and all subfolders and files the lot, one folder is just backup but I left it on the usb because thereā€™s plenty of room.
So A folder called AdGuard is on the usb the same as it is when it was in /etc, mirrored, then I delete everything in /etc /AdGuard apart from the symbolic link.
Sometimes you put:

ln -s /mnt/usb_drv/AdGuardHome/AdGuardHome ./AdGuardHome
ln -s /mnt/usb_drv/AdGuardHome ./AdGuardHome
Which is it, thanks