Autoreinstallation image/lang-es: Difference between revisions

From OLPC
Jump to navigation Jump to search
(sync'ed version = 42931)
m (preparing new translation)
Line 3: Line 3:
{{TOCright}}
{{TOCright}}


=Automatic Reinstallation Image=
Hemos trabajado muy duro para hacer lo más fácil posible la actualización de una máquina en el terreno. Hasta que el ''booteo'' y actualización vía red este disponible, esta es la forma más fácil.


This page describes how to update the software image on your laptop. This process changes regularly, so please read the instructions carefully. Important changes are [[#Notes|noted below]]. The update procedure creates a USB flash key or disk that when booted on an OLPC laptop, updates its firmware and installs a new version of the operating system image onto NAND flash.
La imagen de Autoreinstalación consiste de un ''script'' [[Open Firmware/lang-es|Open Firmware]] que actualiza la memoria flash NAND y el firmware con las últimas versiones estables, sin otro requerimiento excepto el instertar una llave USB previamente preparada y prender la máquina.


'''WARNING''': The update procedure will '''entirely erase''' the flash memory of the system. Be sure to backup any user-space files onto an external device '''before''' reinstallation.
; NOTA : este procedimiento crea una llave o disco USB que al ser ''booteado'' en una laptop OLPC, actualiza su BIOS e instala (SOBRE-ESCRIBE) la imagen del sistema operativo sobre la memoria flash NAND. NUNCA ''bootee'' desde esta llave o disco USB a menos que desee actualizar el sistema, que borrará totalmente la memoria flash del mismo.
{{Translated text |
We've worked very hard to make it as easy as possible to update a machine in the field. Until network boot and update is available, this is as easy as it can get.


The [[Software Release Notes]] document the status of the most important issues of this software.
The Autoreinstallation image consists of an Open Firmware script that updates the NAND flash and firmware with the latest stable images, without requiring the user to do more than insert a prepared USB disk and turn on the machine.


The [[Test Group Release Notes]] describe the status of development versions of the software.
<b>NOTE: this procedure creates a USB flash key or disk that when booted on an OLPC laptop, updates its BIOS and installs (OVERWRITES) an operating system image onto NAND flash. NEVER boot this USB flash key or disk unless you intend to update your system, which will entirely erase anything you had on the flash memory of the system.</b>
| display = block}}


==Notes==
Este procedimiento funciona para todos los tipos de hardware OLPC, incluyendo las placas A-Test y la mayoría de los B1 (ver [[Autoreinstallation image/lang-es#Workaround for old B1 systems|más abajo para los B1 viejos]]) y todos los B2. Si todavía utiliza la BIOS Insyde, se deberá primero actualizar el firmware siguiendo las instrucciones de como [[Upgrading to LinuxBIOS/lang-es|actualizar a LinuxBIOS]].


As of '''Build 525''', we have added an activation step to the update process.
Las [[Software Release Notes/lang-es|Notas de Lanzamiento de Software]] documentan el estado de los puntos más relevantes de este software.
* You will need to use the '''[http://dev.laptop.org/git?p=users/cscott/autore;a=blob_plain;f=olpc-auto.zip;hb=HEAD new]''' version of the fth script.
{{Translated text |
* You must leave the USB flash key or disk in the machine after the upgrade, while it reboots.
This procedure works for all types of OLPC hardware, including A-test boards and most B1 (see [[#Workaround for old B1 systems]]) and all B2 laptops. It works with both Open Firmware and Linux-as-BIOS installations - but does not work with Insyde BIOS. If you are still running Insyde BIOS, you will first have to upgrade the firmware using procedures described '''[[Upgrading_to_LinuxBIOS|elsewhere]]'''.


As of '''Build 406''', we have added a checksum file to the update process.
The [[Software Release Notes]] document the status of the most important issues of this software.
* You will need both the '''.img''' file and the '''.crc''' file to update.
| display = block}}


This procedure works for all types of OLPC hardware:
{{anchor|System Update Procedure}}
* including A-test boards (but not for firmware more recent than Q2C18);
== Procedimiento de Actualización del Sistema ==
* most B1 (see [[#Workaround for old B1 systems| workaround below]]); and
* all B2 laptops.


It has only been tested with Open Firmware:
; Antes de comenzar : enchufe la máquina y verifique que la batería esté cargada. Es '''muy''' importante que el proceso no sea interrumipido. Tomará solamente 2 minutos 15 segundos en total.
* if you are running Linux-as-BIOS or Insyde BIOS, see the [[#Workaround for LinuxBIOS or Insyde BIOS| workaround below]].


==System Update Procedure==
# '''Descargue''' el archivo [http://olpc.download.redhat.com/olpc/autoupdate/olpc406_c11.zip olpc406_c11.zip]<br>md5sum: <code>0de554d266e87344f8d25b7fd2cebb74 olpc406_c11.zip</code>
# Utilice una llave o disco USB con por lo menos 300 MiB en su partición primaria (no es necesario que esté particionado)
#* Si su sistema tiene [[Open Firmware/lang-es|Open Firmware]], puede tener un formato FAT (de fábrica) o <tt>ext3</tt>&mdash;en cuyo caso, asegurese que el tipo de partición declarada (ej:<tt>83</tt>&ndash;Linux <tt>ext2</tt> o <tt>ext3</tt>) sea tal y no FAT.
#* Si su sitema tiene Linux-como-BIOS, el dispositivo USB tiene que tener una partición primaria y un sistema de archivos tipo <tt>ext2</tt> en ella, ya que el cargador (''bootloader'') Linux buscará en el dispositivo <tt>/dev/sda1</tt>
# '''[[Unzip|Descompacte]]''' los archivos en la raíz de la llave o disco USB, creando así el directorio <tt>boot</tt>. (De drag-n-drop de los archivos directamente del archivo <tt>.zip</tt> deberá crear dicho directorio manualmente). Para que la actualización se efectúe deben existir tres archivos en el directorio: '''<tt>q2c11.rom, nand406.img y olpc.fth</tt>'''. Un cuarto archivo <tt>'''bzimage'''</tt> debe encontrarse en la raíz.
#* No utilice un dispositivo USB para el cual se hayan reportado errores en el proceso de descompactación: los archivos pueden estar (probablemente esten) dañados. Como medida de seguridad extra, la BIOS OFW OLPC verifica la integridad de la imagen antes de flashear la BIOS.
# '''Opcional''' - Si se desea instalar una [[OS images/lang-es|Imagen del SO]] diferente al ''build'' 406, descargue la imagen [[JFFS2/lang-es]] correspondiente del [http://olpc.download.redhat.com/olpc/streams/development/ repositorio], y guardelo como <tt>'''nandXXX.img'''</tt> (siendo <tt>XXX</tt> el número del ''build''). Después edite <tt>'''olpc.fth'''</tt>, remplazando todas las ocurrencias de <tt>'''406'''</tt> por el número de ''build'' del archivo.
# '''Inserte''' la llave en la máquina, y
#* Si tiene [[Open Firmware/lang-es|Open Firmware]] Q2C11 o posterior, mantenga una de las "teclas de juego" (''game keys'') cercanas a la pantalla mientras enciende la laptop; y suéltelo una vez que la pantalla se ilumine.
#* Si tiene [[Open Firmware/lang-es|Open Firmware]], anterior a Q2C11 solo encienda la máquina.
#* Si tiene Linux-como-BIOS, cuando vea la barra de progreso, presione [[Image:Key esc.jpg]] (Esc), y seleccione el icono USB, y presione [[Image:Key enter.jpg|70px]] (Enter).
#* Si esta utilizando un '''disco''' USB puede ser necesario interrumpir el proceso de ''booteo'' del [[Open Firmware/lang-es|Open Firmware]] presionando la tecla [[Image:Key esc.jpg]] (Esc), esperar un momento, ingresar <tt>'''probe-usb2'''</tt>, lo cual debería proporcionar opciones extras a las iniciales. Después puede ingresar <tt>'''boot'''</tt> y la actualización debería continuar. Esto se debe a que los discos externos tardan mucho en estar listos. El último firmware debería solucionar esto.
{{Translated text |
<b>Before you start: plug in your machine and ensure the battery is charged. It is very important that the update process not be interrupted.</b> It will take about 2 minutes and 15 seconds total.
# '''Download''' the file http://olpc.download.redhat.com/olpc/autoupdate/olpc406_c11.zip <br> md5sum: <code> 0de554d266e87344f8d25b7fd2cebb74 olpc406_c11.zip </code>
# Get a USB flash key or disk with at least 300 MiB of free space in the primary partition (it doesn't have to be partitioned at all). If your system currently has Open Firmware, the filesystem can be either FAT (like a factory-formatted device) or ext2. But it will not work if it is partitioned such that the partition type code says "83" (Linux ext2 or ext3) but the actual filesystem inside the partition is FAT. If your system has Linux-as-BIOS, the USB device must have a primary partition and an ext2 filesystem on it, as /dev/sda1 is the device that Linux as bootloader looks for.
# '''Unzip''' the files at the root of the USB flash key or disk drive, thus creating a directory called "boot". (If you drag and drop the files from the zip archive, you'll have to create the "boot" directory manually on the flash or disk drive.) Three files must be in the directory named "boot", for the automatic update to occur: '''q2c11.rom'''; '''nand406.img'''; and '''olpc.fth'''. A fourth file, '''bzimage''' must be in the root directory. Do not use a flash key or disk for which there have been any errors reported during unzipping: the files may be (probably are) damaged. As a further safeguard, the OLPC OFW BIOS checks the integrity of any BIOS flash image before reflashing the BIOS.
# (Optional) If you want to install an [[OS images|OS image]] besides build 406, download the appropriate jffs2 image from the [http://olpc.download.redhat.com/olpc/streams/development/ image repository], and save it as '''nandXXX.img''', where XXX is the number of the build. Then, edit '''olpc.fth''', replacing '''406''' everywhere it occurs with the build number in the filename.
# '''Insert''' the USB flash key into the machine. '''If you have Open Firmware Q2C11 or later, hold down one of the "game keys" next to the screen, while you press the power button to turn on the laptop; then release the game keys when the screen lights up.''' If you have Open Firmware before version Q2C11, just turn on the power. If you have Linux-as-BIOS, hit ESC when you see the boot progress bar, then choose the USB key icon and hit Enter.
# If your USB device is a hard disk instead of flash, you may need to interrupt the Open Firmware boot sequence by pressing the Esc key (the upper left key on the keyboard, marked with an X in a circle), waiting a moment, then entering '''probe-usb2'''. You should see additional entries compared to the initial list that Open Firmware displayed. Then you can enter '''boot''' and the update should proceed. This is because many external hard drives take a long time to come ready. The latest firmware should fix this issue, however.
| display = block}}


Before you begin, '''plug in your machine''' and ensure the battery is charged. It is very important that the update process not be interrupted. It will take about 2 minutes and 15 seconds total.
Se podrán observar una serie de mensajes como los de la siguiente sección a medida que el sistema es actualizado. La memoria flash NAND siempre tiene algun bloque malo: por lo tanto los mensajes del tipo <tt>"Skipping bad block"</tt> (''salteando bloque malo'') son normales, informando aquellos bloques que Linux jamás usará.


Also, before you begin, get a USB flash key or disk with at least 300 MiB of free space in the primary partition.
El sistema se apagará solo.
* It doesn't have to be partitioned at all.
* The filesystem should be FAT (like a factory-formatted device).
* It will not work if it is partitioned such that the partition type code says "83" (Linux ext2 or ext3), even if the actual filesystem inside the partition is FAT.


Si algo sale mal '''NO APAGUE LA MÁQUINA''' y solicite ayuda a la OLPC, preferentemente de forma inmediata vía IRC o por email.


(1) Download the fth script ([http://dev.laptop.org/git?p=users/cscott/autore;a=blob_plain;f=olpc-auto.zip;hb=HEAD olpc-auto.zip]).
Felicitaciones! Ha terminado! La próxima vez que encienda la máquina, tendrá la nueva imagen.
{{Translated text |
You will see messages like those in the following section as the system is updated. NAND flash always has some bad blocks: the "Skipping bad block" messages during writing NAND flash are therefore normal, informing you of the bad blocks that will never be used by Linux.


(2) unzip '''olpc-auto.zip''' at the root of the USB flash key or disk drive, thus creating a directory called '''boot'''.
The system will automatically poweroff.
* If you drag and drop the files from the zip archive, you'll have to create the boot directory manually on the flash or disk drive.
* There will be two files in the boot directory initially: '''olpc.fth''' and '''q2c18.rom'''.


(3) Download the latest build image, and its checksum file.
If anything goes wrong <b>DO NOT TURN OFF THE MACHINE</b> but please get help from OLPC,
* If you want a stable build, download the [http://olpc.download.redhat.com/olpc/streams/development/LATEST-STABLE-BUILD/ the latest stable build]
preferably immediately on IRC or by email.
** The filesystem image is called '''olpc-redhat-stream-development-build-NNN.NN-DDDDDDDD_TTTT-devel_jffs2.img''' (with the "NNN.NN" replaced by the build number, and the D's and T's replaced with the date and time of the build). The checksum file has the same name, plus the extension '''.crc'''.
** After downloading these files, rename the image to '''osNNNNN.img''' and the checksum to '''osNNNNN.crc'''. For instance, if you downloaded build 406.15, you would rename the files to '''os40615.img''' and '''os40615.crc'''. Copy the renamed files to the "boot" directory on your USB flash key or disk drive.
* For an unstable development build, download the [http://olpc.download.redhat.com/olpc/streams/development/latest/devel_jffs2/ the latest unstable development build].
** The filesystem image is called '''osNNN.img''' (with "NNN" replaced by the build number) and the checksum file is called '''osNNN.crc'''. Download them and save them both to the "boot" directory on your USB flash key or disk drive.
** If you are downloading a build earlier than '''Build 530''', the files on the download site will have longer names, and you will need to rename them, as in the instructions for the stable builds above. For instance, if you want to download Build 528, you would download '''olpc-redhat-stream-development-build-528-20070720_0056-devel_jffs2.img''', and rename it to '''os528.img''', and likewise for its '''.crc''' file.


(4) As noted in Step 2 above, one of the files in the boot directory should be the latest firmware image ('''q2c18.rom''').
Congratulations: you are finished! When you next power the machine on, you'll be running the new image.
* If the [[Firmware]] page lists a newer firmware release, download it to the boot directory.
| display = block}}
** The filename should be qZZZZ.rom, where the Z's are the firmware release number in hexadecimal (which means it uses the letters A-F as well as the numbers 0-9).


(5) There should now be at least four files in the directory named boot on your USB key or disk for the automatic update to occur: '''q2c18.rom'''; '''osNNN.img'''; '''osNNN.crc'''; and '''olpc.fth''', where the NNNs are the build number to which you are updating.
{{anchor|Transcript of System Update}}
* Do not use a flash key or disk for which there have been any errors reported during unzipping: the files may be damaged. As a further safeguard, the firmware checks the integrity of the flash image before reflashing.
==Transcripción de una Actualización de Sistema ==
** The CRC file is required even though earlier firmware did not check for the CRC file.


(6) Insert the USB key or disk into the machine or plug in the USB disk drive.
* If you have Open Firmware Q2C11 or later, '''hold down any one of the game keys on the bezel above the power button, while you press the power button''' to turn on the laptop; then release the game keys when the screen lights up.
* If you have Open Firmware before version Q2C11, just turn on the power without pressing a game key.
* If your USB device is a harddisk instead of flash, you may need to '''interrupt the Open Firmware boot sequence by pressing the Esc key''' (the upper left key on the keyboard, marked with an X in a circle), waiting a moment, then entering '''probe-usb2'''. You should see additional entries compared to the initial list that Open Firmware displayed. Then you can enter '''boot''' and the update should proceed. This is because many external hard drives take a long time to come ready. Recent firmware should fix this issue, however.

(7) A sample transcript of the update procedure is shown in following section.
* NAND flash always has some bad blocks. You will see '''Skipping bad block''' messages during writing NAND flash. These are normal; they are informing you of the bad blocks that will never be used by Linux.

(8) The system will automatically boot into the new system image and perform activation using the activation lease stored on the USB key during autoreinstallation. '''DO NOT REMOVE THE USB KEY''' until you've reached the sugar "XO" screen, or the activation process will fail.
* If anything goes wrong '''DO NOT TURN OFF THE MACHINE''' but please get help from OLPC, preferably immediately on IRC or by email.

(9) Congratulations: you are finished! Power the machine down and remove the USB key.

==Transcript of System Update==
<pre>
<pre>
Release the game key to continue
Release the game key to continue
OLPC B1, 256 MiB memory installed, S/N Unknown
OLPC B1, 256 MiB memory installed, S/N Unknown
Open Firmware CL1 Q2C08 Q2C
Open Firmware CL1 Q2C08 Q2C


USB2 devices:
USB2 devices:
Line 86: Line 89:
Boot device: /usb/disk:\boot\olpc.fth Arguments:
Boot device: /usb/disk:\boot\olpc.fth Arguments:
Checking existing OS image on NAND FLASH
Checking existing OS image on NAND FLASH
Existing OS build is 353
Existing OS build is 353 .0


Updating OS image on NAND FLASH
Updating OS image on NAND FLASH from build 353 .0 to build 536 .0
Erasing...
Erasing...
1800
1800
Skipping bad block at 0xc20000 = page 0x1840 = eblock 0x61
Skipping bad block at 0xc20000 = page 0x1840 = eblock 0x61
3ff40
3ff40
Writing 80c blocks
Writing 701 blocks
80b
80b
Done
Done
Line 99: Line 102:


Updating firmware
Updating firmware
Reading disk:\boot\q2c11.rom
Reading disk:\boot\q2c18.rom
Got firmware version: CL1 Q2C11 Q2C
Got firmware version: CL1 Q2C18 Q2C
Checking integrity ...
Checking integrity ...
SPI FLASH is type 13 - Spansion, Winbond, or ST
SPI FLASH is type 13 - Spansion, Winbond, or ST
Line 109: Line 112:
ff000
ff000
...
...
Powering off
Done
</pre>
</pre>
'''In most cases, the system will boot automatically after the firmware or disk image is updated.'''
'''En la mayoría de los casos, el sistema se apagará automáticamente después de haber terminado la actualización.'''
{{Translated text |
'''In most cases, the system will power-off automatically after the firmware is updated.'''
| display = block}}


{{anchor|Possible Problems}}
== Possible Problems ==
* The filenames you chose for the build images violate the 8.3 character restriction for FAT filesystems. Solution: use shorter filenames.
== Posibles Problemas ==
* The image on the laptop has a higher build number than the image on the USB flash. Solution: use copy-nand as per the [[#Downgrading|instructions below]].

* Es preferible no usar discos USB particionados. De estar particionado:
*# El tipo de la partición debe corresponder con el tipo de sistema de archivos&mdash;un sistema de archivos <tt>FAT</tt> en una partición declarada como <tt>ext2</tt> no funcionará.
*# Los archivos del actualizador deben estar en la partición ''booteable'', de no existir tal, en la primera.
* Los archivos principales (<tt>olpcboot.fth, nandNNN.img, q2bNN.rom</tt>) deben encontrarse en el subdirectorio <tt>/boot/</tt>. Esto ocurre automáticamente si se [[Unzip/lang-es|descompacta]] el archivo, pero si se hace hace por medio del ''drag-n-drop'' a veces disponible en el administrador de archivos (''file manager''), es posible que queden en cualquier otro lugar, y no va a funcionar&mdash;deben estar en <tt>/boot/</tt>. El archivo <tt>bzImage</tt>, que es necesario para la actualización de Linux-como-BIOS, va en la raíz.
* La versión actual de [[Open Firmware/lang-es|Open Firmware]] no soporta llaves USB que se auto-identifican como de clase <tt>"mass_storage/removable"</tt>, en oposición a las más comunes <tt>"mass_storage/scsi"</tt>, que sí son soportadas. La correción a este inconveniente está en camino, pero no está disponible por el momento. La forma de verificar es insertar la llave USB, encender el sistema y detener el proceso de ''booteo'' en la cuenta regresiva presionando la [[Image:Key esc.jpg]] (Esc) y fijarse en la lista de "Dispositivos USB2". Si muestra un ítem similar a <tt>"/pci/usb@f,5/removable@1,0"</tt> su disco tiene dicho problema. (Si se está corriendo sobre una versión vieja de OFW que no muestra la lista de "Dispositivos USB2" automáticamente, ingrese "<tt>show-devs /usb</tt>" para verla). La solución se encuentra más abajo.
* El firmware actual tampoco puede utilizar dispositivos USB cuyo tamaño de sector de hardware no sea de 512 bytes. Para determinar el tamaño de sector de su dispositivo, se puede utilizar <tt>fdisk</tt> en Linux, que informará si el tamaño no es de 512 la primera vez que lo acceda. La solución es la misma que para el problema del "removible" más abajo.
* Varios dispositivos Multi-Función no funcionan.
* Si durante la actualización se ve el siguiente mensaje, intente renombrando el archivo <tt>'''olpc.7th'''</tt> en el directorio "<tt>/boot</tt>" de la imagen de actualización a "<tt>olpc-boot.7th</tt>".
<pre>
Trying startup script disk:\boot\olpc-boot.7th
Can't open boot device
</pre>
* En las placas ATest el servidor X puede no levantar. Puede ser que necesite armar una [[Configuring X on an ATest board/lang-es|configuración personalizada]].
{{Translated text |
* It is better if the USB disk is not partitioned. If it is partitioned:
* It is better if the USB disk is not partitioned. If it is partitioned:
# The partition type must agree with the filesystem type - a FAT filesystem inside a partition marked ext2 won't work
** The partition type must agree with the filesystem type; a FAT filesystem inside a partition marked ext2 won't work
# The updater files should be in the partition that is marked as "bootable", or if there isn't one, in the first partition.
** The updater files should be in the partition that is marked as "bootable", or if there isn't one, in the first partition.
* The main files (olpc.fth, osNNN.img, osNNN.crc, and q2XXX.rom) must be in the boot/ subdirectory.
* The main files (olpcboot.fth, nandNNN.img, q2bNN.rom) must be in the boot/ subdirectory. That will happen automatically if you "unzip" the archive, but if you drag-and-drop from a file manager like file-roller, it is possible to put them anywhere, and that won't work. Those files must be in boot/ . (The bzImage file, which is needed to support upgrading from Linux-as-BIOS, goes in the root directory.)
* The current Open Firmware releases do not support USB keys that identify themselves as class "mass_storage/removable", as opposed to the more common "mass_storage/scsi", which is supported. (The fix for this problem is in the release pipeline, but that doesn't help for upgrading from existing firmware.) The way to check for this is to insert your USB key, power-on the system and stop the auto-boot by typing the Esc key (upper left key) at the countdown. Then look at the list of "USB2 devices". If you see an entry like "/pci/usb@f,5/removable@1,0", your disk has the problem. (If you are running an old version of OFW that does not display the "USB2 devices" list automatically, type "show-devs /usb" to see the list.) The workaround procedure is below.
* The current Open Firmware releases do not support USB keys that identify themselves as class "mass_storage/removable" -- as opposed to the more common "mass_storage/scsi", which is supported. (A fix for this problem is in the release pipeline, but that doesn't help for upgrading from existing firmware.) The way to check for this is to insert your USB key, power-on the system and stop the auto-boot by typing the Esc key (upper left key) at the countdown. Then look at the list of "USB2 devices". If you see an entry like "/pci/usb@f,5/removable@1,0", your disk has the problem. (If you are running an old version of OFW that does not display the "USB2 devices" list automatically, type "show-devs /usb" to see the list.) The workaround procedure is below.
* The current firmware also fails with USB devices whose hardware sector size is not 512 bytes. To determine the sector size of your device, you can use fdisk on the device under Linux, and it will tell you when it first accesses the device if the sector size is not 512. The workaround is the same as for the "removable" problem, i.e. the procedure below.
* The current firmware also fails with USB devices whose hardware sector size is not 512 bytes. To determine the sector size of your device, you can use fdisk on the device under Linux, and it will tell you when it first accesses the device if the sector size is not 512. The workaround is the same as for the "removable" problem, i.e. the procedure below.
* Many Multi-Function devices do not work.
* Many Multi-Function devices do not work.
Line 145: Line 131:
Can't open boot device
Can't open boot device
</pre>
</pre>
* On an ATest board the X server may fail to start up. You may need to provide [[Configuring X on an ATest board|a custom configuration]].
* On an ATest board the X Server may fail to start up. You may need to provide [[Configuring X on an ATest board|a custom configuration]].
| display = block}}


{{anchor|Workaround for old B1 systems}}
=== Workaround for LinuxBIOS or Insyde BIOS ===
If you are running LinuxBIOS, this process will probably not work (it has not been tested). The [http://wiki.laptop.org/index.php?title=Autoreinstallation_image&oldid=49797 old version of this procedure] may work for you.
=== Solucion para sistemas B1 viejos ===


If you are still running Insyde BIOS, you will first have to upgrade the firmware using procedures described '''[[Upgrading_to_LinuxBIOS|elsewhere]]'''.
Si se tiene un sistema '''B1''' que nunca ha sido actualizado, es muy importante que utilice el procedimiento de reinstalación en esta página primero; no intente usar la nueva herramienta "<tt>netnandwrite</tt>". La razón es que este procedimiento corrige automáticamente un error de fabricación en los datos de identificación almacenados en la FLASH del firmware, y actualiza el firmware, ninguno de los cuales es realizado por la herramienta basada en la red. También, algunos firmwares viejos no actualizarán la máquina con el ''script'' de auto-actualización. Si el procedimiento anterior no funciona, siga los siguientes pasos:

# Inserte la llave con el auto-actualizador
=== Workaround for old B1 systems ===
# Encienda la laptop y cuando diga "<tt>Press a key to interrupt</tt>" presiona una tecla;

# En el cursor de 'Ok' ingrese "<tt>flash disk:\boot\q2c11.rom</tt>". La máquina se apagará cuando termine.
If you have a '''B1''' system that has never been upgraded, it is very important to use this page's Autoreinstallation procedure for your first update; do not try to use the new "netnandwrite" tool first. The reason is that this procedure automatically fixes a manufacturing error in the identification data that was stored in the system firmware FLASH, and updates the firmware, neither of which is done by the network-based tool. Also, some old firmware will not update with the auto-update script. If the standard procedure above doesn't update, instead, follow these steps:
# Encienda nuevamente la máquina y cargue el auto-actualizador normalmente; (Reflasheará la NAND con el nuevo ''build'')
{{Translated text |
If you have a '''B1''' system that has never been upgraded, it is very important to use this page's Autoreinstallation procedure for your first update; do not try to use the new "netnandwrite" tool first. The reason is that this procedure automatically fixes a manufacturing error in the identification data that was stored in the system firmware FLASH, and updates the firmware, neither of which is done by the network-based tool. Also, some old firmware will not update with the auto-update script. If the standard procedure above doesn't update, instead, follow these steps:Instead, follow these steps:
#Insert the autoupdater key;
#Insert the autoupdater key;
#boot up the laptop and when it says "Press a key to interrupt" then press any key;
#boot up the laptop and when it says "Press a key to interrupt" then press any key;
#at the Ok prompt type "flash disk:\boot\q2c11.rom". The machine will turn off when finished.
#at the Ok prompt type "flash disk:\boot\q2c18.rom". The machine will turn off when finished.
#power up again and boot the autoupdater normally; (It will reflash the NAND with the new build.)
#power up again and boot the autoupdater normally; (It will reflash the NAND with the new build.)
| display = block}}

{{anchor|Workaround for "Removable" or large-sector devices}}
=== Solución para "Removibles" o dispositivos con sectores grandes ===

* Apague el sistema
* Saque el disco USB con la imagen del actualizador
* ''Bootee'' Linux desde la NAND FLASH
* Inserte el disco USB
* Copie el archivo <tt>/bzImage</tt> del actualizador del sistema de archivos que se encuentra en el disco USB a <tt>/ofw.bzi</tt> en la raíz de la NAND FLASH de la máquina OLPC, ej:
mount /dev/sda1 /mnt
cp /mnt/bzImage /ofw.bzi
* Apague Linux
* Encienda, y presione la barra espaciadora en la cuenta regresiva del [[Open Firmware/lang-es|Open Firmware]]
* En el cursor 'Ok' del [[Open Firmware/lang-es|Open Firmware]], ingrese lo siguiente, y el procedimiento de actualización debería proceder automáticamente:
ok null$ to ramdisk boot nand:\ofw.bzi
{{Translated text |
* Shut down the system
* Remove the USB disk that has the updater image
* Boot Linux from NAND FLASH
* Insert the USB disk
* Copy the file /bzImage from the updater filesystem on the USB disk file to /ofw.bzi in the root directory of the NAND FLASH on the OLPC machine, e.g.
mount /dev/sda1 /mnt
cp /mnt/bzImage /ofw.bzi
* Shutdown Linux
* Power on, and type space during the Open Firmware auto-boot countdown
* At the Open Firmware "ok" prompt, type the following, and the update procedure should then proceed automatically:
ok null$ to ramdisk boot nand:\ofw.bzi
| display = block}}


{{anchor|Downgrading}}
=== Downgrading ===
<b>Note: DO NOT DOWNGRADE Q2Cxx firmware to Q2Bxx firmware.</b> This will destroy the manufacturing information. For details, see [[Firmware]].
=== Volver atrás ===


If you are trying to load a build that is older than the one on the XO, you will get a message that the software is up to date. Follow this procedure to first load an older version and then try the upgrade again:
Si quiere cargar un ''build'' más viejo al que se encuentra en la XO, recibirá un mensaje informando que el software se encuentra actualizado. Para forzar una versión anterior, en el curosr <tt>OK</tt> ingrese:
copy-nand disk:\boot\nandXXX.img
Cuando termine, saque el USB y rebootee la XO. Puede ser necesario ejecutar el comando <tt>copy-flash</tt>.


#In this example you have already loaded build 528 and need to try loading the same one again. Find an earlier build such as 515 (known to be good). Download the .img and .crc files onto a USB stick. They can be at the root but the two files have to be in the same directory.
'''Nota:''' los firmwares recientes requieren la presencia de un archivo <tt>'''CRC'''</tt>; ej: <tt>\boot\nandXXX.crc</tt>
#Boot up the laptop by pressing the power button and hold down the gamepad X button.
{{ Translated text |
#When the message asks you to stop pressing it, let go.
If you are trying to load a build that is older than the one on the XO, you will get a message that the software is up to date. To force it to load an older version, at the OK prompt type:
#Then press the escape key when it gives you 3 seconds to stop the rest of the boot.
#From this OK prompt you should be able to type: <i>copy-nand u:\nand515.img </i>(use the full path if you didn't copy it into the root.)
#Assuming that started correctly you will end up with a 515 build. You can power down and then proceed to upgrade with the newer files on your usb stick for the new upgrade procedure.


copy-nand disk:\boot\nandXXX.img


<b>(Note: After you've downgraded you might want to remove the 515 build from your USB stick, especially if you put it on the \boot directory of your usb stick. It is important that you have the correct .fth, .img, and .crc in the boot directory of the usb in order to upgrade properly with activation. Having more than one .img in there might cause problems.)</b>
When it completes, remove the USB and reboot the XO. You may also need to do a copy-flash command.


'''Note:''' the recent firmware requires a '''CRC''' file to be present; e.g., \boot\nandXXX.crc
| display = block }}


[[Category:OS]]
[[Category:OS]]

Revision as of 23:55, 30 July 2007

Imagen de Reinstalación Automática

  Esta página está supervisada por el equipo de OLPC.
  Traducción de Autoreinstallation image original  
  english | español | 日本語 | română   +/- cambios  
This is an on-going translation

Automatic Reinstallation Image

This page describes how to update the software image on your laptop. This process changes regularly, so please read the instructions carefully. Important changes are noted below. The update procedure creates a USB flash key or disk that when booted on an OLPC laptop, updates its firmware and installs a new version of the operating system image onto NAND flash.

WARNING: The update procedure will entirely erase the flash memory of the system. Be sure to backup any user-space files onto an external device before reinstallation.

The Software Release Notes document the status of the most important issues of this software.

The Test Group Release Notes describe the status of development versions of the software.

Notes

As of Build 525, we have added an activation step to the update process.

  • You will need to use the new version of the fth script.
  • You must leave the USB flash key or disk in the machine after the upgrade, while it reboots.

As of Build 406, we have added a checksum file to the update process.

  • You will need both the .img file and the .crc file to update.

This procedure works for all types of OLPC hardware:

  • including A-test boards (but not for firmware more recent than Q2C18);
  • most B1 (see workaround below); and
  • all B2 laptops.

It has only been tested with Open Firmware:

System Update Procedure

Before you begin, plug in your machine and ensure the battery is charged. It is very important that the update process not be interrupted. It will take about 2 minutes and 15 seconds total.

Also, before you begin, get a USB flash key or disk with at least 300 MiB of free space in the primary partition.

  • It doesn't have to be partitioned at all.
  • The filesystem should be FAT (like a factory-formatted device).
  • It will not work if it is partitioned such that the partition type code says "83" (Linux ext2 or ext3), even if the actual filesystem inside the partition is FAT.


(1) Download the fth script (olpc-auto.zip).

(2) unzip olpc-auto.zip at the root of the USB flash key or disk drive, thus creating a directory called boot.

  • If you drag and drop the files from the zip archive, you'll have to create the boot directory manually on the flash or disk drive.
  • There will be two files in the boot directory initially: olpc.fth and q2c18.rom.

(3) Download the latest build image, and its checksum file.

  • If you want a stable build, download the the latest stable build
    • The filesystem image is called olpc-redhat-stream-development-build-NNN.NN-DDDDDDDD_TTTT-devel_jffs2.img (with the "NNN.NN" replaced by the build number, and the D's and T's replaced with the date and time of the build). The checksum file has the same name, plus the extension .crc.
    • After downloading these files, rename the image to osNNNNN.img and the checksum to osNNNNN.crc. For instance, if you downloaded build 406.15, you would rename the files to os40615.img and os40615.crc. Copy the renamed files to the "boot" directory on your USB flash key or disk drive.
  • For an unstable development build, download the the latest unstable development build.
    • The filesystem image is called osNNN.img (with "NNN" replaced by the build number) and the checksum file is called osNNN.crc. Download them and save them both to the "boot" directory on your USB flash key or disk drive.
    • If you are downloading a build earlier than Build 530, the files on the download site will have longer names, and you will need to rename them, as in the instructions for the stable builds above. For instance, if you want to download Build 528, you would download olpc-redhat-stream-development-build-528-20070720_0056-devel_jffs2.img, and rename it to os528.img, and likewise for its .crc file.

(4) As noted in Step 2 above, one of the files in the boot directory should be the latest firmware image (q2c18.rom).

  • If the Firmware page lists a newer firmware release, download it to the boot directory.
    • The filename should be qZZZZ.rom, where the Z's are the firmware release number in hexadecimal (which means it uses the letters A-F as well as the numbers 0-9).

(5) There should now be at least four files in the directory named boot on your USB key or disk for the automatic update to occur: q2c18.rom; osNNN.img; osNNN.crc; and olpc.fth, where the NNNs are the build number to which you are updating.

  • Do not use a flash key or disk for which there have been any errors reported during unzipping: the files may be damaged. As a further safeguard, the firmware checks the integrity of the flash image before reflashing.
    • The CRC file is required even though earlier firmware did not check for the CRC file.

(6) Insert the USB key or disk into the machine or plug in the USB disk drive.

  • If you have Open Firmware Q2C11 or later, hold down any one of the game keys on the bezel above the power button, while you press the power button to turn on the laptop; then release the game keys when the screen lights up.
  • If you have Open Firmware before version Q2C11, just turn on the power without pressing a game key.
  • If your USB device is a harddisk instead of flash, you may need to interrupt the Open Firmware boot sequence by pressing the Esc key (the upper left key on the keyboard, marked with an X in a circle), waiting a moment, then entering probe-usb2. You should see additional entries compared to the initial list that Open Firmware displayed. Then you can enter boot and the update should proceed. This is because many external hard drives take a long time to come ready. Recent firmware should fix this issue, however.

(7) A sample transcript of the update procedure is shown in following section.

  • NAND flash always has some bad blocks. You will see Skipping bad block messages during writing NAND flash. These are normal; they are informing you of the bad blocks that will never be used by Linux.

(8) The system will automatically boot into the new system image and perform activation using the activation lease stored on the USB key during autoreinstallation. DO NOT REMOVE THE USB KEY until you've reached the sugar "XO" screen, or the activation process will fail.

  • If anything goes wrong DO NOT TURN OFF THE MACHINE but please get help from OLPC, preferably immediately on IRC or by email.

(9) Congratulations: you are finished! Power the machine down and remove the USB key.

Transcript of System Update

Release the game key to continue
OLPC B1, 256 MiB memory installed, S/N Unknown
Open Firmware  CL1   Q2C08  Q2C

USB2 devices:
/pci/usb@f,5/wlan@3,0
/pci/usb@f,5/scsi@1,0
/pci/usb@f,5/scsi@1,0/disk
USB1 devices:
Type the Esc key to interrupt automatic startup
Boot device: /usb/disk:\boot\olpc.fth  Arguments:
Checking existing OS image on NAND FLASH
Existing OS build is 353 .0

Updating OS image on NAND FLASH from build 353 .0 to build 536 .0
Erasing...
1800
Skipping bad block at 0xc20000 = page 0x1840 = eblock 0x61
3ff40
Writing 701 blocks
80b
Done
Existing firmware version is q2c08

Updating firmware
Reading disk:\boot\q2c18.rom
Got firmware version: CL1  Q2C18  Q2C
Checking integrity ...
SPI FLASH is type 13 - Spansion, Winbond, or ST
Merging existing manufacturing data
Erasing
0
Writing
ff000
...
Powering off

In most cases, the system will boot automatically after the firmware or disk image is updated.

Possible Problems

  • The filenames you chose for the build images violate the 8.3 character restriction for FAT filesystems. Solution: use shorter filenames.
  • The image on the laptop has a higher build number than the image on the USB flash. Solution: use copy-nand as per the instructions below.
  • It is better if the USB disk is not partitioned. If it is partitioned:
    • The partition type must agree with the filesystem type; a FAT filesystem inside a partition marked ext2 won't work
    • The updater files should be in the partition that is marked as "bootable", or if there isn't one, in the first partition.
  • The main files (olpc.fth, osNNN.img, osNNN.crc, and q2XXX.rom) must be in the boot/ subdirectory.
  • The current Open Firmware releases do not support USB keys that identify themselves as class "mass_storage/removable" -- as opposed to the more common "mass_storage/scsi", which is supported. (A fix for this problem is in the release pipeline, but that doesn't help for upgrading from existing firmware.) The way to check for this is to insert your USB key, power-on the system and stop the auto-boot by typing the Esc key (upper left key) at the countdown. Then look at the list of "USB2 devices". If you see an entry like "/pci/usb@f,5/removable@1,0", your disk has the problem. (If you are running an old version of OFW that does not display the "USB2 devices" list automatically, type "show-devs /usb" to see the list.) The workaround procedure is below.
  • The current firmware also fails with USB devices whose hardware sector size is not 512 bytes. To determine the sector size of your device, you can use fdisk on the device under Linux, and it will tell you when it first accesses the device if the sector size is not 512. The workaround is the same as for the "removable" problem, i.e. the procedure below.
  • Many Multi-Function devices do not work.
  • If during the upgrade you see the following message, try renaming the file olpc.7th in the boot directory of the update image to olpc-boot.7th.
Trying startup script disk:\boot\olpc-boot.7th
Can't open boot device

Workaround for LinuxBIOS or Insyde BIOS

If you are running LinuxBIOS, this process will probably not work (it has not been tested). The old version of this procedure may work for you.

If you are still running Insyde BIOS, you will first have to upgrade the firmware using procedures described elsewhere.

Workaround for old B1 systems

If you have a B1 system that has never been upgraded, it is very important to use this page's Autoreinstallation procedure for your first update; do not try to use the new "netnandwrite" tool first. The reason is that this procedure automatically fixes a manufacturing error in the identification data that was stored in the system firmware FLASH, and updates the firmware, neither of which is done by the network-based tool. Also, some old firmware will not update with the auto-update script. If the standard procedure above doesn't update, instead, follow these steps:

  1. Insert the autoupdater key;
  2. boot up the laptop and when it says "Press a key to interrupt" then press any key;
  3. at the Ok prompt type "flash disk:\boot\q2c18.rom". The machine will turn off when finished.
  4. power up again and boot the autoupdater normally; (It will reflash the NAND with the new build.)

Downgrading

Note: DO NOT DOWNGRADE Q2Cxx firmware to Q2Bxx firmware. This will destroy the manufacturing information. For details, see Firmware.

If you are trying to load a build that is older than the one on the XO, you will get a message that the software is up to date. Follow this procedure to first load an older version and then try the upgrade again:

  1. In this example you have already loaded build 528 and need to try loading the same one again. Find an earlier build such as 515 (known to be good). Download the .img and .crc files onto a USB stick. They can be at the root but the two files have to be in the same directory.
  2. Boot up the laptop by pressing the power button and hold down the gamepad X button.
  3. When the message asks you to stop pressing it, let go.
  4. Then press the escape key when it gives you 3 seconds to stop the rest of the boot.
  5. From this OK prompt you should be able to type: copy-nand u:\nand515.img (use the full path if you didn't copy it into the root.)
  6. Assuming that started correctly you will end up with a 515 build. You can power down and then proceed to upgrade with the newer files on your usb stick for the new upgrade procedure.


(Note: After you've downgraded you might want to remove the 515 build from your USB stick, especially if you put it on the \boot directory of your usb stick. It is important that you have the correct .fth, .img, and .crc in the boot directory of the usb in order to upgrade properly with activation. Having more than one .img in there might cause problems.)