Issue with grub-mkrescue: 'mcopy' invocation failed
Posted: Mon Jul 19, 2021 2:59 pm
Hello! I've been following the Bare Bones tutorial and managed to get a functioning "Hello world!" kernel, but I'm having problems with generating an .iso image with grub-mkrescue (this was run on an Arch Linux machine):
Upon using the -v flag, after a very long section (~9K lines) of debug messages, there are the following lines (I'm also attaching the complete log file in case it's of any use):
Another weird things is that I get this error no matter what directory grub-mkrescue receives as input (even directories without a grub.cfg file).
Now, I've tried searching every corner of the internet for info on this error, but all I could find are mailing lists from the 2000's where people report this issue while writing to floppy disks. I also tried looking through the source code of the mtools package but it wasn't particularly enlightening. Am I missing something stupid?
Any help would be greatly appreciated!
Code: Select all
$ grub-mkrescue . -o myos.iso
mcopy: No directory slots
grub-mkrescue: error: `mcopy` invocation failed
Code: Select all
grub-mkrescue: info: kernel_img=0x56134d0283c0, kernel_size=0x15000.
grub-mkrescue: info: the core size is 0x19b44.
grub-mkrescue: info: writing 0x1c000 bytes.
grub-mkrescue: info: copying `/tmp/grub.Z3DpYz/efi/boot/bootia32.efi' -> `/tmp/grub.Z3DpYz/efi/boot/boot.efi'.
grub-mkrescue: info: executing mformat -C -f 2880 -L 16 -i /tmp/grub.A7DwgC/efi.img ::.
grub-mkrescue: info: executing mcopy -s -i /tmp/grub.A7DwgC/efi.img /tmp/grub.Z3DpYz/efi ::/.
mcopy: No directory slots
grub-mkrescue: error: `mcopy` invocation failed
Now, I've tried searching every corner of the internet for info on this error, but all I could find are mailing lists from the 2000's where people report this issue while writing to floppy disks. I also tried looking through the source code of the mtools package but it wasn't particularly enlightening. Am I missing something stupid?
Any help would be greatly appreciated!