firmware not upgrading Buffalo whr-g300n v2

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Goto page 1, 2, 3  Next
Author Message
lch503
DD-WRT Novice


Joined: 13 Aug 2012
Posts: 20

PostPosted: Thu Sep 14, 2017 11:52    Post subject: firmware not upgrading Buffalo whr-g300n v2 Reply with quote
Hello,

I have been running dd-wrt on two separate Buffalo whr-g300n v2 for a couple of years in order to run hotspotsystem software.

Both run build 21676.

However, the build has not always been completely stable therefore I have been waiting for a suitable firmware replacement. Builds later than this seemed to have an issue whereby a WAN address could not be obtained therefore I downgraded back.

Recently I have tried again, but when I try a firmware upgrade, the firmware upgrade is said to be successful, however the build never does, and stays at 21676 after the router reboots. Note that this is through the admin user interface.

I have also attempted with tftp but with no success yet. I have seen guides but I would like to double check I am doing this correct (using Windows):

Reset the router to factory defaults
connect to router via lan port
set a static ip on the interface compatible with router factory defaults - 192.168.1.100, subnet 255.255.255.0 - still auto dns
set retries in tftp2 to > 10 - do I reboot router at this point or wait until it has completely booted?
set tftp2 ip to 192.168.1.1
press start / connect

If I am doing something wrong or if anyone has any suggestions it would be greatly appreciated.

Thanks,

Leon
Sponsor
lch503
DD-WRT Novice


Joined: 13 Aug 2012
Posts: 20

PostPosted: Thu Sep 14, 2017 14:55    Post subject: Update Reply with quote
Hello,

Using telnet I have managed to update to build 32170 so far, the newest builds are giving the following errors when the "write firmware.bin linux" is performed:

function stop_snmp not found
function stop_olsrd not found
function stop_openvpn not found
function stop_openvpnserver not found
function stop_freeradius not found
Image too big for partition: linux
linux: Invalid argument

I am going to continually update and report which firmware is the latest I can update to.

Leon
lch503
DD-WRT Novice


Joined: 13 Aug 2012
Posts: 20

PostPosted: Thu Sep 14, 2017 15:22    Post subject: update Reply with quote
The newest firmware without receiving the above error and the update not being performed is 32597 from 07/08/17.

Thanks,

Leon
khoanb1
DD-WRT Novice


Joined: 03 Sep 2017
Posts: 13

PostPosted: Sat Sep 16, 2017 7:56    Post subject: same error Reply with quote
Hi I have the same error with you, still exist at 7/8/2017 firmware.

Maybe we need to remove these stop commands from the update script
lch503
DD-WRT Novice


Joined: 13 Aug 2012
Posts: 20

PostPosted: Sat Sep 16, 2017 10:11    Post subject: Reply with quote
I have found that the 01 Jun 17 firmware is the newest whereby I can telnet into the router, download and install the firmware without any error. (and the hotspot still works as expected).
To be honest I am quite happy with the firmware for now, much better than running one from 4 years ago.
I am now getting myself into firewall rules at the moment. Wish me luck!
khoanb1
DD-WRT Novice


Joined: 03 Sep 2017
Posts: 13

PostPosted: Sat Sep 16, 2017 10:42    Post subject: Reply with quote
lch503 wrote:
I have found that the 01 Jun 17 firmware is the newest whereby I can telnet into the router, download and install the firmware without any error. (and the hotspot still works as expected).
To be honest I am quite happy with the firmware for now, much better than running one from 4 years ago.
I am now getting myself into firewall rules at the moment. Wish me luck!


The reason of failed upgrading firmware you can see in telnet session:

root@DD-WRT:/tmp# write whr-g300nv2-firmware-MULTI.bin linux
function stop_snmp not found
function stop_olsrd not found
function stop_openvpn not found
function stop_openvpnserver not found
function stop_freeradius not found
Image too big for partition: linux
linux: Invalid argument

It's because the very first firmware (buffalo-to-dd-wrt_webflash-MULTI.bin) you choose to upgrade from stock Buffalo firmware to dd-wrt has formatted linux partition with so small size and it was not enough for firmwares from July until now

