# Facing issue in booting Balena OS

**URL:** <https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060>\
**Category:** balenaOS\
**Created:** [May 9, 2019, 11:44am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060 "2019-05-09T11:44:44Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![imrehg](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/imrehg/32/36_2.png) [@imrehg](https://forums.balena.io/u/imrehg)\
**Post date:** [May 21, 2019, 7:05pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/96 "2019-05-21T19:05:42Z")

</div>

Generally we’d recommend checking things with a web search, Yocto is a very widely documented project (and pretty big too, so we cannot document everything). Have asked our device support team as well to chime in with any further points, though, but that will likely happen a little while later.

There’s also our “How to build your own image” page on the balenaOS site that might be helpful for getting an actual image out of the process: [https://www.balena.io/os/docs/custom-build/](https://www.balena.io/os/docs/custom-build/)

---

<div class="post-metadata">

**Author:** ![Sharvin26](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sharvin26](https://forums.balena.io/u/Sharvin26)\
**Post date:** [May 22, 2019, 5:26am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/98 "2019-05-22T05:26:08Z")

</div>

> [@imrehg](#):
>
> Generally we’d recommend checking things with a web search, Yocto is a very widely documented project (and pretty big too, so we cannot document everything). Have asked our device support team as well to chime in with any further points, though, but that will likely happen a little while later.
> 
> There’s also our “How to build your own image” page on the balenaOS site that might be helpful for getting an actual image out of the process: [Building Your Own Image | balenaOS](https://www.balena.io/os/docs/custom-build/)

Okay so just to confirm I can’t add a custom\_overlay ( i.e. a DTBO file ) on the current Host OS provided by the Balena.

I need to build an image to make the custom dtbo usable. as [spanceac](https://forums.balena.io/u/spanceac) mentioned here:

```auto
My speculation for the reason that you don’t see the dtbo file there, is the way we use aufs to mount the rootfs and is not an u-boot bug.

If you want your dtbo in the /boot/overlays folder you need to create your own build.

Clone this repo:
https://github.com/balena-os/balena-beaglebone.

Patch this recipe to add your overlay source:
https://github.com/balena-os/balena-beaglebone/blob/master/layers/meta-balena-beaglebone/recipes-kernel/linux/bb-org-overlays.bb.

Then you can build an image and use it on your board and your dtbo should be usable.

Regards!

```

Also is it possible if I enable device support someone from Balena support team verify the problem?

> [@tgudlek](#):
>
> Oh, sorry, I assumed you’re already using Balena Cloud. But yes – in order for us to connect to the device and do our diagnostics you’d have to use the device on Balena Cloud. Otherwise, we’re bound to this kind of back and forth. I pinged the relevant engineer that might be able to assist you. Cheers!

Thanks for the Response.

---

<div class="post-metadata">

**Author:** ![spanceac](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@spanceac](https://forums.balena.io/u/spanceac)\
**Post date:** [May 22, 2019, 12:28pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/99 "2019-05-22T12:28:19Z")

</div>

Hey @Sharvin26,

Hi,

Enabling support access can’t help us solve this problem because we can’t access your board’s u-boot console because your board is not booted.

We need to have the OS booted for support access.

I created an example on how to add your custom dtbo to the build. Let’s assume you have a dts named: `your_custom.dts`.

1. Add your dts file in this folder from the cloned repo `layers/meta-resin-beaglebone/recipes-kernel/linux/bb-org-overlays`

2. Add in `layers/meta-resin-beaglebone/recipes-kernel/linux/bb-org-overlays.bb` recipe this patch:

```auto
--- a/layers/meta-resin-beaglebone/recipes-kernel/linux/bb-org-overlays.bb
+++ b/layers/meta-resin-beaglebone/recipes-kernel/linux/bb-org-overlays.bb
@@ -15,6 +15,7 @@ SRC_URI = " \
     file://BB-CAN0-00A0.dts \
     file://BB-I2C2N-00A0.dts \
     file://SDS-CAPE-00A0.dts \
+ file://your_custom.dts \
     "
 
 S = "${WORKDIR}/git"
@@ -28,6 +29,7 @@ do_compile_prepend () {
     cp ${WORKDIR}/BB-CAN0-00A0.dts ${S}/src/arm/
     cp ${WORKDIR}/BB-I2C2N-00A0.dts ${S}/src/arm/
     cp ${WORKDIR}/SDS-CAPE-00A0.dts ${S}/src/arm/
+ cp ${WORKDIR}/your_custom.dts ${S}/src/arm/
 }

```

1. Now build:  
`./balena-yocto-scripts/build/barys -m beaglebone -b my_custom_bbb_build`

After build finishes, in the folder `my_custom_bbb_build/tmp/deploy/images/beaglebone` you will find an image that you should flash it to the SD card.  
The image name should be of type: `resin-image-beaglebone.resinos-img` and it’s a symlink to a bigger file.

If you want, you can create a PR with steps 2 and 3 in the github repo and this way your dtbo will always be in the official Balena images and you will not need to do your custom builds.

---

<div class="post-metadata">

**Author:** ![spanceac](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@spanceac](https://forums.balena.io/u/spanceac)\
**Post date:** [May 22, 2019, 12:29pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/100 "2019-05-22T12:29:26Z")

</div>

Correction: I wanted to say to create a PR with steps 1 and 2, not 2 and 3

---

<div class="post-metadata">

**Author:** ![spanceac](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@spanceac](https://forums.balena.io/u/spanceac)\
**Post date:** [May 22, 2019, 12:38pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/101 "2019-05-22T12:38:36Z")

</div>

If creating the PR is a problem to you, just send us the dts contents and we will PR it for you

---

<div class="post-metadata">

**Author:** ![Sharvin26](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sharvin26](https://forums.balena.io/u/Sharvin26)\
**Post date:** [May 22, 2019, 12:42pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/103 "2019-05-22T12:42:34Z")

</div>

Thanks for the detail explanation. I’ll test this and inform you about the PR as per the results

---

<div class="post-metadata">

**Author:** ![spanceac](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@spanceac](https://forums.balena.io/u/spanceac)\
**Post date:** [May 22, 2019, 12:46pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/104 "2019-05-22T12:46:03Z")

</div>

Ok we’re waiting for your reply

---

<div class="post-metadata">

**Author:** ![Sharvin26](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sharvin26](https://forums.balena.io/u/Sharvin26)\
**Post date:** [May 22, 2019, 4:34pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/107 "2019-05-22T16:34:29Z")

</div>

> [@spanceac](#):
>
> Ok we’re waiting for your reply

Right now I am building the Image. Once it is done I’ll test it and then I’ll send the PR.

---

<div class="post-metadata">

**Author:** ![Sharvin26](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sharvin26](https://forums.balena.io/u/Sharvin26)\
**Post date:** [May 23, 2019, 1:04pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/109 "2019-05-23T13:04:14Z")

</div>

Hey I am getting issue while Building the system:

> [@spanceac](#):
>
> Ok we’re waiting for your reply

```auto
ERROR: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_fetch: Fetcher failure: Fetch command export DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-hjBTuCq9KU"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/user/Desktop/Balena_OS/balena-beaglebone/layers/poky/scripts:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot/usr/bin/crossscripts:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/usr/sbin:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/usr/bin:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/sbin:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/recipe-sysroot-native/bin:/home/user/Desktop/Balena_OS/balena-beaglebone/layers/poky/bitbake/bin:/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/hosttools"; export HOME="/home/user"; LANG=C git -c core.fsyncobjectfiles=0 clone --bare --mirror git://github.com/beagleboard/linux.git /home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/downloads/git2/github.com.beagleboard.linux.git --progress failed with exit code 128, output:
Cloning into bare repository '/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/downloads/git2/github.com.beagleboard.linux.git'...
remote: Enumerating objects: 385, done.        
remote: Counting objects: 100% (385/385), done.        
remote: Compressing objects: 100% (134/134), done.        
fatal: read error: Connection timed out7), 1.03 GiB | 102.00 KiB/s      
fatal: early EOF
fatal: index-pack failed

ERROR: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_fetch: Fetcher failure for URL: 'git://github.com/beagleboard/linux.git;protocol=git;tag=4.14.53-ti-r62;nobranch=1'. Unable to fetch URL from any source.
ERROR: linux-beagleboard-4.14.53+gitAUTOINC+f77e7b554e-r22b do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/tmp/work/beaglebone-poky-linux-gnueabi/linux-beagleboard/4.14.53+gitAUTOINC+f77e7b554e-r22b/temp/log.do_fetch.10893
ERROR: Task (/home/user/Desktop/Balena_OS/balena-beaglebone/my_custom_bbb_build/../layers/meta-balena-beaglebone/recipes-kernel/linux/linux-beagleboard_4.14.bb:do_fetch) failed with exit code '1'

```

Any idea what might be going wrong?

**Note** : I am using Ubuntu 16.04 LTS and also I am not running the service as root. I am running it as normal user and docker also has been added to that group. Also all the dependencies have been installed.

---

<div class="post-metadata">

**Author:** ![spanceac](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@spanceac](https://forums.balena.io/u/spanceac)\
**Post date:** [May 23, 2019, 1:13pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/110 "2019-05-23T13:13:52Z")

</div>

hey @Sharvin26,

It’s very good that you use Ubuntu 16.04.  
As well, is good that you run the build as a normal user and not root.

This seems like a networking issue.  
You received a timeout when trying to pull the sources to build the kernel.

Make sure that your Internet connection is good and try again.

Also, you could PR the change without doing the build yourself. Our CI system will automatically create a build from your PR.

Regards!

---

<div class="post-metadata">

**Author:** ![Sharvin26](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sharvin26](https://forums.balena.io/u/Sharvin26)\
**Post date:** [May 23, 2019, 1:23pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/111 "2019-05-23T13:23:19Z")

</div>

Okay I’ll send the PR. Thanks

---

<div class="post-metadata">

**Author:** ![Sharvin26](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sharvin26](https://forums.balena.io/u/Sharvin26)\
**Post date:** [May 23, 2019, 5:45pm UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/113 "2019-05-23T17:45:17Z")

</div>

> [@spanceac](#):
>
> Also, you could PR the change without doing the build yourself. Our CI system will automatically create a build from your PR.

I have submitted the PR can you please confirm if it’s right or any changes are needed?

Thanks

---

<div class="post-metadata">

**Author:** ![shaunmulligan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/shaunmulligan/32/34_2.png) [@shaunmulligan](https://forums.balena.io/u/shaunmulligan)\
**Post date:** [May 24, 2019, 8:06am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/115 "2019-05-24T08:06:13Z")

</div>

Thanks for the PR @Sharvin26 , I have added some of the team as reviewers there and they will comment on the PR if there are any changes needed. Thanks again!

---

<div class="post-metadata">

**Author:** ![Sharvin26](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sharvin26](https://forums.balena.io/u/Sharvin26)\
**Post date:** [May 24, 2019, 8:23am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/117 "2019-05-24T08:23:29Z")

</div>

Your welcome. Glad to contribute.

---

<div class="post-metadata">

**Author:** ![spanceac](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@spanceac](https://forums.balena.io/u/spanceac)\
**Post date:** [May 24, 2019, 11:32am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/118 "2019-05-24T11:32:23Z")

</div>

hey @Sharvin26,

Your commit contents looks good but some changes are needed in the name.

Left you comments in gh.

Regards!

---

<div class="post-metadata">

**Author:** ![Sharvin26](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sharvin26](https://forums.balena.io/u/Sharvin26)\
**Post date:** [May 24, 2019, 11:34am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/119 "2019-05-24T11:34:53Z")

</div>

Thanks for informing. I have updated the commit text.

---

<div class="post-metadata">

**Author:** ![Sharvin26](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Sharvin26](https://forums.balena.io/u/Sharvin26)\
**Post date:** [May 29, 2019, 5:24am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/123 "2019-05-29T05:24:52Z")

</div>

Hello, @spanceac I wanted to confirm if the changes in PR are available to download for Balena OS for Beaglebone?

---

<div class="post-metadata">

**Author:** ![spanceac](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@spanceac](https://forums.balena.io/u/spanceac)\
**Post date:** [May 30, 2019, 8:29am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/124 "2019-05-30T08:29:52Z")

</div>

Hi @Sharvin26,

I will deploy today to staging environment and you can download the image from there.

I will let you know when it’s ready.

---

<div class="post-metadata">

**Author:** ![spanceac](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@spanceac](https://forums.balena.io/u/spanceac)\
**Post date:** [May 30, 2019, 9:48am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/125 "2019-05-30T09:48:44Z")

</div>

Hey @Sharvin26,

You can now download from [https://dashboard.balena-staging.io/](https://dashboard.balena-staging.io/) the `v2.33.0+rev2` image which contains your dtbo.

Regards!

---

<div class="post-metadata">

**Author:** ![spanceac](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@spanceac](https://forums.balena.io/u/spanceac)\
**Post date:** [May 30, 2019, 9:49am UTC](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060/126 "2019-05-30T09:49:10Z")

</div>

After we will run our test suite this image will be available in production dashboard also.

[Previous page](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060.md?page=2)

[Next page](https://forums.balena.io/t/facing-issue-in-booting-balena-os/8060.md?page=4)
