Joined: 08 May 2018 Posts: 14242 Location: Texas, USA
Posted: Mon May 21, 2018 19:29 Post subject:
DaveKenroy wrote:
I tried a few different things and one finally worked. Instead of flashing the .chk stock to DD-WRT file, I used the .bin file. After flashing, it rebooted and happily went to the DD-WRT webif with no obvious errors.
This makes me wonder if your newer stock firmware allows the .bin file instead of defaulting to the .chk file. Glad to hear you got it figured out!
If you had read my previous posts, you would have seen I had to use a serial, or TTL to USB, cable to get it to work.
It appears the latest stock firmware has a block on it disallowing any firmware versions that are lower than the currently installed version. See attachment.
The only way I could get it to take (as said in my previous posts) is by booting into the router's CFE and using the command "flash -noheader : flash1.trx" then TFTPing the .bin file from a computer hooked up via Ethernet.
If you aren't comfortable disassembling your router, hooking up a serial cable directly to the board, and using a terminal program such as PuTTY, I would suggest you get a different router that doesn't require you to get into the CFE.
I used the flash command which allowed me to push the firmware, however it now states:
Quote:
Checking crc...Invalid boot block on disk
Device eth0 has been deactivated.
Device eth0: hwaddr B0-39-56-E9-46-58, ipaddr 192.168.1.1, mask 255.255.255.0
gateway not set, nameserver not set
Start TFTP server
UPDATE:
I used the command flash -noheader : flash1.trx instead which gave output of 0 instead of -1 (nlasfh1.trx typo?), though it didn't change the invalid boot block.
I tried a few different things and one finally worked. Instead of flashing the .chk stock to DD-WRT file, I used the .bin file. After flashing, it rebooted and happily went to the DD-WRT webif with no obvious errors.
Thanks for your help Malachi, I definitely wouldn't have been able to figure out the solution without it. Hopefully my endeavors help anyone else that has the same problem.
If at all possible can you please provide a step by step of everything you did to finally get this working as I have not used a router terminal in a very long time and could use somewhat more detailed walk through of the process
I actually got confirmation from Net gear that there was a ""Security Update"" on the more recent firmware to prevent poor clueless users from ""Accidentally"" downgrading to older firmware that might open the router up to ""Security Risks""
I had a very hard time restraining my self from going ballistic over the phone as it is clearly a malicious move on Net gear part and more than likely related to that FCC BS a few years ago regarding modification of Antennas and RF transmitters. Frankly I cant imagine any user ""Accidentally"" downgrading firmware.
Stop the cfe, type tftpd hit, enter and upload the firmware.
If that doesn’t work, stop the cfe and type: flash -noheader : nflash1.trx, hit enter an upload the firmware.
I use tftpd32. _________________ I am far from a guru, I'm barely a novice.
Stop the cfe, type tftpd hit, enter and upload the firmware.
If that doesn’t work, stop the cfe and type: flash -noheader : nflash1.trx, hit enter an upload the firmware.
I use tftpd32.
Posted: Thu Jan 31, 2019 23:49 Post subject: nmrpflash
The method using an ethernet cable and the program nmrpflash worked well for me to flash the firmware of a new R7000 that could not be flashed with the GENIE GUI or TFTP. No need to open the router and connect a serial/usb cable. I have successfully installed Tomato 1.28.0000 -3.5-140 K26ARM USB AIO-64K on this router. The method might work for all NETGEAR routers with the new security update. See other reports:
Switch Router on
Set your IP to static e.g. 192.168.1.2 and router gateway to 192.168.1.1
Switch Router off
Open terminal and run nmrpflash to get the available network interfaces:
# nmrpflash -L
eth0 192.168.1.2 xx:xx:xx:xx:xx:
Run the command (replace eth0 with your network interface ID)
# sudo nmrpflash -i eth0 -a 192.168.1.1 -A 192.168.1.2 -f "yourfirmware.chk"
nmrpflash message: Advertising NMRP server on en5 ... /
Switch Router on:
After a few seconds nmrpflash reports:
Received configuration request from XX:XX:XX:XX:XX:XX.
Sending configuration: 192.168.1.1, netmask 255.255.255.0.
192.168.1.1 (192.168.1.1) deleted
Timeout while waiting for TFTP_UL_REQ.
192.168.1.1 (192.168.1.1) deleted
Issue the command again directly after nmrpflash was terminated (copy paste).
# sudo nmrpflash -i eth0 -a 192.168.1.1 -A 192.168.1.2 -f "yourfirmware.chk"
Advertising NMRP server on en5 ... |
Received TFTP_UL_REQ while waiting for CONF_REQ!
Received upload request without filename.
Uploading tomato-R7000-1.28.AT-ARM-3.5-140-initial-64K.chk ... OK
Waiting for remote to respond.
Received keep-alive request.
Remote finished. Closing connection.
Reboot your device now.
After rebooting I could flash the AIO firmware using the GUI of Tomato. Increasing the timeout may solve the error “Timeout while waiting for TFTP_UL_REQ”. However, I did not test it.
I couldn't get that tool to work: I received a "can only proxy" error message. However, I found a patch to OpenWRT on https://bugs.openwrt.org/index.php?do=details&task_id=2009. I built OpenWRT with that patch and it worked! I was then able to flash DD-WRT from OpenWRT's Web UI.
I couldn't get that tool to work: I received a "can only proxy" error message. However, I found a patch to OpenWRT on https://bugs.openwrt.org/index.php?do=details&task_id=2009. I built OpenWRT with that patch and it worked! I was then able to flash DD-WRT from OpenWRT's Web UI.
I can confirm that this approach works. I had a brand new R8000, and confirmed not the R8000P. I then tried everything to flash it. Web interface, various hard and soft resets, using the Tomato advanced image from further up this thread, trying the factory to dd-wrt image in the router database on dd-wrt, using the K3 image from http://www.desipro.de/ddwrt/K3-AC-Arm/dd-wrt.K3_R8000.chk. Nothing worked until I tried to load a custom compiled OpenWRT and then load the dd-wrt.K3_R8000.chk using the OpenWRT web interface.
The steps to get here were as follows (for me on a MacBook Pro.)
5) Now we need to get the source code, but we specifically need the one modified by wilson556 as his patch hasn't made it back into OpenWRT's main trunk (looks like they want him to offer an Author callout to the original poster of the technique.)
Code:
cd /Volumes/OpenWrt && git clone https://github.com/willson556/openwrt.git && cd openwrt
6) Prepare to build a copy of OpenWRT for the R8000
Code:
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
* If you have any problems here you will need to resolve the underlying issue. I'd mostly think you'd see missing dependencies or things not in the right path.
->Target System->Broadcom BCM47xx/53xx (ARM)
->Target Profile->NetGear R8000
Save & Exit
7) Build OpenWRT
Code:
make
At this point I had actually broken my router partially and couldn't get into the web interface. So I don't know if loading the firmware with the web based Firmware Update would work. I'd give it a try first. The file you want to flash is ./bin/targets/bcm53xx/generic/openwrt-bcm53xx-netgear-r8000-squashfs.chk If the web interface flash works skip 9-10 and move on to 11
9) If the web interface isn't working you can use nmrpflash to load your firmware on the device. You will need to start by grabbing the source code from https://github.com/jclehner/nmrpflash.git and then running
Code:
make && sudo make install
10) Now give your network interface on your local machine that is connecting to the router a configuration of IP: 192.168.1.2 Netmask: 255.255.255.0 Gateway: 192.168.1.1, then make sure the router is powered on. Use nrmpflash -L and you will get a list of interfaces. Find the one with 192.168.1.2. Note the name of the interface. Now power off the router and run the following with your interface name substituted for eth0
Code:
sudo nmrpflash -i eth0 -a 192.168.1.1 -A 192.168.1.2 -f./bin/targets/bcm53xx/generic/openwrt-bcm53xx-netgear-r8000-squashfs.chk
and turn on the router. If this command exits without you seeing
Code:
Uploading openwrt-bcm53xx-netgear-r8000-squashfs.chk ... OK
run it again immediately. I sometimes had to run this command many times, and/or power off and on my router and try a few more times to get it going. When it succeeds you'll see something like
Code:
Advertising NMRP server on en8 ... |
Received TFTP_UL_REQ while waiting for CONF_REQ!
Received upload request without filename.
Uploading openwrt-bcm53xx-netgear-r8000-squashfs.chk ... OK
Waiting for remote to respond.
Received keep-alive request.
Received keep-alive request.
Received keep-alive request.
Received keep-alive request.
Received keep-alive request.
Received keep-alive request.
Received keep-alive request.
Remote finished. Closing connection.
Reboot your device now.
11) At that point power cycle the router. When the device comes back up only the Power and 1 lights will be on with the Power light solid white. The resulting OpenWRT won't have a web interface just yet. We'll now need to give it one as follows
12) ssh into the router with
There is no password so you'll go right in.
13) Plug a network cable from your existing router/cable modem/etc that provides DHCP address leases into the WAN port and use ifconfig to check until you see one of the ports pick up a DHCP address. You can do that with
Code:
ifconfig
14) Assuming you get an IP and can get to the internet (
Code:
ping 8.8.8.8
from the ssh prompt will tell you) at this point we need to install and enable the web interface
PLEASE NOTE: As is probably obvious to the old timers here I am a complete newb to compiling custom OpenWRT firmware. I guessed and experimented my way through the above. Your mileage may vary greatly. I happened to have a USB-TTL cable sitting around from long ago so I was willing to take pretty big risks because I could always recover the device even with a bad firmware build flashed to it. I can't be responsible if the above bricks your device. I can only say it worked perfectly for me. I can also say that the nmrpflash methodology actually rescued me from at least one bad build I flashed as I was able to get the Netgear stock firmware back on the device and start over.
There is probably a way to have LuCi web interface enabled on the device when it first boots OpenWRT by tweaking the build config. I don't know. Someone else can speak to that.
Hope the above helps the other people who don't knww where to start with implementing willson556's approach.
Posted: Fri Mar 15, 2019 10:50 Post subject: Building OpenWRT
Hats off to shaithus. Thank you very much for your detailed instructions for building OpenWRT.
This week I bought a Netgear R8000 and wanted to flash AdvancedTomato but ran into the issue documented in this thread.
My son has an old laptop that I had recently installed a stock install of Ubuntu 18.10 desktop on. I used this laptop to build OpenWRT. As shaithus said, the biggest issue with building from source is the missing dependencies. I had to install gcc, g++, gawk, ncurses, python and several libraries to be able to build. If you're a linux guy or girl, you'll need to know how to use your package manager to install all the tools needed. You also need to know how to manually configure networking to set up the static interface.
The build took hours on my old laptop. Fortunately my R8000 was still working and was able to successfully flash the OpenWRT image I just built. So I skipped steps 9 & 10.
Here's were things changed slightly from shaithus' experience. I was able to ssh into the router and confirm it obtained an IP address via DHCP from my other working router. Pinging the Google DNS server worked BUT I only let it run for 4-5 packets before killing it and continuing with the instructions. When I ran the first opkg command it would timeout retrieving the packages. I ran the ping command again and found it would run for about 8 packets and then timeout. Very consistently. I rebooted the router and tried again several times with the same result.
At this point I tried to use nmrpflash to flash the main Tomato image but that would also timeout. So now I'm stuck. I live in the US and use Verizon Fios for internet. It uses a device called an ONT (Optical Network Terminal) to convert the fiber signal to ethernet, phone, video. I plugged the WAN interface of the R8000 directly into the ONT and was able to maintain an internet connection. I proceeded with the remainder of steps 14 and 15 and had a workable system. For step 16 I flashed AdvancedTomato and everything worked fine.
Now that I've played around with tomato and read the doc for dd-wrt, I may flash it with dd-wrt so I can compare the two.
Posted: Tue Mar 19, 2019 4:02 Post subject: Building OpenWRT with Ubuntu VM
Thanks to all, particularly willson556, shaithus and rwrjr.
I have an R8000 (NOT R8000P) that I bought many years ago close to when it launched, but I regularly kept it updated with the latest Netgear firmware and ran into this issue when I finally decided that dd-wrt would probably be better. I built OpenWRT as suggested by shaithus but using an Ubuntu 18.04.2 x64 machine.
For this you could:
Download the ISO from Ubuntu and install it in a physical machine or a hypervisor, e.g. VMWare Workstation Player or VirtualBox (both are free and VM set up is very easy).
Or use the cheapest DigitalOcean droplet or Amazon AWS or Google Cloud or any other VPS provider.
The steps I took:
If you are root, add a non-root user and switch to it, otherwise this block can be skipped. This is needed because build config scripts will refuse configuring for root. Replace <username> with your desired name:
Code:
$ adduser <username>
You can skip adding any info here; just leave it all blank. Then:
Note: I didn't check whether all of the above are necessary, I just winged it... all I know is that it worked for me, and I didn't care about storage space or installing junk since I was just using a quick droplet machine that cost a few cents. The next steps are what shaithus did (added shell markers with $ and a few extra instructions, otherwise these are direct quotes):
Code:
$ git clone https://github.com/willson556/openwrt.git && cd openwrt
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
$ make menuconfig
Right/Left arrows to select Save
Enter to save as the default filename ".config", and Exit
Right/Left arrows to select Exit
Code:
$ make
This took 1 hour 59 minutes in the cheapest DigitalOcean single core droplet which reported running on an old Sandy Bridge Xeon. As opposed to shaithus, I didn't have to mess with any fs image that needed to be mounted.
I flashed the file in ./bin/targets/bcm53xx/generic/openwrt-bcm53xx-netgear-r8000-squashfs.chk using the regular Netgear Genie web interface. The router rebooted, so I ssh'hd into it:
And connected it to my existing router (coincidentally, it's an R8000P), got an IP from it, and then tried:
Code:
$ ping 8.8.8.8
At this point, just like rwrjr noted, it would send 7 or 8 packets successfully, all with a few ms of RTT, but the 8th would take much, much longer. Then 7 packets would be sent in rapid succession and the 8th would take much longer and so on. I'm not sure if it was some kind of ip conflict or something, since both routers were using the same subnet with the same IP. I have no networking experience whatsoever so I'm just speculating, but I disregarded it and just connected it directly to my cable modem as rwrjr said. Although this isn't a fiber connection through an ONT, I had the same issue and rwrjr's solution worked flawlessly.
Anyways, if you use a non-linux or unix or Mac OS machine and want to build willson556's OpenWRT patch for this, I recommend using an Ubuntu 18.04 VM. Easy, free and fast to set up.