When using mkisofs to create a bootable image, must all required files be placed in the same directory?

mkisofs -V "BOOTISO" -A "FirPE Boot ISO" -U -max-iso9660-filenames -D -R -J -joliet-long -hide-joliet boot.catalog -no-emul-boot -boot-load-size 4 -b grldr -eltorito-alt-boot -no-emul-boot -eltorito-platform efi -eltorito-boot efiboot.img -o ~/e
fiboot.iso .

I don’t want to put the boot file grldr and efiboot.img into the generated iso9660 file system.
mkisofs: Uh oh, I cant find the boot image '../grldr' inside the target tree.

In fact, it is not necessary to put these two files in the iso9660 file system. I deleted these two files using ultraiso under Windows, and my ISO image can still be started.

Is there any way to bypass this restriction?

Or other tools?

… just parsing your command line … and checking against the mkisofs manual page man mkisofs:

    Allows "Untranslated" filenames, completely violating the iso9660 standards described above. Forces on the -d, -l, -N, -allow-leading-dots, -relaxed-filenames, -allow-lowercase, -allow-multidot and -no-iso-translate flags. It allows more than one '.' character in the filename, as well as mixed case filenames. This is useful on HP-UX system, where the built-in CDFS filesystem does not recognize ANY extensions. Use with extreme caution.
    Do not use deep directory relocation, and instead just pack them in the way we see them.
    If ISO9660:1999 has not been selected, this violates the ISO9660 standard, but it happens to work on many systems. Use with caution.
    Allow Joliet filenames to be up to 103 Unicode characters. This breaks the Joliet specification - but appears to work. Use with caution. ...
-boot-load-size load_sectors
    Specifies the number of "virtual" (512-byte) sectors to load in no-emulation mode. The default is to load the entire boot file. Some BIOSes may have problems if this is not a multiple of 4.

you specified “4” - perhaps omit that and use the default?


is used two times in your command

-b grldr

you gave it on the command line, but you removed it from your source (is what I understood)
… omit this option, so it won’t look for that non existing file? …

no actual advise :man_shrugging: