Skip to content

Intermittent failure of update_image.py with Docker mount: cannot create regular file /mnt/boot/efi #103

@64

Description

@64

Sometimes when running xbstrap run make-image using Docker I get the following error:

$ xbstrap run make-image qemu
xbstrap: Running the following plan:
    run            update-initrd
    run            make-image
    run            qemu
xbstrap: run update-initrd [1/3]
xbstrap: Running ['@SOURCE_ROOT@/managarm/tools/gen-initrd.py', '--triple', '@OPTION:arch-triple@'] (tools: ['cross-binutils']) in Docker
xbstrap: run make-image [2/3]
xbstrap: Running ['@SOURCE_ROOT@/scripts/update-image.py', '--triple', '@OPTION:arch-triple@', '--mount-using', '@OPTION:mount-using@'] (tools: [])
update-image: Running the following plan:
 - mount
 - update file system
 - unmount
update-image: Running action mount ("image" to "mountpoint" using docker)
update-image: Running action update file system (from "system-root" to "mountpoint")
update-image: Updating the image doesn't require root
update-image: Update target has an EFI directory
update-image: Updating the file system...
+ mkdir -p /mnt/boot/managarm
+ install system-root/usr/managarm/bin/eir-stivale /mnt/boot/managarm
+ install -s --strip-program=tools/cross-binutils/bin/x86_64-managarm-strip system-root/usr/managarm/bin/eir-mb1 /mnt/boot/managarm
+ install -s --strip-program=tools/cross-binutils/bin/x86_64-managarm-strip system-root/usr/managarm/bin/thor /mnt/boot/managarm
+ install initrd.cpio /mnt/boot/managarm
+ mkdir -p /mnt/root
+ mkdir -p /mnt/usr/bin
+ mkdir -p /mnt/usr/lib
+ mkdir -p /mnt/var
+ mkdir -p /mnt/dev
+ mkdir -p /mnt/proc
+ mkdir -p /mnt/run
+ mkdir -p /mnt/sys
+ mkdir -p /mnt/tmp
+ mkdir -p /mnt/boot/grub
+ mkdir -p /mnt/home
+ cp /stuff/scripts/grub.cfg /mnt/boot/grub
+ cp /stuff/scripts/limine.cfg /mnt/boot/limine.cfg
+ sed -i 's|@ROOT_UUID@|4C722EAE-4DE0-1E4C-A5E6-8C5E0D62ED3E|g' /mnt/boot/limine.cfg
+ cp /stuff/scripts/limine.cfg /mnt/boot/efi/
cp: cannot create regular file '/mnt/boot/efi/': Not a directory
update-image: Action update file system failed with: ('Command "docker ..." failed with code 1',)
update-image: Running action unmount ("/mnt inside of container" using docker)
update-image: Finished running plan.
update-image: 1 step(s) failed.
xbstrap: Action run of task make-image failed

This appears to happen fairly consistently after a reboot, and goes away after re-building the image from scratch (with image_create.sh).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions