Technology – Random thoughts https://blog.adriel.co.nz Occasionally I think of things to write about. Sat, 05 Mar 2022 22:41:28 +0000 en-NZ hourly 1 https://wordpress.org/?v=6.0 AdvancedTomato on the Linksys EA6700 https://blog.adriel.co.nz/2022/03/04/advancedtomato-on-the-linksys-ea6700/ https://blog.adriel.co.nz/2022/03/04/advancedtomato-on-the-linksys-ea6700/#comments Thu, 03 Mar 2022 22:13:00 +0000 http://adriel.co.nz/blog/?p=8 Install AdvancedTomato firmware onto the Cisco Linksys EA6700

15 minute upgrade video, step by step in real time.

Disclaimer

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


March 2022 update

AdvancedTomato (based on Tomato by Shibby) firmware hasn’t been updated in years, so I would recommend using FreshTomato (last updated 24 Dec 2021) which is still being updated, and has been running rock solid on my EA6700 for the last year. The biggest drawback is the UI isn’t quite as clean and modern as AT was.

You should also be aware of a 32K NVRAM limit, which causes a lot of issues with this router (read the comments), thus I would recommend removing this limit by following the steps here (backup mirror of steps + mirror of files), though removing the limit also means you can never go back to Linksys stock firmware, only other third party firmware like AT, FreshTomato or DD-WRT etc

I’d recommend reading through all the steps before starting to get an idea of what will need to be done, then follow the steps carefully.

The old instructions to install AdvancedTomato are below.


The long guide (for beginners)

  1. Download the AdvancedTomato firmware from the download page.
  2. Download the old stock firmware, FW_EA67001.1.40.166281prod.img from Linksys.
  3. Save anything you need internet for before you lose it, if this is the router you use for the internet.
  4. IMPORTANT: If your router is running firmware build version 172250 or higher you’ll have to downgrade to build 166281, as you can’t upgrade to AT from the newer versions. To do this follow the guide here.
  5. Check your router is running on build 166281.
  6. Login to the remote web interface. (default password is admin)
  7. Go to the Connectivity page, under “Firmware Update” it’ll show your build version.

e.g. (Current Version: 1.1.40.166281) the bold part is the build version.

  1. Make sure to have nothing else plugged into the router but the one network cable you’ve got plugged into your computer and the routers Ethernet 1 port.
  2. Wipe the device’s settings; go to Troubleshooting then the Diagnostics tab, then it’s under the “Factory reset” link, “Reset”, or hold the reset pin for 30 seconds, then release and you should see all the network port lights, light up.

Once the device is back up follow these steps;

  1. Tick that you’ve read and accepted the License Terms.
  2. Also tick “I want to skip Setup and configure my router manually”, click next, wait ~20 seconds while it figures out you have no internet, then click login.
  3. Login (default password is admin).
  4. Go to the Connectivity page, under “Firmware Update”
  5. Click on Choose File under the “Manual” heading.
  6. Select the old stock Linksys firmware image, FW_EA67001.1.40.166281prod.img
  7. Click Start and Yes.
  8. Once the device finishes its “upgrade” (at least 3 mins), log back in and upload the new AT firmware.
  9. Wait about 5 mins, then go to http://192.168.1.1/, if nothing loads, take the power out and plug it back in (reboot it), wait 5 mins, try the above link, wait a few seconds and the AT web UI should load.

If it doesn’t, wait another 5 mins, if still nothing then abort, reset it (unplug power from router, push the reset pin, plug power back in, hold reset pin for 45 seconds, then let go, wait 5 mins and the stock firmware should be back), then start again from step 1.

If you end up back on the stock Linksys firmware, start again and redo all the steps and check what IPs are assigned on your computer while the upgrades are happening (see below).

  1. Login, the default username/password is admin/admin.
  2. Finally “Erase all data in NVRAM memory (thorough)” in Administration > Configuration under “Restore Default Configuration”.

This is very important, if you skip erasing the NVRAM the new firmware won’t hold.

  1. Click OK to the confirmation, and it’ll reboot. (~2mins)
  2. Login, go to Administration -> Scripts and paste in the 3 lines below on both the Init and Shutdown tabs, and click Save. This helps keep your router stable. (more info in the comments)
for line in $(nvram show | grep =$); do var=${line%*=}; nvram unset $var;
done
nvram commit
  1. Finally, change the default password.
  2. You’re done!

The quick guide (for advanced users)

  1. From the official Linksys firmware make sure you’re running on build 166281.
  2. Wipe the device’s settings.
  3. After reboot, “upgrade” to the official firmware, build 166281.
  4. Upgrade to AdvancedTomato firmware.
  5. “Erase all data in NVRAM memory (thorough)” in Administration > Configuration.
  6. Add the 3 lines from the link below to both Init and Shutdown tabs in
    Administration > Scripts
for line in $(nvram show | grep =$); do var=${line%*=}; nvram unset $var;
done
nvram commit

Troubleshooting

  • Read the comments for help if your WiFi goes down after a few days.
  • 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.

Also check out chanz’s comment as he talks about it, as well as other comments.

Old firmware mirror

A mirror of the 166281 firmware has been hosted on my server in case Linksys takes down the link one day.

30/30/30 reset?

According to jago75, the 30/30/30 reset has no effect on ARM-based routers like the EA6700.

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)

