ADAM2_DEFRAG
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
ADAM2_DEFRAG
This toolkit has been created to help owners of Adam2-based AR7 routers to defragment the adam2 environment. It is designed for versions of RouterTech firmware lower than version 2.91. This functionality is built into RouterTech firmwares from v2.91 onwards. Do NOT attempt to use this toolkit if your router has the PSP bootloader.
The Problem:
The adam2 bootloader is seriously broken. Manufacturers of AR7 routers have long abandoned it, in favour of the PSP bootloader. One big problem of Adam2 routers is fragmentation of the router's environment. In our experience, ALL routers with the Adam2 bootloader suffer from this to some extent. A little fragmentation is not a problem. However, in many routers (particularly DLink), the environment is very badly fragmented, leading to all sorts of problems. A typical problem is the inability to upgrade the firmware from the router's web interface. But there are also all sorts of other random problems, some of which are very serious, and impact on the router's reliability. The PSP bootloader has the ability to defragment itself when necessary. Adam2's attempts to do the same normally results in a trashed environment and, often, a "bricked" router.
The Solution:
The solution to fragmentation is to defragment. Windows PC users are accustomed to this, and recent versions of Windows have a built in facility to do this. With AR7 routers, the best way to defragment the environment is to connect directly to the bootloader's command prompt via a serial console cable, and to run the "fixenv" or "defragenv" command (for the Adam2 and PSP bootloaders respectively), and then boot up the router normally. However, serial console cables are hard to construct, and not everyone has the necessary technical know-how. If you are such a person, then you are stuck with a malfunctioning router that will eventually give up the ghost.
Enter adam2_defrag:
This is where adam2_defrag comes in, like a knight in shining armour, charging on a magnificent horse. This is a toolkit for defragmenting the environments of Adam2-based AR7 routers. Like the equivalents in the supporting RouterTech firmwares, it should only be used as a last resort (i.e., when all else has failed, and you have no other option). Using a toolkit like this is an act of desperation. If you are not desperate, then do not use it. If you are not prepared to take the risk of bricking your router, then do not use it. As with any other low level operation, there is always a risk of something going wrong.
IF you do decide to take the plunge and to use this toolkit, it is relatively simple to use - just follow these instructions (running the commands in blue):
1) Login to the router via telnet (telnet 192.168.1.1 [ supply username and password for telnet login ])
2) cd /var
3) wget "defrag/rt_defrag_tools.tar"
4) tar -xf ./rt_defrag_tools.tar
5) ./adam2-defrag (follow the prompts, and NOTE all warnings)
With any luck, the router's environment (if fragmented) will be defragmented.
Notes:
1. Please be sure to first read all the documentation, especially the DISCLAIMERS before downloading or attempting to use this toolkit.
2. If you have RouterTech firmware v2.91 (or higher), then do NOT attempt to use this toolkit. The functionality is built in.
3. This utility is written for earlier versions of RouterTech firmwares. If your firmware is not by RouterTech, then you are on your own if you try to use it.
Downloads:
Current release:
1. The adam2_defrag toolkit v1.7 (9 September 2010).
2. Documentation (read it first!).
Older (obsolete) releases:
1. The adam2_defrag toolkit v1.0 (24 September 2009).
2. The adam2_defrag toolkit v1.1 (13 February 2010).
3. The adam2_defrag toolkit v1.3 (18 February 2010).
4. The adam2_defrag toolkit v1.5 (14 June 2010).
5. The adam2_defrag toolkit v1.6 (18 July 2010).
Please report all successes (or failures!) in this thread.
The Problem:
The adam2 bootloader is seriously broken. Manufacturers of AR7 routers have long abandoned it, in favour of the PSP bootloader. One big problem of Adam2 routers is fragmentation of the router's environment. In our experience, ALL routers with the Adam2 bootloader suffer from this to some extent. A little fragmentation is not a problem. However, in many routers (particularly DLink), the environment is very badly fragmented, leading to all sorts of problems. A typical problem is the inability to upgrade the firmware from the router's web interface. But there are also all sorts of other random problems, some of which are very serious, and impact on the router's reliability. The PSP bootloader has the ability to defragment itself when necessary. Adam2's attempts to do the same normally results in a trashed environment and, often, a "bricked" router.
The Solution:
The solution to fragmentation is to defragment. Windows PC users are accustomed to this, and recent versions of Windows have a built in facility to do this. With AR7 routers, the best way to defragment the environment is to connect directly to the bootloader's command prompt via a serial console cable, and to run the "fixenv" or "defragenv" command (for the Adam2 and PSP bootloaders respectively), and then boot up the router normally. However, serial console cables are hard to construct, and not everyone has the necessary technical know-how. If you are such a person, then you are stuck with a malfunctioning router that will eventually give up the ghost.
Enter adam2_defrag:
This is where adam2_defrag comes in, like a knight in shining armour, charging on a magnificent horse. This is a toolkit for defragmenting the environments of Adam2-based AR7 routers. Like the equivalents in the supporting RouterTech firmwares, it should only be used as a last resort (i.e., when all else has failed, and you have no other option). Using a toolkit like this is an act of desperation. If you are not desperate, then do not use it. If you are not prepared to take the risk of bricking your router, then do not use it. As with any other low level operation, there is always a risk of something going wrong.
IF you do decide to take the plunge and to use this toolkit, it is relatively simple to use - just follow these instructions (running the commands in blue):
1) Login to the router via telnet (telnet 192.168.1.1 [ supply username and password for telnet login ])
2) cd /var
3) wget "defrag/rt_defrag_tools.tar"
4) tar -xf ./rt_defrag_tools.tar
5) ./adam2-defrag (follow the prompts, and NOTE all warnings)
With any luck, the router's environment (if fragmented) will be defragmented.
Notes:
1. Please be sure to first read all the documentation, especially the DISCLAIMERS before downloading or attempting to use this toolkit.
2. If you have RouterTech firmware v2.91 (or higher), then do NOT attempt to use this toolkit. The functionality is built in.
3. This utility is written for earlier versions of RouterTech firmwares. If your firmware is not by RouterTech, then you are on your own if you try to use it.
Downloads:
Current release:
1. The adam2_defrag toolkit v1.7 (9 September 2010).
2. Documentation (read it first!).
Older (obsolete) releases:
1. The adam2_defrag toolkit v1.0 (24 September 2009).
2. The adam2_defrag toolkit v1.1 (13 February 2010).
3. The adam2_defrag toolkit v1.3 (18 February 2010).
4. The adam2_defrag toolkit v1.5 (14 June 2010).
5. The adam2_defrag toolkit v1.6 (18 July 2010).
Please report all successes (or failures!) in this thread.
-
- Newbie
- Posts: 5
- Joined: Wed Sep 16, 2009 10:47 am
Re: ADAM2_DEFRAG
Dear thechief,
I successfully used adam2_defrag on a dlink g604t with firmware routertech version 2.8 and on a dlink 504t with firmware ... v.3 dlink
I must say that your "shining knight" is really powerful, another good job!
"Successfully" for me means that after the use of adam2-defrag, the procedure of updating the firmware through web gui procedure on both routers worked smoothly.
I successfully used adam2_defrag on a dlink g604t with firmware routertech version 2.8 and on a dlink 504t with firmware ... v.3 dlink
I must say that your "shining knight" is really powerful, another good job!
"Successfully" for me means that after the use of adam2-defrag, the procedure of updating the firmware through web gui procedure on both routers worked smoothly.
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: ADAM2_DEFRAG
Thanks for the report.
I'm not surprised that it works on Dlink firmware. We have tried to make it as self-contained (i.e., not dependent on RT firmware features) as possible. It is good to know that we have succeeded (at least, as far as Dlink v3 is concerned ).robertocatenacci wrote:I successfully used adam2_defrag on a dlink g604t with firmware routertech version 2.8 and on a dlink 504t with firmware ... v.3 dlink
Thanks. This was a very challenging problem to overcome, but we got there in the end ...robertocatenacci wrote:I must say that your "shining knight" is really powerful, another good job!
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
Re: ADAM2_DEFRAG
Update stucks, the same framework retains after update.
After running defrag in commnads the update works like magic.
Thanks!!!!!!!!!!!!!
Amir
After running defrag in commnads the update works like magic.
Thanks!!!!!!!!!!!!!
Amir
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: ADAM2_DEFRAG
Excellent!
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: ADAM2_DEFRAG
Please note that this tool has now been updated (see the first post in the thread).
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
Re: ADAM2_DEFRAG
Defragmented successfully on a D-Link G604T with RouterTech 2.8, it worked like a charm.
Before: fragmentation level: 33 (79 records).
After: no fragmentation.
Before: fragmentation level: 33 (79 records).
After: no fragmentation.
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: ADAM2_DEFRAG
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
-
- Novice
- Posts: 34
- Joined: Sat Apr 19, 2008 9:27 am
Re: ADAM2_DEFRAG
From my modem I get:
/var # ping https://www.routertech.org
ping: https://www.routertech.org: Unknown host
/var # wget "defrag/rt_defrag_tools.tar"
wget: https://www.routertech.org: Unknown host
/var # wget "http://95.172.240.105/defrag/rt_defrag_tools.tar"
wget: Unable to connect to remote host (95.172.240.105): Network is unreachable
/var #
From my pc:
Pinging https://www.routertech.org [95.172.240.105] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Strange since I can post this message ;-(
/var # ping https://www.routertech.org
ping: https://www.routertech.org: Unknown host
/var # wget "defrag/rt_defrag_tools.tar"
wget: https://www.routertech.org: Unknown host
/var # wget "http://95.172.240.105/defrag/rt_defrag_tools.tar"
wget: Unable to connect to remote host (95.172.240.105): Network is unreachable
/var #
From my pc:
Pinging https://www.routertech.org [95.172.240.105] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Strange since I can post this message ;-(
-
- Novice
- Posts: 34
- Joined: Sat Apr 19, 2008 9:27 am
Re: ADAM2_DEFRAG
Got it need to setup the gateway on the router
Re: ADAM2_DEFRAG
i had this error
Code: Select all
There was a problem (reported as: "Error opening env script file: /var/env.txt")
. Aborting ....
Re: ADAM2_DEFRAG
After storing the G624T in the cabinet for a few years, I tried updating to the newest firmware 2.94 (from 2.60)
Tried both RRT and WebInterface but the router's info displayed the same version (2.60).
While searching I found the Defrag Tools. Everything worked luck a charm, updated the firmware via Web Interface
after executing the tools commands. (edit: Fragmentation was 49/49 ! )
Thanx again for your continuing support!
Tried both RRT and WebInterface but the router's info displayed the same version (2.60).
While searching I found the Defrag Tools. Everything worked luck a charm, updated the firmware via Web Interface
after executing the tools commands. (edit: Fragmentation was 49/49 ! )
Thanx again for your continuing support!
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: ADAM2_DEFRAG
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
-
- Newbie
- Posts: 3
- Joined: Mon May 23, 2011 7:12 pm
Re: ADAM2_DEFRAG
Is it mean the router's environment (if fragmented) will be defragmented when i'll run firmware?? Or i need choose some operations???thechief wrote: Notes:
2. If you have RouterTech firmware v2.91 (or higher), then do NOT attempt to use this toolkit. The functionality is built in.
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: ADAM2_DEFRAG
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.