Actualizar la versión de linuxAP

Primero necesitamos un servidor de tftp funcionando en una máquina que sea accesible desde el linuxAP. Yo he utilizado atftp, lo instalamos y lo configuramos de la siguiente manera:

# mkdir /tftp-boot
# chown nobody:nobody /tftp-boot
# in.tftpd --daemon /tftp-boot

una vez configurado nos bajamos la imágen de linuxAP y la colocamos dentro de /tftp-boot.
Utilizo como ejemplo la última imagen que hay disponible en el momento de escribir esto:

# cd /tftp-boot
# wget http://linuxap.ksmith.com/archive/flash-2003-09-01
# wget http://linuxap.ksmith.com/archive/flash-2003-09-01.md5

Ahora comprovamos que el archivo que hemos bajado no esté corrupto, verificando su md5:

# md5sum flash-2003-09-01
e8aaffaab24bb74dbfa39604668ba914  flash-2003-09-01
# cat flash-2003-09-01.md5
e8aaffaab24bb74dbfa39604668ba914  flash

Comprovamos efectivamente que los dos md5 concuerdan, si no es así vuelve a bajar la imágen.

Ahora que ya tenemos listo el servidor tftp para que el linuxAP pueda descargarse la nueva imágen, entramos al linuxAP utilizando la consola. Yo utilizo el programa minicom, configurado de la siguiente manera:

# cat /etc/minicom/minirc.dfl
pu baudrate         4800
pu bits             8
pu parity           N
pu stopbits         1

# minicom -o

Una vez dentro del  linuxAP, hacemos un ping a la máquina donde hemos montado el servidor tftp para ver que tenemos comunicación con ésta y si es así ya estamos listos para reflashear.

Ejecutaremos el siguiente comando, donde 192.168.1.10 es la ip del servidor de tftp:

# reflash flash-2003-09-01 192.168.1.10
Entering runlevel 1
01.tweak:
82.9.telnetd:
Stopping telnetd daemon.
83.9.httpd:
Stopping httpd daemon.
86.9.dhcpd:
# udhcpd.conf disable   
udhcpd disabled
88.9.tcpsrv: 
89.4.cipe:   
90.8.udhcpc: 
killall: udhcpc: no process killed 
Downloading flash-2003-09-01 from 192.168.1.10 Please Wait ...
Downloading flash-2003-09-01.md5 from 192.168.1.10
md5 image verification, Please Wait ...flash: OK
 
