viernes, 23 de enero de 2015

Montar las particiones en modo RW / Mount partitions in RW mode - i Router TELDAT 1104-W

     En respuesta a la peticion de Avalger, mostraré como se cambian las particiones del i-Router 1104-W en modo RW.
     In response to request from Avalger, i will show how to change the partitions from iRouter 1104-W, to mode Read-Write partitions at boot.


     Con el cable de consola conectado, arrancar el router, y cuando el CFE nos muestre el mensaje:
"Enter password - autoboot in 3 sec...", introducir el password:FUZXPIBTDLT
     With the console cable connected, boot the router, and when the CFE show us the message:
"Enter password - autoboot in 3 sec ...", enter the password: "FUZXPIBTDLT"

     La mejor forma de introducirlo es copiando el password en el notepad, copiarlo y cuando nos muestre la frase, pegarlo en la consola.
     The best way to input this password is to copy it  in notepad, and when display the phrase, paste into the console.

     Una vez tenemos disponible el prompt del U-boot, cambiaremos el parámetro de entorno mtdparts poniendo estos parámetros en una sola línea:
     Once we have available the U-boot prompt, change the parameter setting mtdparts putting these parameters on a single line:
Enter password - autoboot in 3 sec...
Comcerto-100 >
setenv mtdparts mtdparts='comcertoflash.0:256k(boot)ro,128k(env),128k(tldt),1280k(kr),- (fs);comcertonand:2M(kr1),100M(fs1),2M(kr2),100M(fs2),-(cfg)'
     Confirmaremos este cambio si vemos que las mask flags han cambiado todas a 0, menos la de boot.
     Test this change when  we see that the mask flags have changed all to 0, minus the boot partition.
Comcerto-100 > mtdparts
device nor0 <comcertoflash.0>, # parts = 5
#: name size offset mask_flags
0: boot 0x00040000 0x00000000 1
1: env 0x00020000 0x00040000 0
2: tldt 0x00020000 0x00060000 0
3: kr 0x00140000 0x00080000 0
4: fs 0x00240000 0x001c0000 0
device nand0 <comcertonand>, # parts = 5
#: name size offset mask_flags
0: kr1 0x00200000 0x00000000 0
1: fs1 0x06400000 0x00200000 0
2: kr2 0x00200000 0x06600000 0
3: fs2 0x06400000 0x06800000 0
4: cfg 0x03400000 0x0cc00000 0
     Grabaremos este cambio en la flash de env:
     We will record this change in the flash of env:
Comcerto-100 > saveenv
Saving Environment to Flash...
Un-Protected 2 sectors
Erasing Flash...
.. done
Erased 2 sectors
Writing to Flash... done
Protected 2 sectors
Comcerto-100 >
     Rearrancar el router y ya tenemos las particiones activas en RW.
     We will record this change in the flash of env:

     Si en /tmp creamos un fichero de pruebas:
     If we create a test file on /tmp:
# touch Persistent_File_Test
     Y volvemos a rearrancar el router, este fichero permanece en el directorio:
     Reboot the router, and you can see that this file remains on directory.
root@irouter:~# ls -la

drwxrwxrwt   11 root     root          340 Jan  1 00:19 .
drwxr-xr-x    1 1004     1000         2048 Jul  6  2012 ..
-rwx------    1 root     root            0 Jan  1 00:00 .failsafe
drwx------    2 root     root          120 Jan  1 00:00 .gnupg
-rw-r--r--    1 root     root            0 Jan  1 00:19 Persistent_File_Test
--wS--x---    1 root     root            0 Jan  1 00:01 cmm.901501096
drwxr-xr-x    5 root     root          100 Jan  1 00:03 eclipse
drwxr-xr-x   24 1004     1000         1080 Jan  1 00:41 etc
drwxr-sr-x    2 1234     1234           40 Jan  1 00:02 ftp
drwxr-xr-x    2 root     root           40 Jan  1 00:00 lock
drwxr-xr-x    4 root     root          120 Jan  1 00:01 log
drwxr-xr-x    2 root     root           40 Jan  1 00:00 mnt
drw-rw-rw-    1 root     root         2048 Jan  1 00:00 persist
-rw-r--r--    1 root     root           21 Jan  1 00:00 preinit.log
lrwxrwxrwx    1 root     root           21 Jan  1 00:00 resolv.conf -> /tmp/resolv.conf.auto
-rw-r--r--    1 root     root            0 Jan  1 00:02 resolv.conf.auto
drwxr-xr-x    3 root     root          280 Jan  1 00:41 run
     A partir de ahora, cualquier cambio será permamente a nivel de Filesystem, así que hay que ir con cuidado con los cambios, o tendremos que volver a subir el firmware en modo emergencia.
     From now on, any changes will permamente to Filesystem level, so you have to be careful with changes, or we will have to upload the firmware in emergency mode.

     Cualquier otra petición, hacerla en los comentarios y espero que sea de utilidad el post.
     Any other request  please do it on comments and i hope this post be useful.


No hay comentarios: