# Balena device os-update error

**URL:** <https://forums.balena.io/t/balena-device-os-update-error/35289>\
**Category:** openBalena\
**Tags:** support, raspberrypi3, docker\
**Created:** [October 2, 2019, 3:29pm UTC](https://forums.balena.io/t/balena-device-os-update-error/35289 "2019-10-02T15:29:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![edorgeville](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/edorgeville/32/3993_2.png) [@edorgeville](https://forums.balena.io/u/edorgeville)\
**Post date:** [October 2, 2019, 3:29pm UTC](https://forums.balena.io/t/balena-device-os-update-error/35289/1 "2019-10-02T15:29:52Z")

</div>

Hi,  
We are running a self-hosted instance of _openBalena_.  
Using the _balena CLI_, I can’t seem to be able to run `balena device os-update` in order to update the host OS of my device:

```auto
$ balena device 88f5854
== TEST 01
ID: 23
DEVICE TYPE: raspberrypi3
STATUS: inactive
IS ONLINE: true
IP ADDRESS: <redacted>
APPLICATION NAME: <redacted>
UUID: <redacted>
COMMIT: <redacted>
SUPERVISOR VERSION: 9.15.7
OS VERSION: balenaOS 2.38.0+rev1
DASHBOARD URL: <redacted>

$ DEBUG=1 balena device os-update 88f5854
[debug] original argv0="C:\Program Files\nodejs\node.exe" argv=[C:\Program Files\nodejs\node.exe,C:\Program Files\nodejs\node_modules\balena-cli\bin\balena,device,os-update,88f5854] length=5
? Target OS version 2.43.0+rev1.prod (recommended)
? Host OS updates require a device restart when they complete. Are you sure you want to proceed? Yes
BalenaRequestError: Request error: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /config</pre>
</body>
</html>

    at C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\balena-request\build\request.js:197:17
    at tryCatcher (C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\bluebird\js\release\promise.js:517:31)
    at Promise._settlePromise (C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\bluebird\js\release\promise.js:574:18)
    at Promise._settlePromise0 (C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\bluebird\js\release\promise.js:619:10)
    at Promise._settlePromises (C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\bluebird\js\release\promise.js:699:18)
    at _drainQueueStep (C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\bluebird\js\release\async.js:138:12)
    at _drainQueue (C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\bluebird\js\release\async.js:131:9)
    at Async._drainQueues (C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\bluebird\js\release\async.js:147:5)
    at Immediate.Async.drainQueues [as _onImmediate] (C:\ProgramData\nvm\v12.7.0\node_modules\balena-cli\node_modules\bluebird\js\release\async.js:17:14)
    at processImmediate (internal/timers.js:439:21)
    at process.topLevelDomainCallback (domain.js:126:23)

If you need help, don't hesitate in contacting our support forums at
https://forums.balena.io

For bug reports or feature requests, have a look at the GitHub issues or
create a new one at: https://github.com/balena-io/balena-cli/issues/

(node:43132) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

```

Any help is greatly appreciated.

Thanks!

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [October 2, 2019, 4:04pm UTC](https://forums.balena.io/t/balena-device-os-update-error/35289/2 "2019-10-02T16:04:08Z")

</div>

Hi,  
We currently only support hostOS updates using the CLI on balena-cloud and not on open-balena.  
I will open an internal issue for this though to be discussed internally and give you a note once it is released.

Kind regards,  
Thodoris

---

<div class="post-metadata">

**Author:** ![edorgeville](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/edorgeville/32/3993_2.png) [@edorgeville](https://forums.balena.io/u/edorgeville)\
**Post date:** [October 2, 2019, 4:04pm UTC](https://forums.balena.io/t/balena-device-os-update-error/35289/3 "2019-10-02T16:04:44Z")

</div>

Good to know. A not in the CLI docs would be awesome. Thanks!

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [October 2, 2019, 4:48pm UTC](https://forums.balena.io/t/balena-device-os-update-error/35289/8 "2019-10-02T16:48:53Z")

</div>

That’s indeed a fair request and I will pass it internally for discussion.  
We will again let you know when the docs start having such clarifications.

---

<div class="post-metadata">

**Author:** ![edorgeville](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/edorgeville/32/3993_2.png) [@edorgeville](https://forums.balena.io/u/edorgeville)\
**Post date:** [October 3, 2019, 3:44pm UTC](https://forums.balena.io/t/balena-device-os-update-error/35289/12 "2019-10-03T15:44:12Z")

</div>

Is there another way to run an OS update? Or do openBalena users need to reflash each device every time?

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [October 3, 2019, 5:53pm UTC](https://forums.balena.io/t/balena-device-os-update-error/35289/14 "2019-10-03T17:53:21Z")

</div>

Hi,  
There is no user friendly way to run host OS updated on the current open-balena version, so the general answer is to re-provision the devices.

On the other hand, there is a manual way to update the Host OS of a balenaOS 2.12.0+ device on an open-balena setup,  
but that’s more like a stopgap than a proper solution and it needs some testing from your side before trying in on your fleet.  
You can SSH into the device and then run the following:

```auto
hostapp-update -i resin/resinos:X.Y.Z-rev-devicetype && \
update-resin-supervisor -t vA.B.C && systemctl stop resin-supervisor && \
reboot

```

where the X.Y.Z-rev-devicetype part should be replaced with a proper release tag from [https://hub.docker.com/r/resin/resinos/tags](https://hub.docker.com/r/resin/resinos/tags) ,  
and the vA.B.C should be the supervisor version that we support for that balenaOS version, which you can find by checking the balenaOS changelog:  
[https://github.com/balena-os/meta-balena/blob/development/CHANGELOG.md](https://github.com/balena-os/meta-balena/blob/development/CHANGELOG.md)

This method is lacking lots of tests that the balenaCloud hostOS update mechanism runs,  
so make sure to try this on a test device first that should be exactly the same as the devices of your fleet that you plan to update.

Please also keep in mind that host OS updates are going though some changes that have big effect on how the OS updates are done internally, so this manual method might stop working in newer open-balena versions.  
We are also working towards making OS updates being part of the OS itself, so that the OS along with the supervisor will be eventually be able to update themselves.  
Since we do recognize that OS updates are a fundamental part of the offering, we are committed on providing proper solution for that,  
but we don’t have a concrete timeline, as there are few requirements that touch a many parts of the platform.
