Skip to content

Tar errors "No space left on device" on Ubuntu 24.04.1 LTS #11

@qinidema

Description

@qinidema

When running (at least) on Ubuntu 24.04.1 LTS I've got a following error:

tar: root.x86_64/usr/share/locale/bs/LC_MESSAGES/glib20.mo: Wrote only 9728 of 10240 bytes tar: root.x86_64/usr/share/locale/bs/LC_MESSAGES/libsecret.mo: Cannot write: No space left on device tar: root.x86_64/usr/share/locale/bs/LC_MESSAGES/shadow.mo: Cannot write: No space left on device
...etc for nearly all files in arch bootstrap archive.

That's because Ubuntu has TMPDIR environment variable unset, instead XDG_RUNTIME_DIR is set to "/run/user/$uid" (in my case uid was obviously 0), so tmpDir variable in the script got assigned "/run/user/0". In my case that was a mountpoint which was mounted like this:
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=201536k,nr_inodes=50384,mode=700,inode64)

(VPS with a 30GB drive and 2GB RAM). That amount of space was insufficient for bootstrap tar to unpack first at this line.
So to anyone encountered same error the quick fix was to set TMPDIR correctly before running the script:
export TMPDIR=/tmp
Then the script worked fine.

The more deep fix could be either unpacking to the mountpoint right away, without temp dir first, or taking more handling on the tmpDir script variable and the associated envitonment variables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions