OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:01 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Issue with grub-mkrescue: 'mcopy' invocation failed
PostPosted: Mon Jul 19, 2021 2:59 pm 
Offline

Joined: Mon Jul 19, 2021 2:26 pm
Posts: 1
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):

Code:
$ grub-mkrescue . -o myos.iso
mcopy: No directory slots
grub-mkrescue: error: `mcopy` invocation failed


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):

Code:
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


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!


Top
 Profile  
 
 Post subject: Re: Issue with grub-mkrescue: 'mcopy' invocation failed
PostPosted: Mon Jul 19, 2021 8:36 pm 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 1593
My guess is that it doesn't like creating the ISO in the same directory it is using as root directory. Try putting the kernel stuff into a separate directory and creating the ISO outside of the ISO directory.

_________________
Carpe diem!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 80 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group