Disbale all LED lights (except the Linksys logo)

In the Administration > Scripts page, put the following into the Init tab, save, and reboot.

sleep 10
et robowr 0x0 0x18 0x0
et robowr 0x0 0x1a 0x0

Some acronyms

AT = AdvancedTomato
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)

Disclaimer

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.

Alternative name

Cisco Linksys Smart Wi-Fi Router AC 1750 HD Video Pro

Feel free to leave any feedback in the comments.

]]>
https://blog.adriel.co.nz/2022/03/04/advancedtomato-on-the-linksys-ea6700/feed/ 80
Installing Windows on a Mac, getting “Your disk could not be partitioned” error https://blog.adriel.co.nz/2019/01/06/installing-windows-on-a-mac-getting-your-disk-could-not-be-partitioned-error/ https://blog.adriel.co.nz/2019/01/06/installing-windows-on-a-mac-getting-your-disk-could-not-be-partitioned-error/#comments Sun, 06 Jan 2019 09:30:41 +0000 https://adriel.co.nz/blog/?p=172 The problem

Installing Windows 10 using the Boot Camp Assistant app, but each time the app gets to the partitioning step it errors out saying “Your disk could not be partitioned”, suggesting “run Disk Utility to check and fix the error”.

“An error occurred while partitioning the disk. Please run Disk Utility to check and fix the error.”

You’ve tried running Disk Utility but the error still persists. Here is what fixed it for me, there are some other possible solutions at the end of the article.

Possible solution

If you are using Time Machine to back up your Mac, then clearing out all your local snapshots could fix this.

Make sure to do a Time Machine backup in case something bad happens here or with the Windows install.

1, In System Preferences, untick “Back Up Automatically” in the Time Machine preference

2, Run this command in the Terminal app;

tmutil thinlocalsnapshots / 9999999999999999

basically, it will remove all the local backups on your boot drive, it won’t delete any of your files on your Time Machine backup drive.

3, Once the command finishes, start the Boot Camp Assistant app and try again, it should work now.

4, When you have Windows installed remember to re-enable Time Machine on the Mac side.

Not sure if this is related or not, but my boot drive at the time was formatted as APFS and I was on macOS Mojave 10.14.2

A little bit about the tmutil command:

tmutil thinlocalsnapshots <mount_point> [purge_amount] [urgency]

The <mount_point> is which drive you’d like cleaned.

The [purgeamount] is the amount of space you want to recover. (optional)

The [urgency] part is a number between 1 – 4, on how quickly you want the space recovered. (optional)

Other possible solutions:

  • The first obvious fix is to run First Aid in Disk Utility if you haven’t yet. (run it at boot)
  • Run a filesystem consistency check (/sbin/fsck -fy) during boot, see instructions here or here.
  • If you’re low on disk space, freeing up some might help.
  • If none of this helps, and you can’t find anything else to try online, then your only option left is to backup and reinstall;
    1. Backup everything via Time Machine
    2. Boot into Internet Recovery (hold down Command (⌘) + Option + R at boot)
    3. Erase your whole internal disk using Disk Utility (not just the partition)
    4. Install a fresh copy of macOS and install any Mac updates
    5. Run Boot Camp Assistant and partition your drive + install Windows BEFORE restoring all your Mac data.

Feel free to leave comments if you get stuck, or find other solutions to this error.

Source: Apple discussions

]]>
https://blog.adriel.co.nz/2019/01/06/installing-windows-on-a-mac-getting-your-disk-could-not-be-partitioned-error/feed/ 14
Change Docker data directory on Debian https://blog.adriel.co.nz/2018/01/25/change-docker-data-directory-in-debian-jessie/ https://blog.adriel.co.nz/2018/01/25/change-docker-data-directory-in-debian-jessie/#comments Wed, 24 Jan 2018 22:16:17 +0000 https://adriel.co.nz/blog/?p=72 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.

Steps

  1. Edit /etc/docker/daemon.json (if it doesn’t exist, create it)
  2. Add the following
    {
      "data-root": "/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 https://docs.docker.com/engine/admin/systemd/

Docker GitHub issue item https://github.com/docker/docker/issues/3127

Blog post inspired by linuxconfig

Tested and working on Debian Stretch (9.3) with Docker Docker version 17.12.0-ce

]]>
https://blog.adriel.co.nz/2018/01/25/change-docker-data-directory-in-debian-jessie/feed/ 3
Install AdvancedTomato on the Linksys E2500 v3 https://blog.adriel.co.nz/2016/04/13/install-advancedtomato-on-the-linksys-e2500-v3/ https://blog.adriel.co.nz/2016/04/13/install-advancedtomato-on-the-linksys-e2500-v3/#comments Wed, 13 Apr 2016 03:55:10 +0000 https://adriel.co.nz/blog/?p=36 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.

Instructions

  1. Connect the router via an ethernet cable in one of the LAN ports (1-4), not the WAN port
  2. Login at http://192.168.1.1/
    username: admin
    password: admin
  3. Download the firmware from https://advancedtomato.com/downloads/router/e2500v3
  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 http://192.168.1.1 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

Enjoy!

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

]]>
https://blog.adriel.co.nz/2016/04/13/install-advancedtomato-on-the-linksys-e2500-v3/feed/ 9