When running the following command in WSL (I'm using Windows 11, Ubuntu 20.04), the following command causes the following error to occur.
Disk images can then be generated via
docker run --rm --privileged -v /dev:/dev -v "${PWD}/build":/build aarch64-arch-mkimg <profile>
===> Preparing sources...
--> Importing Arch Linux ARM GPG key...
--> Downloading 'ArchLinuxARM-aarch64-latest.tar.gz'...
--> Verifying 'ArchLinuxARM-aarch64-latest.tar.gz'...
--> Verification passed
--> Extracting 'ArchLinuxARM-aarch64-latest.tar.gz'...
===> Preparing rootfs...
--> Copying base files...
--> Installing chroot scripts...
--> Switching into rootfs...
mount: //build/rootfs/dev/shm: mount point is a symbolic link to nowhere.
dmesg(1) may have more information after failed mount system call.
==> ERROR: failed to setup chroot //build/rootfs
Reason
This is because the Ubuntu /dev/shm points to /run/shm, which does not exist in the Arch Linux image.
Synopsis
When running the following command in WSL (I'm using Windows 11, Ubuntu 20.04), the following command causes the following error to occur.
Reason
This is because the Ubuntu
/dev/shm
points to/run/shm
, which does not exist in the Arch Linux image.See this Arch Linux forum post for more information: https://bbs.archlinux.org/viewtopic.php?id=156970
Solution
Adding
--mount type=tmpfs,destination=/run/shm
to the command to create atmpfs
(RAM based temp, not disk based/tmp
) in the expected location