-# $OpenBSD: install.md,v 1.41 2015/06/02 19:54:06 rpe Exp $
+# $OpenBSD: install.md,v 1.42 2015/10/07 18:02:06 krw Exp $
#
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
MDXDM=y
NCPU=$(sysctl -n hw.ncpufound)
+if dmesg | grep -q 'efifb0 at mainbus0'; then
+ MDEFI=y
+fi
+
((NCPU > 1)) && { DEFAULTSETS="bsd bsd.rd bsd.mp"; SANESETS="bsd bsd.mp"; }
md_installboot() {
while :; do
_d=whole
+
+ [[ $MDEFI == y && $_disk == $ROOTDISK ]] &&
+ _q=", whole disk (G)PT,"
+
if fdisk $_disk | grep -q 'Signature: 0xAA55'; then
fdisk $_disk
if fdisk $_disk | grep -q '^..: A6 '; then
- _q=", use the (O)penBSD area,"
+ _q="$_q, use the (O)penBSD area,"
_d=OpenBSD
fi
else
echo "MBR has invalid signature; not showing it."
fi
- ask "Use (W)hole disk$_q or (E)dit the MBR?" "$_d"
+ ask "Use (W)hole disk MBR$_q or (E)dit the MBR?" "$_d"
case $resp in
w*|W*)
echo -n "Setting OpenBSD MBR partition to whole $_disk..."
__EOT
echo "done."
return ;;
+ g*|G*)
+ [[ $MDEFI == y && $_disk == $ROOTDISK ]] || continue
+
+ echo -n "Setting OpenBSD GPT partition to whole $_disk..."
+ fdisk -i -g -b 960 -y $_disk >/dev/null
+ echo "done."
+ return ;;
e*|E*)
# Manually configure the MBR.
cat <<__EOT
-# $OpenBSD: list.local,v 1.25 2014/12/03 20:11:19 florian Exp $
+# $OpenBSD: list.local,v 1.26 2015/10/07 18:02:06 krw Exp $
# add local links; use bin/sh since instbin has already been unlinked
LINK instbin sbin/ping6
LINK instbin sbin/mount_ext2fs
LINK instbin sbin/mount_msdos
LINK instbin sbin/mount_udf
+LINK instbin sbin/newfs_msdos
+LINK instbin sbin/fsck_msdos
COPY ${DESTDIR}/etc/firmware/kue etc/firmware/kue