root@DD-WRT:/tmp# cat /proc/mtd
dev: size erasesize name
mtd0: 00040000 00010000 "RedBoot"
mtd1: 003a0000 00010000 "linux"
mtd2: 002d8000 00010000 "rootfs"
mtd3: ffffffffffff0000 00010000 "ddwrt"
mtd4: 00010000 00010000 "nvram"
mtd5: 00010000 00010000 "board_config"
mtd6: 00400000 00010000 "fullflash"
mtd7: 00040000 00010000 "fullboot"
mtd8: 00010000 00010000 "uboot-env"

Solution: go back to stock g300n firmware and after that go back to dd-wrt with latest buffalo-to-dd-wrt_webflash-MULTI.bin file (r33345) so that we will have new partitions stucture
lch503
DD-WRT Novice


Joined: 13 Aug 2012
Posts: 20

PostPosted: Sat Sep 16, 2017 12:12    Post subject: Reply with quote
Quote:

Solution: go back to stock g300n firmware and after that go back to dd-wrt with latest buffalo-to-dd-wrt_webflash-MULTI.bin file (r33345) so that we will have new partitions stucture


Thanks for the info. At least now we know how to upgrade in the future.
dilbert123
DD-WRT Novice


Joined: 23 Oct 2017
Posts: 3

PostPosted: Mon Oct 23, 2017 17:29    Post subject: Reply with quote
Hi,
I've encountered the same problem and the proposed solution provided by khoanb1 doesn't seem to work.

I've tried to flash multiple new builds and the newest one I got to work was r32597. The newest that I've tried is r33555.

I've tried flashing from DD-WRT web GUI and also by downgrading back to Buffalo firmware (v1.85) and then using Buffalo Web GUI:
- DD-WRT doesn't give any errors, but instead just doesn't flash the new image.
- Buffalo Web GUI immediately tells that the image is too large.

I believe the new images seem to be just a bit too large. As khoanb1 pointed out the 'linux'-partition size is 003a0000 ie. 3801088 bytes. For example the newest image (r33555) is 3862556 bytes, which is slightly too large.

Are there any workarounds to reduce the image size or somehow increase the 'linux'-partition size?
ohoevde
DD-WRT Novice


Joined: 30 Oct 2017
Posts: 1

PostPosted: Tue Oct 31, 2017 21:39    Post subject: Reply with quote
Hi.
I have the same problem.
did anyone find a workaround yet?
lacruz
DD-WRT Novice


Joined: 03 Dec 2006
Posts: 7

PostPosted: Sun Nov 19, 2017 10:57    Post subject: Reply with quote
Any solution yet?
khoanb1
DD-WRT Novice


Joined: 03 Sep 2017
Posts: 13

PostPosted: Sun Nov 26, 2017 2:31    Post subject: worked on TL-WR741ND Reply with quote
Hi all,

I had the same problem with my TP-LINK TL-WR741ND and resolved it by reverting to stock firmware after that tried to flash newest firmware.

So I think we can do that with this Buffalo device, but there is a small difference that we don't know what is it at this time
dilbert123
DD-WRT Novice


Joined: 23 Oct 2017
Posts: 3

PostPosted: Sun Nov 26, 2017 23:28    Post subject: Reply with quote
Hi khoanb1,
I've tried going back to Buffalo firmware and then tried to flash the newest dd-wrt from there, but it doesn't work. It just says that the image is too big. Check my post above for more details.

There were some posts in this forum regarding to fixing similar problems by flashing it from telnet: https://www.dd-wrt.com/phpBB2/viewtopic.php?t=311642

It looks doable, but I have no idea if this is basically the same problem or not, so I haven't tried it in fear of bricking the device. Has anybody tried that or has any other info regarding to that approach with this device?
dilbert123
DD-WRT Novice


Joined: 23 Oct 2017
Posts: 3

PostPosted: Tue Nov 28, 2017 23:08    Post subject: Reply with quote
Hi,
I took a look at the instructions in here https://www.dd-wrt.com/phpBB2/viewtopic.php?t=311642, but it says there that 'factory-to-ddwrt.bin' should be used. In case of Tplink-routers the factory-to-ddwrt.bin seems to be a "raw" image compared to tl-[model]-webflash.bin which contais a header beginning with magic 'HDR0' and with size of 28 bytes.
See here:

00000000 48 44 52 30 1c 00 3c 00 88 79 84 78 01 00 01 00 |HDR0..<..y.x....|
00000010 1c 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 |................|
00000020 44 44 2d 57 52 54 00 00 00 00 00 00 00 00 00 00 |DD-WRT..........|

