Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use the grub-mkrescue command to produce a rescue disk. I invoke it like this:

grub-mkrescue -o grub.iso

This produces the .iso file, but when I try to boot from it using VirtualBox, it says that the boot medium cannot be read. When I open the file with an archiver, the .iso turns out to have just an empty /boot/grub directory.

I also noticed some people using the command like this:

grub-mkrescue -o grub.iso /boot/grub

But then it complains about that directory not existing. (Maybe it is relevant that I'm producing this on a Debian VPS, because I don't have access to an actual Linux PC currently.)

What could be causing this problem? Is it missing the GRUB files to store into the bootable image or am I using the command the wrong way?

share|improve this question
Although the occurrence of this problem is quite rare, I think it is beneficial to keep this question with my own answer for Google searches. – Overv Jun 3 '13 at 9:53

As it turns out, this happens when the system you're running this command on has no (accessible) /boot/grub directory. It will silently fail and produce an empty ISO file.

When running the same command on a normal desktop installation of Linux, the command produces a working bootable image.

share|improve this answer

The following steps produce a working image for me:

  • create a Multiboot hello world main.elf file. GRUB knows how to boot those files (GRUB also knows how to boot the Linux kernel, even though it is not Multiboot)

  • create a iso/boot/grub/grub.cfg file containing:

    menuentry "main" {
        multiboot /boot/main.elf

    Place main.elf under iso/boot/

  • Generate an image and run it:

    grub-mkrescue -o main.img iso
    qemu-system-x86_64 -hda main.img

I have posted the exact code for this example at:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.