Skip to content

ubuntu container fails with Error: failed to bind /tmp to /run/host/tmp #906

Open

Description

@dabrain34

Describe the bug
I' m trying to "toolbox" an ubuntu 18.04 or a centos based on the last toolbox release. The toolbox works with sid from
https://blogs.gnome.org/alatiera/2021/03/03/toolbox-your-debian/

but fails with

level=debug msg="Binding /tmp to /run/host/tmp"
mount: /tmp: wrong fs type, bad option, bad superblock on /run/host/tmp, missing codepage or helper program, or other error.
Error: failed to bind /tmp to /run/host/tmp

Steps how to reproduce the behaviour

  1. Get Dockerfile from https://github.com/dabrain34/petalinux-centos/tree/main/ubuntu-18.04
  2. podman build -t ubuntu-18:04-toolbox .
  3. toolbox create -c ubuntu-18 --image ubuntu-18:04-toolbox
  4. podman start --attach ubuntu-18
level=debug msg="Running as real user ID 0"
level=debug msg="Resolved absolute path to the executable as /usr/bin/toolbox"
level=debug msg="TOOLBOX_PATH is /usr/local/bin/toolbox"
level=debug msg="Migrating to newer Podman"
level=debug msg="Creating /run/.toolboxenv"
level=debug msg="Monitoring host"
level=debug msg="Path /run/host/etc exists"
level=debug msg="Preparing to redirect /etc/localtime to /run/host/etc/localtime"
level=debug msg="/run/host/etc/localtime is a symbolic link"
level=warning msg="Failed to resolve /run/host/etc/localtime: lstat /usr/share/zoneinfo: no such file or directory"
level=debug msg="/run/host/etc/localtime points to /usr/share/zoneinfo/America/Toronto"
level=debug msg="Prepending /run/host to /usr/share/zoneinfo/America/Toronto"
level=debug msg="Redirecting /etc/localtime to /run/host/usr/share/zoneinfo/America/Toronto"
level=debug msg="Resolved /etc/localtime to /run/host/usr/share/zoneinfo/America/Montreal"
level=debug msg="Creating regular file /etc/machine-id"
level=debug msg="Binding /etc/machine-id to /run/host/etc/machine-id"
level=debug msg="Creating directory /run/systemd/journal"
level=debug msg="Binding /run/systemd/journal to /run/host/run/systemd/journal"
level=debug msg="Creating directory /run/udev/data"
level=debug msg="Binding /run/udev/data to /run/host/run/udev/data"
level=debug msg="Creating directory /tmp"
level=debug msg="Binding /tmp to /run/host/tmp"
mount: /tmp: wrong fs type, bad option, bad superblock on /run/host/tmp, missing codepage or helper program, or other error.
Error: failed to bind /tmp to /run/host/tmp

Expected behaviour
To run properly

Actual behaviour
It fails to start the container

Screenshots

Output of toolbox --version (v0.0.90+)
e.g., toolbox version 0.0.99.2

Output of podman version
e.g.,

Version:            3.0.1
RemoteAPI Version:  1
Go Version:         go1.15.9
OS/Arch:            linux/amd64

Info about your OS
Debian Sid

Additional context
Same issue with centos

Activity

  1. added
    1. Bug
    on Oct 27, 2021
  2. dabrain34 commented on Oct 29, 2021

    @dabrain34
    Author

    My system waw not having a tmpfs mount on /tmp

    This fixes my issue: mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp

  3. debarshiray commented on Nov 15, 2021

    @debarshiray
    Member

    I see that mount --rbind failed with:

    mount: /tmp: wrong fs type, bad option, bad superblock
    on /run/host/tmp, missing codepage or helper program,
    or other error.

    What did /tmp on your host look like before?

    It's probably OK to require that /tmp on the host always be a tmpfs, but I want to understand the failure a bit more before taking any decision.

  4. petraglyph commented on Nov 23, 2023

    @petraglyph
    Contributor

    I'm seeing this issues with both Ubuntu 16.04 and 18.04 regardless on what /tmp is. I have a Debian system, with /tmp as a regular directory (btrfs filesystem), and a Fedora Silverblue system, with /tmp as tmpfs. Both are giving identical errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions