Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Mar 2023 14:42:38 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 270393] hybrid ISO images report broken partition table
Message-ID:  <bug-270393-227-TpOPVeOsQV@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-270393-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-270393-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270393

--- 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=3D$(mktemp /tmp/hybrid.img.XXXXXX)
   115          if [ "$(uname -s)" =3D "Linux" ]; then
   116                  imgsize=3D`stat -c %s "$NAME"`
   117          else
   118                  imgsize=3D`stat -f %z "$NAME"`
   119          fi
   120          $MKIMG -s gpt \
   121              --capacity $imgsize \
   122              -b "$BASEBITSDIR/boot/pmbr" \
   123              -p freebsd-boot:=3D"$BASEBITSDIR/boot/isoboot" \
   124              $espparam \
   125              -o $hybridfilename
   126
   127          # Drop the PMBR, GPT, and boot code into the System Area of=
 the
ISO.
   128          dd if=3D$hybridfilename of=3D"$NAME" bs=3D32k count=3D1 con=
v=3Dnotrunc
   129          rm -f $hybridfilename

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-270393-227-TpOPVeOsQV>