Booting in Docker -- Failed to mount tmpfs... freezing

606 views
Skip to first unread message

Julian Foad

unread,
Nov 15, 2016, 10:09:22 AM11/15/16
to UBOS Development
Attempting to run in Docker per instructions on http://ubos.net/quickstart/ :
 
$ cat ~/bin/ubos-docker-yellow
#!/bin/sh
docker run "$@" \
    -i -t \
    --cap-add NET_ADMIN --cap-add NET_BIND_SERVICE --cap-add NET_BROADCAST \
    --cap-add NET_RAW --cap-add SYS_ADMIN \
    -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
    -e container=docker \
    ubos/ubos-yellow /bin/init

$ docker --version
Docker version 1.12.3, build 6b644ec

$ ubos-docker-yellow
Unable to find image 'ubos/ubos-yellow:latest' locally
latest: Pulling from ubos/ubos-yellow

fc20d76d0fd6: Pull complete
Digest: sha256:407a86ffab806cc2094a81a979e14d333f580ece4814fca89af5f449b86cbc86
Status: Downloaded newer image for ubos/ubos-yellow:latest
Failed to mount tmpfs at /run: Permission denied
[!!!!!!] Failed to mount API filesystems, freezing.
Freezing execution.

Host system is Ubuntu 16.04. Docker is the "docker-engine" package, "version 1.12.3, build 6b644ec", following https://docs.docker.com/engine/installation/linux/ubuntulinux/ .

I searched for info about this error and found several references to how running a 'zombie reaper' in docker requires extra privileges, and how the "--cap-add SYS_ADMIN" *should* be enough to enable such permissions in docker 1.12.3... as far as I could understand.

Any ideas?

- Julian

Julian Foad

unread,
Nov 15, 2016, 10:16:30 AM11/15/16
to UBOS Development
p.s. I should explain my goal: I just want to start experimenting with UBOS. I also have been trying the VirtualBox option, and am currently seeking help in getting that working in another thread. I don't really mind where or how I run it; running it locally seems like a good place to start.

Johannes Ernst

unread,
Nov 16, 2016, 1:46:32 AM11/16/16
to ubos...@googlegroups.com
I just tried, and it works for me as it is supposed to.

I have never seen this error message before, and I’m a little at loss how to explain this.

--
You received this message because you are subscribed to the Google Groups "UBOS Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ubos-dev+u...@googlegroups.com.
To post to this group, send email to ubos...@googlegroups.com.
Visit this group at https://groups.google.com/group/ubos-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/ubos-dev/9bcb30c8-7ee0-436d-b83d-793cd22af2ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Julian Foad

unread,
Nov 16, 2016, 5:20:07 AM11/16/16
to UBOS Development
Johannes Ernst wrote:
I just tried, and it works for me as it is supposed to.

I have never seen this error message before, and I’m a little at loss how to explain this.
 
Thank you for trying it. I suppose my Docker installation must be broken, or my whole Ubuntu installation is somehow broken. I will try re-installing Docker, at least.

Julian Foad

unread,
Nov 16, 2016, 9:42:35 AM11/16/16
to UBOS Development
Ugh, very frustrating. No joy. Completely removed docker-engine 1.12.3 and its dependencies (apt-get purge --auto-remove docker-engine), and re-installed it. Exactly the same result.

I then installed a fresh copy of Ubuntu 16.04 inside VirtualBox and installed docker in that and tried the same thing. Same result. I tried running the "docker run" command both with and without "sudo": same in each case.

Johannes, please could you confirm what version of Ubuntu and Docker you tested? I am willing to try doing exactly what you did, if it helps.

This is how I installed the VirtualBox VM Ubuntu 16.04:
  • 64-bit, 2 GB RAM, 2 CPUs
  • Acceleration: VT-x/AMD-V, Nested Paging, KVM Paravirtualization
  • Network: 1 adapter, NAT, Paravirtualized
  • Used an Ubuntu 16.04 default installation VM image, originally from 'osboxes.com', with a few changes (install Virtualbox Guest Additions, remove large apps, change username, preferences, etc.).
  • Ubuntu software in this image was last updated in July 2016.
This is how I installed Docker inside the VM:
  • I followed https://docs.docker.com/engine/installation/linux/ubuntulinux/
  • - The "sudo docker run hello-world" test works fine.
  • Of the "Optional configurations":
  • - I created a docker group; then "docker run hello-world" works fine without sudo.
  • - I didn't adjust memory and swap accounting
  • - I didn't enable UFW forwarding
  • - I didn't configure a DNS server (it doesn't seem to need changing)
  • - I didn't configure docker to start on boot (it seems to be set up by the installation anyway)
$ uname -a
Linux osboxes 4.4.0-28-generic #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

 I just hope I can learn something from this experience that we can then document to help other people.

Julian Foad

unread,
Nov 16, 2016, 9:56:33 AM11/16/16
to UBOS Development
Julian Foad wrote:
Ubuntu software in this image was last updated in July 2016.

Yes, I know it would be better if I updated it. (After writing that, I did try to update this VM image, but it crashed while trying to update grub-pc, and now won't boot, and I don't have unlimited time to start again.)

My main (host) Ubuntu 16.04 system, on which I originally reported this issue, *is* up to date.
Reply all
Reply to author
Forward
0 new messages