bluerobotics / bluerobotics/BlueOS

[Guide] How to upgrade from older BlueOS

Open
#1,660 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Vue
Stars
453
Forks
151
Avg merge
1d 3h
Merged PRs (30d)
174

Description

## Problem

Older BlueOS versions shipping older blueos-bootstrap (like [beta15](https://hub.docker.com/layers/bluerobotics/blueos-bootstrap/1.1.0-beta.15/images/sha256-3611577a7421d1413e911cd3f54d23fbc34b6cfdce17e6f654a89915c8297cb2?context=explore)) can have problems when trying to upgrade to more recent BlueoS versions, say beta20 or the current master.

The video below shows an attempt in a Raspberry Pi 3, with a beta15 factory (with beta15 bootstrap):

https://user-images.githubusercontent.com/5920286/235496239-14fd4868-f0bd-4b91-ad92-a3955fe710e6.mp4

## Solution

To solve this issue, you need to upgrade blueos-bootstrap to [beta20](https://hub.docker.com/layers/bluerobotics/blueos-bootstrap/1.1.0-beta.20/images/sha256-76de1b29fc2b779b8e5b73a6b3ecc5814ba7d7c0acda090644c77fe714054d1f?context=explore) or a higher version, and then restart your Raspberry Pi. You can achieve this by following these steps:

1. Upgrade blueos-bootstrap to beta20 or a higher version.
2. Restart your Raspberry Pi.

To do so, the following command sequence can be run in the Raspberry Pi terminal (outside BlueOS -- when you `red-pill`):

``` Bash
export BLUEOS_BOOTSTRAP=bluerobotics/blueos-bootstrap:1.1.0-beta.20 ;
docker stop blueos-bootstrap &&
docker rm blueos-bootstrap &&
docker pull $BLUEOS_BOOTSTRAP &&
docker create \
-t \
--restart unless-stopped \
--name blueos-bootstrap \
--net=host \
-v $HOME/.config/blueos/bootstrap:/root/.config/bootstrap \
-v /var/run/docker.sock:/var/run/docker.sock \
-e BLUEOS_CONFIG_PATH=$HOME/.config/blueos \
$BLUEOS_BOOTSTRAP ;
unset BLUEOS_BOOTSTRAP ;
sudo reboot
```

To simplify it, the following command was tailored using the commander to be executed from the top-side computer, considering `blueos.local` as the BlueOS address:
``` Bash
curl -X 'POST' \
'http://blueos.local:9100/v1.0/command/host?command=export%20BLUEOS_BOOTSTRAP%3Dbluerobotics%2Fblueos-bootstrap%3A1.1.0-beta.20%20%3B%20docker%20stop%20blueos-bootstrap%20%26%26%20docker%20rm%20blueos-bootstrap%20%26%26%20docker%20pull%20%24BLUEOS_BOOTSTRAP%20%26%26%20docker%20create%20-t%20--restart%20unless-stopped%20--name%20blueos-bootstrap%20--net%3Dhost%20-v%20%24HOME%2F.config%2Fblueos%2Fbootstrap%3A%2Froot%2F.config%2Fbootstrap%20-v%20%2Fvar%2Frun%2Fdocker.sock%3A%2Fvar%2Frun%2Fdocker.sock%20-e%20BLUEOS_CONFIG_PATH%3D%24HOME%2F.config%2Fblueos%20%24BLUEOS_BOOTSTRAP%20%3B%20unset%20BLUEOS_BOOTSTRAP%20%3B%20sudo%20reboot&i_know_what_i_am_doing=true' \
-H 'accept: application/json' \
-d ''
```

Be aware that it will take a while because the image will be downloaded (approx. 36MB) from the Dockerhub servers to the Pi.

After running the commands, it succeeds:

https://user-images.githubusercontent.com/5920286/235496537-922524a7-2c36-42b3-8af5-10f8024f477d.mp4

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.