viernes, 1 de septiembre de 2023

Actualizando el firmware de OpenWRT en el router WRT54GL

Actualizar de Kamikaze 8 a backfire 10.03.1

Conecto SSH con el router WRT54GL con el comando:

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 192.168.110.1

Al hacer
opkg update

aparece una lista de todos los paquetes que no puede ser actualizados porque corresponden a una arquitectura diferente.


edito el archivo /etc/opkg.conf
vi /etc/opkg.conf
que contiene:

src/gz snapshots http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/packages
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /jffs

actualizo la primera linea y la sustituyo por:mount

src/gz snapshots http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages

y ejecuto dos veces:

opkg update

Despues al intentar instalar openvpn desde el UI LuCI aparece el siguiente error:


Installing openvpn (2.1.4-3) to root...

Collected errors:
 * verify_pkg_installable: Only have 0kb available on filesystem /, pkg openvpn needs 185
 * opkg_install_cmd: Cannot install package openvpn.

root@GW8923:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.7M      1.7M         0 100% /rom
tmpfs                     7.0M      1.2M      5.8M  18% /tmp
/dev/mtdblock/4           1.5M    336.0K      1.2M  22% /overlay
mini_fo:/overlay          1.7M      1.7M         0 100% /


root@GW8923:~# cp /rom/etc/opkg.conf /overlay/etc/opkg.conf

root@GW8923:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.7M      1.7M         0 100% /rom
tmpfs                     7.0M      1.3M      5.7M  18% /tmp
/dev/mtdblock/4           1.5M    336.0K      1.2M  22% /overlay
mini_fo:/overlay          1.7M      1.7M         0 100% /


renombro overlay/etc a /overlay/etc.old como paso previo para eliminar ese directorio


root@GW8923:~# mv /overlay/etc/ /overlay/etc.old

sigue apareciendo que hay 0 espacio disponible:


root@GW8923:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.7M      1.7M         0 100% /rom
tmpfs                     7.0M      1.4M      5.6M  20% /tmp
/dev/mtdblock/4           1.5M    336.0K      1.2M  22% /overlay
mini_fo:/overlay          1.7M      1.7M         0 100% /


Sin embargo, intento instalar de nuevo el paquete openvpn

Installing openvpn (2.1.4-3) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/openvpn_2.1.4-3_brcm-2.4.ipk.
Installing kmod-tun (2.4.37.9-1) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/kmod-tun_2.4.37.9-1_brcm-2.4.ipk.
Installing libopenssl (0.9.8r-1) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/libopenssl_0.9.8r-1_brcm-2.4.ipk.
Installing zlib (1.2.3-5) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/zlib_1.2.3-5_brcm-2.4.ipk.
Installing liblzo (2.04-1) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/liblzo_2.04-1_brcm-2.4.ipk.
Configuring kmod-tun.
Configuring zlib.
Configuring libopenssl.
Configuring liblzo.
Configuring openvpn.

Collected errors:
 * resolve_conffiles: Existing conffile /etc/config/openvpn is different from the conffile in the new package. The new conffile will be placed at /etc/config/openvpn-opkg.


Despues de instalarlo el espacio disponible en /overlay es menor:

root@GW8923:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.7M      1.7M         0 100% /rom
tmpfs                     7.0M      1.3M      5.7M  19% /tmp
/dev/mtdblock/4           1.5M      1.3M    240.0K  84% /overlay
mini_fo:/overlay          1.7M      1.7M         0 100% /

Instalo luci-app-openvpn

y el espacio disponible queda en:

root@GW8923:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 1.7M      1.7M         0 100% /rom
tmpfs                     7.0M      1.3M      5.7M  19% /tmp
/dev/mtdblock/4           1.5M      1.3M    180.0K  88% /overlay
mini_fo:/overlay          1.7M      1.7M         0 100% /

el sistema de archivos tiene los siguientes puntos de montaje:

  
root@GW8923:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro)
none on /dev type devfs (rw)
none on /proc type proc (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock/4 on /overlay type jffs2 (rw)
mini_fo:/overlay on / type mini_fo (rw)



No hay comentarios: