This doc expects some experience with the commandline. If you need help, I do reply to these gists.
You should only have the router connected to your computer, unplug any other eithernet cables / disconnect from wifi.
This script is geared toward Ubuntu/Mint, though it can probably be adapted to any other distro fairly easily.
- IP Address:
192.168.1.2
- Subnet mask:
255.255.255.0
- Default Gateway:
192.168.1.1
You need tftp-hpa a slightly less crappy version of the standard tftp client and pcregrep for my script.
apt purge tftp
apt install pcregrep tftp-hpa
On the back of the router, it shows your MAC address, note this.
Find your ethernet interface, it should be something like en#
. You can use
the ip a
command to figure it out. Mine is en7
which will be used
in the rest of this document.
I made a program to constantly try to set the arp
, as it was annoying to
constantly try to re-run the command.
wget https://gist.githubusercontent.com/pjobson/dd7f5e68ba42a276f119f32b67bb6ee5/raw/41b4f22ed4553735ae778a3593e2c8b846be0c29/setarp.sh
chmod +x setarp.sh
Turn off your router and have it connected via NIC to your computer.
My command for example is:
sudo ./setarp.sh 9C:3D:CF:E9:0A:08 192.168.1.1 en7
The script may throw a bunch of errors, you can ignore them.
arp: writing to routing socket: No such process
arp: 192.168.1.1: No such process
# and/or
arp: writing to routing socket: Network is unreachable
Eventually it'll set your arp route, it'll loop and constant re-add your route, this is because sometimes it'll just get dropped, because FU I guess.
When you're finished be sure to CTRL-C the script or it'll run forever.
Turn Off Router
Get the firmware you want to flash. Open a new terminal window or tab.
Latest firmware for the router is hosted on Netgear's site: https://www.netgear.com/support/product/R9000.aspx
wget https://www.downloads.netgear.com/files/GDC/R9000/R9000-V1.0.5.38.zip
unzip R9000-V1.0.5.38.zip
Do not press enter on the put
command, yet.
sudo tftp -v -m binary 192.168.1.1 -c status -c put FILENAME.img
- Hold down the reset button on the back of router with a paper clip.
- Power ON the router while holding down the reset button.
- The power LED should come on 11 times.
- On the 11th time, press the enter key and release the button. If you timed it right, it should start putting the firmware.
At this point it'll appear to hang, this is perfect. Then it should show:
mode set to octet
Connected to 192.168.1.1 (192.168.1.1), port 69
putting R9000-STOCK.img to 192.168.1.1:R9000-STOCK.img [octet]
Sent 42502273 bytes in 38.6 seconds [8811695 bit/s]
Now wait for it to finalize and reboot.
Again, CTRL-C the setarp
script.
You can reset your connection to DHCP now.