Reputation: 31
Does anyone know how to make an ISO emulate a hard disk or floppy in genisoimage
. Please don't tell me about Windows software because I use Debian GNU/Linux 7.6
I tried this:
genisoimage -hard-disk-boot -boot-load-size 4 -eltorito-boot boot.bin -o boot.iso iso/
But I get the error:
-genisoimage: boot.bin has no partitions.
How do I get this to work?
Upvotes: 2
Views: 1204
Reputation: 39581
Apparently your boot.bin
doesn't have a partition table. You need to put an MBR partition table at the end of your boot block. You probably only need what the linked Wikipedia article calls a "classical generic MBR".
If you haven't already you should download and read the “El Torito” Bootable CD-ROM Format Specification. It says this about this about the partition table:
When the simulated device is a Hard Disk, the BIOS should use a geometry which fits the partition table located in the Load LBA sector. Hard Disk images may only have 1 partition in the partition table and it must be the first entry.
Note that it also suggests that harddisk emulation isn't what you would use to boot an operating system. It suggests using floppy disk emulation instead.
One warning about the El Torito documention, it uses hexadecimal numbers without any prefixes or suffixes (eg. "0x200" or "200h"). So when it talks about "200 byte sectors" it means 512 byte sectors.
Upvotes: 1