Now in case of Buffalo WHR-G300Nv2 the 'buffalo-to-dd-wrt_webflash-MULTI.bin' contains some kind of encrypted firmware to be used with Buffalo stock firmware. I presume that can't be used. So what is left is 'whr-g300nv2-firmware-MULTI.bin'. This contains the same header as the Tplink-images (beginning with 'HDR0', 28 bytes long) and then the image itself (starting with magic 27 05 19 56):
00000000 48 44 52 30 1c 00 3a 00 a8 ae c3 82 01 00 01 00 |HDR0..:.........|
00000010 1c 00 00 00 00 00 00 00 00 00 00 00 27 05 19 56 |............'..V|
00000020 43 6f 46 b9 59 60 33 b0 00 0d 7c ea 80 06 00 00 |CoF.Y`3...|.....|

Now my question is:
Will it work if I remove the header (ie. remove the first 28 bytes) and create a new image for fullflash with following layout (as in the instructions in the other thread):
[boot] (this is 262144 bytes long)
[whr-g300nv2-firmware-MULTI.bin WITHOUT the first 28 bytes] (this is 3866652 bytes long)

TOTAL: 262144 + 3866652 = 4128796
Full flash size is 4MB (ie. 4194304 bytes), so it should fit there. Is there something else than boot + linux partition that needs to be considered here?

And if all this works out is the "linux" partition resized to fit these new bigger firmwares or do I have to flash it like this in the future too?

Hopefully someone could confirm that this approach is feasible, so I could try it!

Best regards
ian5142
DD-WRT Guru


Joined: 23 Oct 2013
Posts: 2033
Location: Canada

PostPosted: Wed Nov 29, 2017 4:36    Post subject: Stripping a build Reply with quote
First of all, no you can not easily cut a build down to make it fit on the router's flash.

The best thing you can do is create a ticket on the SVN to let Brainslayer know about the problem. We had this issue with the Linksys 160N v3 for about 6 months I think before it was fixed.

Don't expect it to happen over night. Also, in order for Brainslayer to make it fit some features that the router currently has may have to be excluded (VPN, Hotspot, etc). Some of those features may have already been excluded.

I would not suggest what you are attempting to do, you will most likely end up with a brick.

_________________
Before asking a question on the forums, update dd-wrt: Where do I download firmware? I suggest reading it all.

Some dd-wrt wiki pages are up to date, others are not. PM me if you find an old one, I am trying to update them.

Atheros:
TP-Link Archer C7 v2 x2 - WDS AP, WDS Station
TP-Link TL-WDR3600 v1 - WDS Station
TP-Link 841nd v8 - WDS Station
Linksys WRT400N - bricked
D-Link 615 C1 x 4 - not used
D-Link 615 E3 x 2 - not used
D-Link 825 B1 - WDS Station
D-Link 862L A1 x2 - WDS Station
Netgear WNDR3700v2 - WDS Station
TP-Link 1043nd v1, inactive, unstable hardware
UBNT loco M2 x2 - airOS

Broadcom
Asus N66U - backup Gateway
Netgear r6300 v1 - AP
Linksys E2500 - not used
Linksys EA2700 - not used
Linksys 160N v3 x2 - not used
Netgear WNDR3700v3 - not used
MediaTek
UBNT EdgeRouter X - Gateway, DHCP, QoS
rotarum
DD-WRT Novice


Joined: 06 Mar 2007
Posts: 18

PostPosted: Sat Dec 02, 2017 16:44    Post subject: Re: Stripping a build Reply with quote
ian5142 wrote:
First of all, no you can not easily cut a build down to make it fit on the router's flash.

The best thing you can do is create a ticket on the SVN to let Brainslayer know about the problem. We had this issue with the Linksys 160N v3 for about 6 months I think before it was fixed.

Don't expect it to happen over night. Also, in order for Brainslayer to make it fit some features that the router currently has may have to be excluded (VPN, Hotspot, etc). Some of those features may have already been excluded.

I would not suggest what you are attempting to do, you will most likely end up with a brick.


Did anyone create a ticket to the SVN yet ?

On my Buffalo WHR HP-G300n the update is also failing .
Goto page 1, 2, 3  Next Display posts from previous:    Page 1 of 3
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum