Asus RT-AC68U: Instalación de Entware en firmware Merlin

5 minutos de lectura

Introducción

Entware es un repositorio de software que nos va a permitir la instalación de diferentes programas en nuestro router. Puede echar un vistazo a sus repositorio en el siguiente enlace

La instalación la realizare sobre un router con firmware Merlin, ya que este proporciona un script de instalación para Entware que facilita mucho la labor, en caso de que no tengas instalado Merlin puedes seguir las instrucciones que facilitan en el siguiente enlace https://github.com/Entware/Entware/wiki/Install-on-Asus-stock-firmware

Requisitos

  • Es necesario tener conectado un disco USB en el router formateado con ext2 o ext3
  • Si has instalado Download Manager, debes de desinstalarlo y reiniciar el router

Instalación

Deberemos acceder mediante SSH al router, la instalación es muy sencilla, basta con ejecutar el sccript entware-setup.sh

 1user@RT-AC68U-E358:/tmp/home/root# entware-setup.sh
 2
 3 Info:  This script will guide you through the Entware installation.
 4
 5 Info:  Script modifies "entware" folder only on the chosen drive,
 6
 7 Info:  no other data will be changed. Existing installation will be
 8
 9 Info:  replaced with this one. Also some start scripts will be installed,
10
11 Info:  the old ones will be saved on Entware partition with name
12
13 Info:  like /tmp/mnt/sda1/jffs_scripts_backup.tgz

En el caso de tener varios dispositivos discos USB conectados al router, nos preguntara en cual de los dos vamos a realizar la instalación de Enteware

 1​ Info:  Looking for available partitions...
 2
 3      [1] --> /tmp/mnt/8GB
 4
 5      [2] --> /tmp/mnt/NAS01
 6
 7       =>  Please enter partition number or 0 to exit
 8
 9      [0-2]: 1
10
11       Info:  /tmp/mnt/8GB selected.

Después de seleccionar el disco comenzará la instalación y descarga de los paquetes necesarios

 1       * Warning:  Found previous installation, saving...
 2
 3       Info:  Creating /tmp/mnt/8GB/entware folder...
 4
 5       * Warning:  Deleting old /tmp/opt symlink...
 6
 7       Info:  Creating /tmp/opt symlink...
 8
 9       Info:  Creating /jffs scripts backup...
10
11      tar: removing leading '/' from member names
12
13       Info:  Modifying start scripts...
14
15      Info: Checking for prerequisites and creating folders...
16
17      Warning: Folder /opt exists!
18
19      Info: Opkg package manager deployment...
20
21      --2018-10-06 19:31:45--  http://bin.entware.net/armv7sf-k2.6/installer/opkg
22
23      Resolving bin.entware.net... 81.4.123.217
24
25      Connecting to bin.entware.net|81.4.123.217|:80... connected.
26
27      HTTP request sent, awaiting response... 200 OK
28
29      Length: 130968 (128K) [application/octet-stream]
30
31      Saving to: '/opt/bin/opkg'
32
33​/opt/bin/opkg                100%[=============================================>] 127.90K  --.-KB/s    in 0.1s
34
35
36
37      2018-10-06 19:31:45 (1.06 MB/s) - '/opt/bin/opkg' saved [130968/130968]
38
39​...........
40
41      Installing libstdcpp (7.3.0-8) to root...
42
43      Downloading http://bin.entware.net/armv7sf-k2.6/libstdcpp_7.3.0-8_armv7-2.6.ipk
44
45      Installing entware-release (1.0-2) to root...
46
47      ......
48      ......
49
50      Configuring libgcc.
51
52      Configuring libc.
53
54      Configuring libssp.
55
56      ......
57      ......
58
59      Configuring entware-opt.
60
61      Info: Congratulations!
62
63      Info: If there are no errors above then Entware was successfully initialized.
64
65      Info: Add /opt/bin & /opt/sbin to your PATH variable
66
67      Info: Add '/opt/etc/init.d/rc.unslung start' to startup script for Entware services to start
68
69      Info: Found a Bug? Please report at https://github.com/Entware/Entware/issues
70
71      user@RT-AC68U-E358:/tmp/home/root#

