[Bug 270393] hybrid ISO images report broken partition table

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 22 Mar 2023 14:42:38 UTC

--- Comment #1 from Ed Maste <emaste@freebsd.org> ---
They hybrid ISOs are created by copying the first 32K from a GPT image into the
output image, overwriting the iso9660 system area:

   113          # Create a GPT image containing the partitions we need for
hybrid boot.
   114          hybridfilename=$(mktemp /tmp/hybrid.img.XXXXXX)
   115          if [ "$(uname -s)" = "Linux" ]; then
   116                  imgsize=`stat -c %s "$NAME"`
   117          else
   118                  imgsize=`stat -f %z "$NAME"`
   119          fi
   120          $MKIMG -s gpt \
   121              --capacity $imgsize \
   122              -b "$BASEBITSDIR/boot/pmbr" \
   123              -p freebsd-boot:="$BASEBITSDIR/boot/isoboot" \
   124              $espparam \
   125              -o $hybridfilename
   127          # Drop the PMBR, GPT, and boot code into the System Area of the
   128          dd if=$hybridfilename of="$NAME" bs=32k count=1 conv=notrunc
   129          rm -f $hybridfilename

This completely ignores the secondary GPT. We need to copy it as well,
enlarging the original ISO image if necessary.

You are receiving this mail because:
You are the assignee for the bug.