Skip to content

Commit 680a96a

Browse files
Merge pull request #9 from bitcoin3us/docs/updating-and-reinstall-warning
Add Updating page: OTA is the supported path; reflashing can erase data
2 parents 896457c + a500164 commit 680a96a

4 files changed

Lines changed: 55 additions & 0 deletions

File tree

docs/getting-started/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
Get up and running with MicroPythonOS. This section covers installation and supported hardware to help you deploy the OS on your device or desktop.
44

55
- [Running](running.md): Step-by-step guide to install and run MicroPythonOS.
6+
- [Updating](updating.md): How to update safely (and how not to lose your data).
67
- [Supported Hardware](supported-hardware.md): Compatible devices and platforms.

docs/getting-started/running.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ To modify low level things under the hood, consider heading to [OS Development](
1010

1111
Just use the [WebSerial installer at install.micropythonos.com](https://install.micropythonos.com).
1212

13+
Note that the web installer is for **first-time installs**: to update a device that already runs MicroPythonOS, use the built-in OSUpdate app instead — see [Updating](updating.md). Reflashing an already-installed device can erase your apps and settings.
14+
1315
For advanced usage, such as installing development builds without any files, see [Installing on ESP32](../os-development/installing-on-esp32.md).
1416

1517
## Running on desktop

docs/getting-started/updating.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Updating
2+
3+
## The supported way: over-the-air updates
4+
5+
The only supported way to update MicroPythonOS is the built-in **OSUpdate**
6+
app (over-the-air updates). OTA updates write the new OS to the inactive
7+
system partition and leave your storage partition untouched: installed
8+
apps, preferences (WiFi credentials, wallet-display configs, Nostr keys),
9+
and user data are all preserved.
10+
11+
When an update is available, the notification bar offers it, or you can
12+
open the OSUpdate app directly.
13+
14+
## Reinstalling with the web installer is not an update
15+
16+
The [WebSerial installer](https://install.micropythonos.com) performs a
17+
**clean install**, and reflashing a device that already has MicroPythonOS
18+
on it can cost you your data:
19+
20+
- If you select **"Erase device"** during installation, your storage
21+
partition — all apps, settings, and keys — is **certainly** erased.
22+
- Even without erasing, a newer version **may use a different partition
23+
layout** than the one on your device (this can happen from time to time
24+
as MicroPythonOS evolves). In that case the storage partition is
25+
reformatted on first boot, **without any prompt**.
26+
27+
So, just like for any electronics device: **make a backup of important
28+
files before reinstalling the software.** For example, over USB with
29+
[mpremote](https://docs.micropython.org/en/latest/reference/mpremote.html):
30+
31+
```bash
32+
mpremote fs cp -r :/apps :/prefs :/data ./mpos-backup/
33+
```
34+
35+
## Advanced: manual offline update
36+
37+
If a device has no network access, you can apply an update manually by
38+
writing the over-the-air update file (for example
39+
`MicroPythonOS_esp32s3_0.17.3.ota` from the
40+
[releases](https://github.com/MicroPythonOS/MicroPythonOS/releases)) to
41+
the OTA application offsets in flash with esptool. For the esp32s3 build,
42+
for example, the two OTA slots are at `0x20000` and `0x3A0000`:
43+
44+
```bash
45+
python3 -m esptool --chip esp32s3 write_flash 0x20000 MicroPythonOS_esp32s3_0.17.3.ota
46+
```
47+
48+
This writes the same bytes an OTA update would, so the storage partition
49+
is left alone — but it is an advanced action: the offsets differ per
50+
board/build, and writing to the wrong offset can corrupt the device's
51+
filesystem. Making a backup first is strongly advised.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ nav:
4141
- Getting Started:
4242
- Overview: getting-started/index.md
4343
- Running: getting-started/running.md
44+
- Updating: getting-started/updating.md
4445
- Supported Hardware: getting-started/supported-hardware.md
4546
- Apps:
4647
- Overview: apps/index.md

0 commit comments

Comments
 (0)