Change Docker data directory on Debian

If you’ve installed Docker with the default settings on Debian, it will be storing Docker images, containers and volumes in /var/lib/docker, which will be an issue if you have /var on its own (usually small) partition.

After using Docker for a while you may start to run out of space on the /var partition, at which point you’ll need to either add more space to that partition, or relocate it to somewhere with more space.

Here are the steps to change the directory even after you’ve created Docker containers etc.
Note, you don’t need to edit docker.service or init.d files, as it will read the change from the .json file mentioned below.


  1. Edit /etc/docker/daemon.json (if it doesn’t exist, create it)
  2. Add the following
      "graph": "/new/path/to/docker-data"
  3. Stop docker
    sudo systemctl stop docker
  4. Check docker has been stopped
    ps aux | grep -i docker | grep -v grep
  5. Copy the files to the new location
    Optionally you could run this inside screen if you have a large amount of data or unreliable ssh connection.

    sudo rsync -axPS /var/lib/docker/ /new/path/to/docker-data

    Options explanation, check out the man page for more info

    -a, --archive             archive mode; equals -rlptgoD (no -H,-A,-X)
    -x, --one-file-system     don't cross filesystem boundaries
    -P                        show progress during transfer
    -S, --sparse              handle sparse files efficiently
  6. Start Docker back up
    sudo systemctl start docker
  7. Check Docker has started up using the new location
    docker info | grep 'Docker Root Dir'
  8. Check everything has started up that should be running
    docker ps

Leave both copies on the server for a few days to make sure no issues arise, then feel free to delete it.

sudo rm -r /var/lib/docker

Documentation / sources

Official docs

Docker GitHub issue item

Post this blog was guide was inspired b linuxconfig

Tested and working on Debian Jessie (8.7) with Docker (17.03.1-ce, build c6d412e)

Install AdvancedTomato on the Linksys E2500 v3

Installing the AdvancedTomato firmware onto the Linksys E2500 v3

Linksys E2500 N600 Dual-Band Wireless Router
For more info on this router look at wikidevi or the manufacturer’s website.

For those of you that don’t know, AdvancedTomato is a fork from the Tomato by Shibby project, but with a much improved GUI frontend, and much easier to use.

I bought this one as it’s still a current model being sold which has AdvancedTomato support and is very cheap for what you get.

Disclaimer: When doing things on the firmware level there is always a possibility that something might go wrong and your router becomes bricked.


  1. Connect the router via an ethernet cable in one of the LAN ports (1-4), not the WAN port
  2. Login at
    username: admin
    password: admin
  3. Download the firmware from
  4. Flash this onto the router in the firmware upgrade tab
  5. Wait for it to reboot (1-5 mins)
  6. Once the router is back, go to and login
    username: admin
    password: admin
  7. Erase NVRAM (thorough) under Administration > Configuration
  8. Click ok to the confirmation, and it’ll reboot. (~2mins)
  9. Login again
    username: admin
    password: admin
  10. Change your login password and setup as desired


Inspired by Lindqvist blog post, which is about installing the Tomato by Shibby version on an older version of the E2500.

Dreamhost 40% off first year – promo

Dreamhost logo

Click one of links below to get either $50 (40%) or $25 (20%) discount on the first year of hosting with Dreamhost.

$50 off shared hosting (pay $69.40 for one year)

You will also get a free domain (which you’d get as a normal user signing up too)

I have been with with Dreamhost since 2007 and while occasionally there are small issues, on the whole my experience has been great over the years (this website is also hosted with them).

I get money from Dreamhost for referring you.
$47 for the $50 promo code and $72 for the $25 promotion

AdvancedTomato on the Linksys EA6700

Installing the AdvancedTomato firmware onto the Cisco Linksys EA6700

Cisco Linksys Smart Wi-Fi Router AC 1750 HD Video Pro
More info on this router.

Scroll down, if you’re just after the instructions, and skip the background info.

Disclaimer: When doing things on the firmware level there is always a possibility that something might go wrong and your router becomes bricked.

So I got this new router a few days ago, I never installed the Tomato firmware before, always been a DD-WRT guy, but figured since this router had support of both I’d try it (that and DD-WRTs interface is getting a bit dated), spent an hour or so learning about Tomato, figured out the original build has long since died, but there are several forks (like clones) being actively developed these days.