Updating Flash Please Wait ...
exec update -s /dev/mtd/0 0x0 0x100000 /tmp/flash
Getting current configuration information
MTD start erase
4 regions found in this mtd device 
region 0 is at 0(0x0) of 15 sectors with sector size 65536(0x10000)
region 1 is at 983040(0xf0000) of 1 sectors with sector size 32768(0x8000)
region 2 is at 1015808(0xf8000) of 2 sectors with sector size 8192(0x2000)
region 3 is at 1032192(0xfc000) of 1 sectors with sector size 16384(0x4000)
boundary check for offset 0(0x0) returning region 0 block 0
erasing region 0 block 0 at offset 0(0x0) length 65536(0x10000)
boundary check for offset 65536(0x10000) returning region 0 block 1
erasing region 0 block 1 at offset 65536(0x10000) length 65536(0x10000)
boundary check for offset 131072(0x20000) returning region 0 block 2
erasing region 0 block 2 at offset 131072(0x20000) length 65536(0x10000)
boundary check for offset 196608(0x30000) returning region 0 block 3
erasing region 0 block 3 at offset 196608(0x30000) length 65536(0x10000)
boundary check for offset 262144(0x40000) returning region 0 block 4
erasing region 0 block 4 at offset 262144(0x40000) length 65536(0x10000)
boundary check for offset 327680(0x50000) returning region 0 block 5
erasing region 0 block 5 at offset 327680(0x50000) length 65536(0x10000)
boundary check for offset 393216(0x60000) returning region 0 block 6
erasing region 0 block 6 at offset 393216(0x60000) length 65536(0x10000)
boundary check for offset 458752(0x70000) returning region 0 block 7
erasing region 0 block 7 at offset 458752(0x70000) length 65536(0x10000)
boundary check for offset 524288(0x80000) returning region 0 block 8
erasing region 0 block 8 at offset 524288(0x80000) length 65536(0x10000)
boundary check for offset 589824(0x90000) returning region 0 block 9
erasing region 0 block 9 at offset 589824(0x90000) length 65536(0x10000)
boundary check for offset 655360(0xa0000) returning region 0 block 10
erasing region 0 block 10 at offset 655360(0xa0000) length 65536(0x10000)
boundary check for offset 720896(0xb0000) returning region 0 block 11
erasing region 0 block 11 at offset 720896(0xb0000) length 65536(0x10000)
boundary check for offset 786432(0xc0000) returning region 0 block 12
erasing region 0 block 12 at offset 786432(0xc0000) length 65536(0x10000)
boundary check for offset 851968(0xd0000) returning region 0 block 13
erasing region 0 block 13 at offset 851968(0xd0000) length 65536(0x10000)
boundary check for offset 917504(0xe0000) returning region 0 block 14
erasing region 0 block 14 at offset 917504(0xe0000) length 65536(0x10000)
boundary check for offset 983040(0xf0000) returning region 1 block 0
erasing region 1 block 0 at offset 983040(0xf0000) length 32768(0x8000)
boundary check for offset 1015808(0xf8000) returning region 2 block 0
erasing region 2 block 0 at offset 1015808(0xf8000) length 8192(0x2000)
boundary check for offset 1024000(0xfa000) returning region 2 block 1
erasing region 2 block 1 at offset 1024000(0xfa000) length 8192(0x2000)
boundary check for offset 1032192(0xfc000) returning region 3 block 0
erasing region 3 block 0 at offset 1032192(0xfc000) length 16384(0x4000)
MTD finish erase
MTD start write
Last[2] is 57, datum is ed
mtd lowlevel write error: 5 retries left: retrying
Written: 65536 chars
Last[2] is d7, datum is 27
mtd lowlevel write error: 5 retries left: retrying
Written: 131072 chars
Written: 196608 chars
Written: 262144 chars
Written: 327680 chars
Last[2] is d7, datum is 54
mtd lowlevel write error: 5 retries left: retrying
Written: 393216 chars
Written: 458752 chars
Written: 524288 chars
Written: 589824 chars
Last[2] is d7, datum is 7c
mtd lowlevel write error: 5 retries left: retrying
Written: 655360 chars
Written: 720896 chars
Last[2] is 57, datum is d2
mtd lowlevel write error: 5 retries left: retrying
Last[2] is d7, datum is 1
mtd lowlevel write error: 5 retries left: retrying
Written: 786432 chars
Written: 851968 chars
Written: 917504 chars
Written: 983040 chars
Last[2] is d7, datum is 60
mtd lowlevel write error: 5 retries left: retrying
Written: 1048576 chars
MTD finish write

Restoring Configuration Data
4 regions found in this mtd device
region 0 is at 0(0x0) of 15 sectors with sector size 65536(0x10000)
region 1 is at 983040(0xf0000) of 1 sectors with sector size 32768(0x8000)
region 2 is at 1015808(0xf8000) of 2 sectors with sector size 8192(0x2000)
region 3 is at 1032192(0xfc000) of 1 sectors with sector size 16384(0x4000)
boundary check for offset 1015808(0xf8000) returning region 2 block 0
erasing region 2 block 0 at offset 1015808(0xf8000) length 8192(0x2000)
boundary check for offset 1024000(0xfa000) returning region 2 block 1
erasing region 2 block 1 at offset 1024000(0xfa000) length 8192(0x2000)
Hard Reboot in 2 seconds ...Restarting system.

Y esto es todo, esperamos a que reinicie y ya tenemos la nueva versión de linuxAP funcionando :)