Con esto ya hemos terminado, veamos como empezar a utilizar Entware.

Uso

La herramienta para manejar los paquetes en Entware es opkg. Te dejo unos ejemplos de su uso:

  • opkg list lista todos los paquetes disponibles para instalar
  • opkg install nombre_software instala el paquete nombre_software
  • opkg remove software_name borra el paquete nombre_software

También te dejo todas sus opciones de uso

 1usage: opkg [options...] sub-command [arguments...]
 2where sub-command is one of:
 3
 4Package Manipulation:
 5        update                  Update list of available packages
 6        upgrade                 Upgrade installed packages
 7        install <pkgs>          Install package(s)
 8        configure <pkgs>        Configure unpacked package(s)
 9        remove <pkgs|regexp>    Remove package(s)
10        flag <flag> <pkgs>      Flag package(s)
11         <flag>=hold|noprune|user|ok|installed|unpacked (one per invocation)
12
13Informational Commands:
14        list                    List available packages
15        list-installed          List installed packages
16        list-upgradable         List installed and upgradable packages
17        list-changed-conffiles  List user modified configuration files
18        files <pkg>             List files belonging to <pkg>
19        search <file|regexp>    List package providing <file>
20        find <regexp>           List packages whose name or description matches <regexp>
21        info [pkg|regexp]       Display all info for <pkg>
22        status [pkg|regexp]     Display all status for <pkg>
23        download <pkg>          Download <pkg> to current directory
24        compare-versions <v1> <op> <v2>
25                            compare versions using <= < > >= = << >>
26        print-architecture      List installable package architectures
27        depends [-A] [pkgname|pat]+
28        whatdepends [-A] [pkgname|pat]+
29        whatdependsrec [-A] [pkgname|pat]+
30        whatrecommends[-A] [pkgname|pat]+
31        whatsuggests[-A] [pkgname|pat]+
32        whatprovides [-A] [pkgname|pat]+
33        whatconflicts [-A] [pkgname|pat]+
34        whatreplaces [-A] [pkgname|pat]+
35
36Options:
37        -A                      Query all packages not just those installed
38        -V[<level>]             Set verbosity level to <level>.
39        --verbosity[=<level>]   Verbosity levels:
40                                        0 errors only
41                                        1 normal messages (default)
42                                        2 informative messages
43                                        3 debug
44                                        4 debug level 2
45        -f <conf_file>          Use <conf_file> as the opkg configuration file
46        --conf <conf_file>
47        --cache <directory>     Use a package cache
48        -d <dest_name>          Use <dest_name> as the the root directory for
49        --dest <dest_name>      package installation, removal, upgrading.
50                                <dest_name> should be a defined dest name from
51                                the configuration file, (but can also be a
52                                directory name in a pinch).
53        -o <dir>                Use <dir> as the root directory for
54        --offline-root <dir>    offline installation of packages.
55        --add-arch <arch>:<prio>        Register architecture with given priority
56        --add-dest <name>:<path>        Register destination with given path
57
58Force Options:
59        --force-depends         Install/remove despite failed dependencies
60        --force-maintainer      Overwrite preexisting config files
61        --force-reinstall       Reinstall package(s)
62        --force-overwrite       Overwrite files from other package(s)
63        --force-downgrade       Allow opkg to downgrade packages
64        --force-space           Disable free space checks
65        --force-postinstall     Run postinstall scripts even in offline mode
66        --force-remove  Remove package even if prerm script fails
67        --force-checksum        Don't fail on checksum mismatches
68        --noaction              No action -- test only
69        --download-only No action -- download only
70        --nodeps                Do not follow dependencies
71        --nocase                Perform case insensitive pattern matching
72        --size                  Print package size when listing available packages
73        --force-removal-of-dependent-packages
74                                Remove package and all dependencies
75        --autoremove            Remove packages that were installed
76                                automatically to satisfy dependencies
77        -t                      Specify tmp-dir.
78        --tmp-dir               Specify tmp-dir.
79        -l                      Specify lists-dir.
80        --lists-dir             Specify lists-dir.
81
82 regexp could be something like 'pkgname*' '*file*' or similar
83 e.g. opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'

Referencia: