Jump to content

Problem: I can not create a UEFI bootable ISO image


ajgor

Recommended Posts

The boot catalog is part of the eltorito specs and that's just for optical discs.

 

Nothing you've uploaded is bootable as there simply isn't enough of it. I booted the ISO you started with... Gandalfs one from the link you provided early on. I think it's almost 3GB in size or something.

Link to comment
Share on other sites

Oh my, this is getting frustrating... But I think I've made some progress.

 

It seems that VirtalBox is somehow more strict about EFI than VMware. I can not boot on VirtualBox from the source image Gandalfs Win8.1U1SE_x64 updateable final.iso, no way.

 

I played a bit more with mkisofs. Before I was running mkisofs on USB stick created from the source image by Rufus. This works fine, but when I try to just use the mounted source image or source image extracted to a a directory on hard disk, it does not work. It seems that Rufus adds something to the USB whet is necessary on VirtualBox to boot in EFI mode.

 

I was then workinng on Windows 10 home official ISO (which boots to Windows installer) and on Windows PE ISOs created by AOMEI backupper as bootable media (rescue disks). AOMEI can generate a bootable disk based on Linux kernel or on Windows PE (the last one bootable either in BIOS or UEFI mode). This image is nice to play with because it is relatively small (below 300 MB).

 

Both disks (Win 10 and AOMEI Win PE/UEFI) can be booted from VirtualBox.

 

By mkisofs, I can create UEFI bootable image for VirtualBox from UEFI bootable ISO created by AOMEI Backupper. This can be done either from windows-mounted ISO image or from a directory where the image is extracted beforehand. If I also add files necessary for legacy boot (/bootmgr in addition to /bootmgr.efi  and boot/etfsboot.com in addition to boot/efisys.bin) then I can create either bios, uefi or double bootable ISO.

 

mkisofs always creates the boot.catalog file, but original UEFI bootable ISOS (Windows 10 Home and APMEI Win PE / UEFI) didn't contain that file. mkisofs can be run with paremeters -hide boot.catalog, but the file was still added to the ISO image.

 

So, I tried to create an UEFI bootable ISO image by ImgBurn from AOMEI image and it was finally successful, I could UEFI-boot it on VirtualBox. I used the settings that you suggested (Restrictions & ISO9660 from 1999, Options/Include hidden, Include system files, UDF-Disable unicode, 2880 sectors to load). In mkisofs I can skip this argument (then it loads the whole image, which is default).

 

Now, what concerns VirtualBox, it seems that when source image can not be booted in UEFI mode, the image generated from the mounted or extracted source image is also not UEFI bootable, either when creating the image with mkisofs or by ImgBurn. The source image Gandalfs Win8.1U1SE_x64 updateable final.iso could not be booted in UEFI on VirtalBox, but when I created a bootable USB from this image using Rufus, it could be booted in UEFI mode on VirtualBox. It seems that Rufus fixes something that is needed by VirtualBox to boot in UEFI mode, but was not included with the source image. Then, when creating a new image by mkisofs from that USB, everything was OK, but when creating it from the mounted or extracted original, the image did not boot in UEFI mode.

 

I still have to try whether I can use ImgBurn to create an UEFI bootable ISO from the USB stick created by Rufus, now that I know which settings to apply.

Link to comment
Share on other sites

You may find it's buggy rather than strict. As I said, booting is not really the problem here. It 'boots' ok (the el Torito part), it just falls over after that. Still, there's no way to know for sure I guess unless you ask the virtualbox developers to look into why that Gandalf image won't fully load.

 

You don't appear to need iso9660 at all as it worked fine for me with just udf selected - and that's how the Windows installation discs have been built for ages now.

 

I read that for uefi, if the 'sectors to load field' in the boot catalog is 0 or 1, it uses the size in the FAT partition boot sector (first 512 bytes of the boot image).

The value within the boot sector is exactly what I told you earlier - 2880. So basically, you can use any of those 3 values and should end up with the same result.

Link to comment
Share on other sites

OK, thanks.

One interesting thing is if I created an UEFI bootable ISO by mkisofs form the USB stick, it worked. When I copied contents of the USB stick to a directory and created ISO image from that directory (using mkisofs with exactly the same parameters except the source), the ISO image was not UEFI bootable. Do you know what might be the reason for this?

Link to comment
Share on other sites

Update:

I tried to create an UEFI bootable ISO from the USB stick (containing contents of the source image Gandalfs Win8.1U1SE_x64 updateable final.iso transferred to USB by Rufus), but it did not boot in UEFI. I used the same settings as when creating UEFI ISO from the AOMEI backupper's image. Screenshots of settings are in the posts_3 directory.

Strange, I really thought it would work now.

Link to comment
Share on other sites

OK, thanks.

One interesting thing is if I created an UEFI bootable ISO by mkisofs form the USB stick, it worked. When I copied contents of the USB stick to a directory and created ISO image from that directory (using mkisofs with exactly the same parameters except the source), the ISO image was not UEFI bootable. Do you know what might be the reason for this?

Unless you missed something in copying the files over... not a clue.

 

When you say 'not bootable', did it error out with that BCD issue again or did it really not boot at all - as if you hadn't mounted the image at all?

Link to comment
Share on other sites

My reasoning about what causes the problem was obviously wrong. A simple explanation would be that bootmgr can not properly load the kernel because the BCD is corrupted or wrongly configured (error report states Error 0xc000000e, Windows failed to start. File: \EFI\Microsoft\Boot\BCD).

 

However, the BCD was exactly the same on images that could not boot (the source Gandalfs Win8.1U1SE_x64 updateable final.iso) and on those that could (e.g. TEST_double_mkisofs_OK.ISO, which was created by the first one using Rufus and mkisofs).

All files that could be related to booting and OS start were the same in both images, except the boot.catalog. But as as I understand, boot.catalog is not used after the bootmgr starts?

 

When I finally created the ISO that booted normally by ImgBurn, it was with the UDF file system instead of ISO9660 + UDF. Everything looks the same when I compare this image with the one that fails to boot (created in the same way, except with ISO9660 + UDF). Files in the root and in directoies possibly involved in booting (boot, efi, bcdw, sources) are exactly the same, both images don't contain boot.catalog. Yet one boots well (the one with UDF) and with the other one, Windows boot manager reports Error 0xc000000e related to BCD.

 

This looks mysterious to me, do you have any possible explanations?

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.