Hi, do i understand it right that you decided for the dummy MBR partition that covers a single block at the start of the ISO ?
If you confirm, i will replace the two macros by a single option which you can add to your grub-mkrescue run. How about this: --protective-msdos-bootflag If --protective-msdos-label or --grub2-mbr are given, make sure that one of the MBR partitions bears the "bootable/active" flag. If that flag is missing then apply it to the first partition which is not of type 0xee or 0xef. If no such partition exists, then create a dummy partition of type 0x00 which covers only the first block of the ISO image. (An MBR partition which includes block 0 can be neither a 0xee nor a 0xef. So if there is one, it will get the bootflag and no 0x00 partition will get appended. No partition overlapping can be added.) If a --grub2-mjg-layout option emerges, then the effect of --protective-msdos-bootflag will be extended to that one, too. The sketching of a comprehensive language for describing boot sectors and partitions will last a bit longer, i fear. -------------------------------------------------------------------- Now for alternative layouts: Alexander E. Patrakov wrote: > 1. "vanilla": with the modified system_area.c, but with no CPPFLAGS > 2. "no-boot-dummy": with -DLibisofs_mjg_boot_for_grub2 > 3. "rich": with -DLibisofs_mjg_boot_for_grub2 > -DLibisofs_protective_msdos_plus_boot_dummY -DLibisofs_pmpbd_on_lba0 > ... > A. "plain": grub-mkrescue -o minimal-plain.iso minimal > B. "default": grub-mkrescue -o minimal-default.iso minimal > --xorriso=/.../grub-mkrescue-sed.sh > C: "mjg-p2": MKRESCUE_SED_MODE=mjg MKRESCUE_SED_PARTNO=2 ... > D: "mbr-only": MKRESCUE_SED_MODE=mbr_only MKRESCUE_SED_PROTECTIVE=no > All combinations except 1B and 1C are, based on your prior emails, valid, At least mode "mjg" yields the desired result only with 2 and 3. > 1A, 1D, 2A: not recognized by the motherboard at all. > no MBR partitions are marked as bootable on these iso images. 1A and 2A are the reason why this thread exists. They lack of a non-0xee-0xef partition which one could mark bootable. 1D has no boot flag because MKRESCUE_SED_PROTECTIVE=no. You may trade bootflag for mountable ISO partition by MKRESCUE_SED_PROTECTIVE=yes. (I will ponder whether boot flag can be enabled by --grub2-mbr if some non-0xee-0xef partition is at hand.) > Note: I have also applied Andrei's patch that replaces the boot code in the > FAT filesystem. > ... > 2B: prints "this is not a bootable disk" message that is embedded > in the new boot code. You see a string from the EFI partition 0xef in your old BIOS ? 2B lacks boot flag because 0xef is the only MBR partition. ----------------------------------------------------------------- My conclusions: Andrei's proposal to have an "mjg" layout (MBR+GPT+APM) works so far, if it gets augmented by an additional MBR partition which bears a boot flag. This may be - a dummy partition (program variant 3[AB]), - or a (pseudo-)protective partition (program variant 2C with EFI partition as MBR partition 2) - or a partition which makes the ISO mountable (program 2C with MKRESCUE_SED_PROTECTIVE=no). My proposal "mbr_only" works too (so far), if boot flag is present - because the program changes for "mjg" included the desire for a bootflag (program variant [23]D), - or because MKRESCUE_SED_PROTECTIVE=yes are in effect (programs [1-3]D). The new proposed option --protective-msdos-bootflag will enforce the presence of a boot flag if the system area settings indicate a GRUB2 MBR. ---------------------------------------------------------------- Both layout proposals still suffer from the fact that the file efi.img is inside the ISO but also must be appended to its end. I am now working on implementing an alternative boot image source which would make file /efi.img in the ISO obsolete. Current plan: -e --interval:appended_partition_2:all:: will point El Torito to the appended MBR partition 2 after the end of the ISO. It had a first SIGSEGV and intermediate success. But "mjg" still lacks its GPT ... will have to look where it got lost ... Have a nice day :) Thomas _______________________________________________ Bug-grub mailing list Bug-grub@gnu.org https://lists.gnu.org/mailman/listinfo/bug-grub