- Asuswrt: The stock firmware for ASUS Routers.
- Asuswrt-Merlin: The internationally renowned 3rd-party firmware for ASUS Routers.
CAVEAT: NO COMPLIANCE FOR OTHER FIRMWARE GUARANTEED.
- Make sure your username and password which are used to log into the web GUI contain ONLY characters within the range of underline, numbers and lower-case and upper-case letters.
LEGEND
- White characters with purple background: notice of stage.
- White characters with green background: notice of success.
- White characters with red background: notice of failure.
- The line above the notice of failure will show the name of script which runs into error and relevant details.
-
Insert a USB flash drive (not less than 4GB; MBR) with no files into a USB port of the Router.
-
Login the router with ssh client.
-
Execute the code below.
cd /tmp && wget -q -O /tmp/install_online --no-check-certificate "https://raw.githubusercontent.com/JACK-THINK/SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER/master/script_bootloader/bin/install_online" && chmod 777 /tmp/install_online && /tmp/install_online
-
Read the WARNING, and input
YES
to continue the installation. -
Demonstration of the installation process:
-
Re-partition and format the USB flash drive.
-
Download files for installation.
-
Create log of installation.
-
STAGE 1: Set boot parameters.
-
STAGE 2: Install the requisite components.
-
Input and confirm the size of swap (512M is adopted in this example), and then install and enable component swap.
-
Install and enable component entware.
-
Install and enable component timezone.
-
Install and enable component dependency.
It's OK even if some caveats show up on the screen.
-
Install and enable component monit.
-
Install and enable component dnsmasq.d.
-
Install component fwd.
-
STAGE 2 completed
-
-
STAGE 3: Install the optional components (the add-ons).
-
Input and confirm your username and password which are used to log into the web GUI. (This is only executed when you first run
addons_install
) -
Input the index number of the favored add-on according to the menu.
-
When the previous add-on has been installed successfully, install the next add-on.
-
Input
0
to exit the installation and reboot the router after all the favored add-ons are installed.
-
-
NOTICE
- In all the instances of
SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER-16.0-16.0
below, the version part16.0-16.0
can vary when the system gets updates. Please replace it with the latest version number. Plus, you can auto-complete this part by hitting key <Tab>.
-
Insert a USB flash drive (not less than 4GB; MBR) with no files into a USB port of the Router.
-
Login the router with ssh client.
-
Download the latest installation package from Github and upload it to
/tmp/home/root
of the router. -
Execute the code below to unzip the installation package.
cd /tmp/home/root tar -xzvf SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER-16.0-16.0.tar.gz rm -f SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER-16.0-16.0.tar.gz
-
Execute the code below to move the files and change their rights.
mv SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER-16.0-16.0/script_bootloader ./ rm -rf SCRIPTS-BOOTLOADER-FOR-ASUS-ROUTER-16.0-16.0 chmod -R 777 script_bootloader cp script_bootloader/bin/prerequisite_checker /tmp cp script_bootloader/bin/drive_modifier /tmp cd /tmp
-
Execute the code below to check the environment. Everything goes well if the output is nothing.
/tmp/prerequisite_checker
-
Execute the code below to re-partition and format the USB flash drive.
/tmp/drive_modifier
-
Execute the code below to move the files.
mv /tmp/home/root/script_bootloader /tmp/mnt/ASUS_ROUTER
-
Execute the code below to start installation.
/tmp/mnt/ASUS_ROUTER/script_bootloader/bin/install
-
(Optional) If command
tee
doesn't exist in the firmware, installation will come to an end after outputing***** STAGE 3: INSTALL ADDONS *****
. Execute the code below to install add-ons.
/tmp/mnt/ASUS_ROUTER/script_bootloader/bin/addons_install
- Execute the code below to reboot the router after all the favored add-ons are installed.
/tmp/sbl_restart_router
Modify the source files of the target add-on according to the README_en-US.md in its own directory in /opt/script_bootloader/usr/
.
NOTICE
LF
needs to be set in Windows before you edit the source files. Otherwise the files will be damaged.- NO extra setting is required in Linux before you edit the source files.
Add-on Management system is composed of 2 parts below.
Add-on Management system Type of add-ons Instruction list_of_user_custom_scripts Add-ons which run at startup with no surveillance required Read the instruction below. Monit All add-ons except the type listed above Click to read
-
Login the router with ssh client.
-
Execute the code below to edit list_of_user_custom_scripts.
vim /opt/script_bootloader/bin/list_of_user_custom_scripts
-
Enable/Disable the target add-ons.
- Enable add-ons: Remove the
#
at the start of the path to target add-ons. - Disableadd-ons: Insert a
#
at the start of the path to target add-ons.
- Enable add-ons: Remove the
-
Save and exit.
<ESC>→<:>→<w>→<q>→<Enter>
-
Execute the code below to reboot the router and all the favored add-ons will boot along with the router.
cd /tmp && /tmp/sbl_restart_router
-
Login the router with ssh client.
-
Execute the code below to update the system.
cd /tmp && /tmp/mnt/ASUS_ROUTER/script_bootloader/bin/update
When new version of Entware is released, execute upgrade, which could preserve all the files in directory
/tmp/mnt/ASUS_ROUTER/home
and reinstall the system.
-
Login the router with ssh client.
-
Execute the code below to upgrade the system.
cd /tmp && /tmp/sbl_upgrade
-
Execute the code below after restart.
cp -f "/tmp/mnt/ASUS_ROUTER/script_bootloader/bin/upgrade" "/tmp/sbl_upgrade" && cd "/tmp" && "/tmp/sbl_upgrade"
-
Following steps are same with those in section Installation (Online)
-
Login the router with ssh client.
-
Execute the code below to uninstall the system.
cd /tmp && /tmp/sbl_uninstall
You have to unplug the USB flash drive containing the system from the router before upgrade the firmware of the router every time. After the upgradation is OK, re-plug the USB flash drive containing the system to a USB port of the Router.
-
Login the router with ssh client.
-
Execute the code below to restore the system.
cp -f /tmp/mnt/ASUS_ROUTER/script_bootloader/bin/restore /tmp && cd /tmp && /tmp/restore
-
Uninstall the system.
-
Installation (Online) the system again.