I've been trying to create a bootable CD/DVD/ISO from a bootable USB flash drive. Google search brought me to try using ImgBurn for this, so I downloaded and installed, it, but it doesn't seem to work in this case.
Just to be clear, I'm trying to create a bootable CD with the Seagate "SeaTools Bootable" package https://www.seagate.com/support/downloads/seatools/, so I can run hard drive diagnostics. No, Seagate does NOT have a downloadable ISO on their web site -- at least not that I can find. Instead, you download a windows executable, which will format your flash drive and copy all the utilities onto it. This flash drive boots up fine on multiple boxes that I've tried. I thought it should be relatively easy to convert this to a bootable CD. Boy, was I wrong about that.
The process I've been using, which seems to be correct from reading the guides is:
Select "Create image file from files/folders"
Add all of the files from the flash drive to the project. (I think this is optional, and just duplicates having the files in the boot image.)
Go to the Labels tab and enter labels
Go to the Advanced | Bootable Disc tab and select "Make Image Bootable".
Go down to the "Extract Boot Image" pane, select the flash drive, and click on the little save icon.
This will create a "BootImage.ima" file.
When that's complete, ImgBurn asks if I "would like to use the boot image file in your current project?" and I click "Yes". This sets the Emulation Type to "Hard Disk" and sets the Boot Image to file I just created.
Optionally, type some text into the "Developer ID" box. It doesn't seem to matter what, if anything is entered there.
Click on the icon to create the ISO.
As I say, this DOES NOT WORK. ImgBurn says is successfully created the ISO and there are no errors messages (log attached), but the resulting ISO is not bootable. If I try to boot it, I just get "Missing operating system". I spent several hours and burned a bunch of useless coasters trying different variations: different sized flash drives, different media, CD versus DVD, trying to boot different computers, different optical drives, trying to boot Virtual Box with the ISO, etc. Nothing worked. Always the same result: "Missing operating system".
Digging down, I found that what the ImgBurn "Extract Boot Image" function does is, it makes a binary copy of the FAT32 partition on the flash drive, but it does not read the MBR (master boot record) from the flash drive. The .ima file produced is a binary disk image, but ImgBurn prepends it's own MBR boot code and creates a partition table in the image de novo. (Background: hard drives are formatted with an MBR at sector 0 which contains the partition table, and -- optionally, if the drive is bootable -- some bootstrap code in bytes 0x0 thu 0x1BD of that sector.) Examining the MBR that ImgBurn writes to the .ima file, the only thing I noticed that seemed off was that the field for the "number of sectors in the partition" in the partition table entry was wrong (see https://en.wikipedia.org/wiki/Master_boot_record#PTE). The number there was the LBA or sector number of the end of the partition, i.e. the start sector plus the size, instead of just the size. This really shouldn't matter; I don't think the bootstrap code looks at that field. In any case it wasn't causing the failure.
When ImgBurn creates the ISO, it does a binary copy of the .ima disc image into the ISO file, without modifying it. Those bytes are stored contiguously in the .iso file, and it's relatively easy to find the location. (In my case, it was always at offset 0x81000.) I verified that the MBR with it's bootstrap code hadn't somehow gotten mangled in that step.
I have some code I wrote a while back to read the MBR of a hard drive or flash drive (actually, the entire "hidden" system area from sector 0 to the start of the FAT partition) and write that to a file. This is how I know that the MBR that ImgBurn writes to the .ima isn't the same.
I used Visual Studio Community Edition's binary editor to open up the ISO file, and copy bytes 0x0 thru 0x1bd from the flash's MBR to the MBR image at offset 0x81000 of the ISO. And that worked! Now the ISO produces a CD that actually is bootable! (Well, OK, it doesn't boot successfully everywhere, but it does boot up on the system I wanted to used it for. And in none of the failure cases am I getting the "missing operating system" error anymore, so those failures must be some other problem. A problem with the payload, not the ISO creation process.)
I don't know why ImgBurn is ignoring the correct (at least in my case) bootstrap code from the source drive and substituting it's own. I assume there I some reason for this. But the boot code that ImgBurn provides is obviously not robust enough to work with any operating system. (The Seagate tools use SYSLINUX and something called "Tiny Core Linux".)