From: Matthew Dillon Date: Fri, 19 Oct 2018 23:24:40 +0000 (-0700) Subject: nrelease - Use built boot blocks instead of system boot blocks X-Git-Tag: v5.5.0~95 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/cc3c231b44efb227065c3e9a6a06956274814672 nrelease - Use built boot blocks instead of system boot blocks * Adjust the nrelease Makefile to install the boot blocks from the nrelease build into the image instead of the boot blocks from the running system. Submitted-by: NI33 (irc) --- diff --git a/nrelease/Makefile b/nrelease/Makefile index a36f47f778..d1d991496d 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -351,7 +351,7 @@ mkimg: cut -f 1 -d: > ${ISODIR}/vn.which vnconfig -e -s labels `cat ${ISODIR}/vn.which` ${IMGFILE} @echo "STEP: set up legacy MBR" - fdisk -IB `cat ${ISODIR}/vn.which` + fdisk -b ${ISOROOT}/boot/mbr -IB `cat ${ISODIR}/vn.which` fdisk -s `cat ${ISODIR}/vn.which` >${ISODIR}/fdisk.dat awk '(NR==1){printf("g c%s h%s s%s\n", $$2, $$4, $$6);}' \ ${ISODIR}/fdisk.dat >${ISODIR}/fdisk.conf @@ -376,7 +376,8 @@ mkimg: @echo "STEP: write modified disklabel back" disklabel -R -r `cat ${ISODIR}/vn.which`s2 ${IMGFILE}.label rm ${IMGFILE}.label - disklabel -B `cat ${ISODIR}/vn.which`s2 + disklabel -B -b ${ISOROOT}/boot/boot1_64 -s ${ISOROOT}/boot/boot2_64 \ + `cat ${ISODIR}/vn.which`s2 newfs /dev/`cat ${ISODIR}/vn.which`s2a mount /dev/`cat ${ISODIR}/vn.which`s2a ${IMGMNT} cpdup ${ISOROOT} ${IMGMNT}