Tomato by Shibby seemed to be the main one with the most active support for a range of routers, but for a beginner in the Tomato world it was all a little too confusing, so kept on searching and stumbled upon the amazing AdvancedTomato, these guys have a great website and even more importantly a beautiful UI in front of Tomato!

It’s obvious the guy behind it knows his graphics/UX (User Experience), and how important it is, so often in the world of Linux, firmware’s, low level technical stuff you find terrible UX /UI (User Interface), which makes it hard for non-technical users, or people learning how these things work.

A big thank you to Jaka Prasnikar (the guy behind AdvancedTomato [I think]), Jonathan Zarate (the guy behind the original Tomato firmware) and everyone else involved.

Also a big thank you to qin, as if it wasn’t for his commit comments I would probably still be stuck.

30/30/30 reset
According to jago75, the 30/30/30 reset has no effect on ARM-based routers (which the EA6700 is)

that’s an arm router so 30/30/30 means nothing.. it just doesn’t work at all.. have a look at depswa’s post. let us know if it will eat ddwrt -)

Why the double firmware install?
The steps for installing the Tomato firmware onto the EA6700 router are a little different than that of normal routers. It has 2 locations where it stores firmware, and if you try to install AdvancedTomato as per normal, it will just reboot back to the stock Linksys firmware.

This is why we first “upgrade” to the stock firmware (into the first location), then again with AdvancedTomato, into the second location, which is what it runs from by default. (at least this is my understanding)

The long guide (for beginners)

  1. Download the AdvancedTomato firmware from their very nice download page:
  2. Once you have the tomato-EA6700-AT-ARM-3.4-138-AIO-64K.trx file (exact name may differ) rename the extension from .trx to .img, as this is what the Linksys uses (however I don’t think it matters)
  3. Download the stock firmware from Linksys (or google “EA6700 firmware”, as the link may die)
  4. Wipe the device’s settings; go to Troubleshooting then the Diagnostics tab, then it’s under FactoryReset link “Reset” (thanks chanz)
    , or hold the reset pin for 30 seconds, then release and you should see all the network port lights, light up.
  5. Once the device is back up, log in (admin/password) and upload the stock Linksys firmware.
  6. Once the device finishes its “upgrade”, log back in and upload the new AdvancedTomato firmware that was downloaded earlier and renamed to .img.
  7. Wait about 5 mins, then go to if nothing loads, then take the power out and plug it back in (reboot it), when it comes back you will be on AdvancedTomato!
  8. Login, the default username/password is admin/admin.
  9. Finally “Erase all data in NVRAM memory (thorough)” in Administration > Configuration. This last step is very important, without it, it wont work.
  10. Click ok to the confirmation, and it’ll reboot. (~2mins)
  11. Login and change the default password.
  12. You’re done!


  • Read the comments for help if your WiFi goes down after a few days.
  • Also if after flashing AT and you reboot the router and end up back on the official Linksys firmware, try the steps again, but flash the official firmware twice, not just once, then flash AT and erase the NVRAM.

Feel free to leave any feedback in the comments.

The quick guide (for advanced users)

  1. From official Linksys firmware, wipe the device’s settings
  2. After reboot, upgrade to the official firmware.
  3. Upgrade to AdvancedTomato firmware.
  4. “Erase all data in NVRAM memory (thorough)” in Administration > Configuration.

Advanced Tomato not sticking after reboot?
Check out chanz’s comment

Some acronyms (as I understand them):
AIO = All In One (has everything)
VPN = A cut-down version of the firmware with specific VPN support.
OFW = Official Firmware, e.g. what originally come with the device
CFW = Custom Firmware, e.g. what we’re putting on the router (Tomato, DD-WRT, OpenWrt etc).
NIC = Network Interface Controller (the things where you plug the network cables into)

I am by no means an expert in flashing firmware, only done it a few times, first a Netgear router (DD-WRT), then a Linksys (DD-WRT), and now this Linksys router (AdvancedTomato), just thought I’d share this as I couldn’t find anything online on this specific router and Tomato based firmware, and didn’t have much success with my initial attempts.