Make i386 memstick images bootable.

This reverts the i386 part of r342283, "Rework UEFI ESP generation", and
the followup commit in r342690.

r342283 added an ESP to the i386 memstick image, and as a side effect
made the ESP the active partition, not the bootcode-containing UFS
partition.  As a result the i386 memstick images would not boot in
either UEFI or legacy mode - UEFI failed because we do not support i386
UEFI booting, and legacy mode failed because the partition with legacy
bootcode was not active.

The bootcode-containing UFS partition is again the only, and active,
partition.

PR:		246494
Reported by:	Jorge Maidana
Differential Revision:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2020-05-24 18:25:49 +00:00
parent 56e8cb87c6
commit 05f2347421
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361437

View file

@ -12,9 +12,6 @@
set -e
scriptdir=$(dirname $(realpath $0))
. ${scriptdir}/../../tools/boot/install-boot.sh
PATH=/bin:/usr/bin:/sbin:/usr/sbin
export PATH
@ -39,15 +36,9 @@ makefs -B little -o label=FreeBSD_Install -o version=2 ${2}.part ${1}
rm ${1}/etc/fstab
rm ${1}/etc/rc.conf.local
# Make an ESP in a file.
espfilename=$(mktemp /tmp/efiboot.XXXXXX)
make_esp_file ${espfilename} ${fat32min} ${1}/boot/loader.efi
mkimg -s mbr \
-b ${1}/boot/mbr \
-p efi:=${espfilename} \
-p freebsd:-"mkimg -s bsd -b ${1}/boot/boot -p freebsd-ufs:=${2}.part" \
-o ${2}
rm ${espfilename}
rm ${2}.part