diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-10-15 19:28:33 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-10-15 19:28:33 +0000 |
commit | dbece8be3e46dda0f050c8c71c76a39512437888 (patch) | |
tree | e09e3f3bce7d11c86ab6b4d0f928697bb75baa0b /distrib | |
parent | 9ddda8ba3c731091bbe551dd4efed7adb7a03467 (diff) |
Use MI installboot instead of disklabel -B to install boot blocks.
ok krw@ deraadt@
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/vax/common/Makefile.inc | 14 | ||||
-rw-r--r-- | distrib/vax/common/list | 6 | ||||
-rw-r--r-- | distrib/vax/install.md | 10 | ||||
-rw-r--r-- | distrib/vax/iso/Makefile | 10 | ||||
-rw-r--r-- | distrib/vax/ramdisk/Makefile.inc | 5 | ||||
-rw-r--r-- | distrib/vax/ramdisk/list.local | 10 |
6 files changed, 19 insertions, 36 deletions
diff --git a/distrib/vax/common/Makefile.inc b/distrib/vax/common/Makefile.inc index a7b953e34f4..d05ddbdd496 100644 --- a/distrib/vax/common/Makefile.inc +++ b/distrib/vax/common/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.10 2013/11/09 22:35:40 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.11 2015/10/15 19:28:32 miod Exp $ # TOP is assumed to be defined by Makefile including this one. @@ -35,23 +35,17 @@ all: ${CBIN} bootroot umount -f ${MOUNT_POINT} vnconfig -u ${VND} -bootroot: xxboot boot +bootroot: dd if=/dev/zero of=${BOOTSYS} bs=512 count=8192 vnconfig -v -c ${VND} ${BOOTSYS} disklabel -w ${VND} bootroot newfs -O 0 -m 0 -o space -i 8192 ${VND_RDEV} - dd if=xxboot of=${VND_RDEV} count=16 mount ${VND_DEV} ${MOUNT_POINT} - cp boot ${MOUNT_POINT} + installboot -vr ${MOUNT_POINT} ${VND} \ + ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot umount -f ${MOUNT_POINT} vnconfig -u ${VND} -xxboot boot: - cd /usr/src/sys/arch/vax/boot;${MAKE} - cp /usr/src/sys/arch/vax/boot/xxboot/xxboot . - cp /usr/src/sys/arch/vax/boot/boot/boot . - - unconfig: -umount -f ${MOUNT_POINT} -vnconfig -u ${VND} ${IMAGE} diff --git a/distrib/vax/common/list b/distrib/vax/common/list index 976caa37a2a..4ec4913bbb6 100644 --- a/distrib/vax/common/list +++ b/distrib/vax/common/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.40 2015/04/13 21:27:07 deraadt Exp $ +# $OpenBSD: list,v 1.41 2015/10/15 19:28:32 miod Exp $ SRCDIRS distrib/special SRCDIRS sys/arch/vax/stand @@ -60,9 +60,6 @@ LINK instbin usr/sbin/pwd_mkdb COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV SPECIAL cd dev; sh MAKEDEV ramdisk -# we need the contents of /usr/mdec (XXX) -# COPY ${DESTDIR}/usr/mdec/* usr/mdec - # various files that we need in /etc for the install COPY ${DESTDIR}/etc/group etc/group COPY ${CURDIR}/../../miniroot/master.passwd etc/master.passwd @@ -73,6 +70,5 @@ COPY ${CURDIR}/../../miniroot/services etc/services TERMCAP vt100,vt220,dumb usr/share/misc/termcap COPY ${DESTDIR}/bsd . -COPY ${DESTDIR}/boot . TZ diff --git a/distrib/vax/install.md b/distrib/vax/install.md index 043860aae99..4b77e5fd03d 100644 --- a/distrib/vax/install.md +++ b/distrib/vax/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.45 2015/06/02 19:54:07 rpe Exp $ +# $OpenBSD: install.md,v 1.46 2015/10/15 19:28:31 miod Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -39,9 +39,11 @@ MDCDDEVS='/^cd[0-9] /s/ .*//p;/^ra[0-9] .* RRD40$/s/ .*//p' MDMTDEVS='/^[ms]t[0-9][0-9]* /s/ .*//p' md_installboot() { - # Use cat to avoid holes created by cp(1) - cat /mnt/usr/mdec/boot > /mnt/boot - /sbin/disklabel -B $1 + if ! installboot -r /mnt ${1}; then + echo "\nFailed to install bootblocks." + echo "You will not be able to boot OpenBSD from ${1}." + exit + fi } md_prep_disklabel() { diff --git a/distrib/vax/iso/Makefile b/distrib/vax/iso/Makefile index 15c15fced53..09696a17db5 100644 --- a/distrib/vax/iso/Makefile +++ b/distrib/vax/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.15 2014/09/21 13:44:45 deraadt Exp $ +# $OpenBSD: Makefile,v 1.16 2015/10/15 19:28:32 miod Exp $ TOP= ${.CURDIR}/.. @@ -23,20 +23,19 @@ DISKTYPE= isoroot PID!= echo $$$$ ISOIMAGE!= echo image.${PID} ISOSIZE= 798600 # 33*11*2200 -BOOT= ${DESTDIR}/usr/mdec/boot -BOOTXX= ${DESTDIR}/usr/mdec/xxboot NEWFSOPTS= -t ffs -m 0 -o space -f 1024 -b 8192 -i 8192 -s ${ISOSIZE} all: ${CDROM} -${CDROM}: ${BASE} ${XBASE} ${BOOT} ${BOOTXX} +${CDROM}: ${BASE} ${XBASE} -rm -f ${.OBJDIR}/image.* dd if=/dev/zero of=${ISOIMAGE} count=${ISOSIZE} vnconfig -v -c ${VND} ${ISOIMAGE} disklabel -w ${VND} ${DISKTYPE} newfs ${NEWFSOPTS} ${VND_RDEV} mount ${VND_DEV} ${MOUNT_POINT} - cp ${BOOT} ${MOUNT_POINT}/ + installboot -vr ${MOUNT_POINT} ${VND} \ + ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot cp ${RELDIR}/bsd.rd ${MOUNT_POINT}/bsd mkdir -p ${MOUNT_POINT}/${OSREV}/${MACHINE} @@ -47,7 +46,6 @@ ${CDROM}: ${BASE} ${XBASE} ${BOOT} ${BOOTXX} ${MOUNT_POINT}/${OSREV}/${MACHINE}/SHA256 # XXX no SHA256.sig - disklabel -B -b ${BOOTXX} ${VND} @echo "" @df -i ${MOUNT_POINT} @echo "" diff --git a/distrib/vax/ramdisk/Makefile.inc b/distrib/vax/ramdisk/Makefile.inc index c09f7a5a7aa..caa988401f2 100644 --- a/distrib/vax/ramdisk/Makefile.inc +++ b/distrib/vax/ramdisk/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.7 2007/06/17 00:28:21 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.8 2015/10/15 19:28:32 miod Exp $ IMAGESIZE= 3072 GZIPCMD?= gzip @@ -10,6 +10,5 @@ MAKEFLOPPY= 1 #NEWFSOPTS_RD= -t ffs -m 0 -o space -f 1024 -i 16384 -s 8192 HOSTCCFLAGS= -DDEBUG -O0 #HOSTCCFLAGS= -DBROKEN_NMAGIC -DDEBUG -BOOTXX= ${DESTDIR}/usr/mdec/sdboot -INSTALLBOOT= @true -- # totally incredible NEWFSOPTS_RD= ${NEWFSOPTS} -i 4096 -s ${IMAGESIZE} +BOOTXX= ${DESTDIR}/usr/mdec/xxboot diff --git a/distrib/vax/ramdisk/list.local b/distrib/vax/ramdisk/list.local index f9cc17e39da..24ce9d19c2b 100644 --- a/distrib/vax/ramdisk/list.local +++ b/distrib/vax/ramdisk/list.local @@ -1,10 +1,11 @@ -# $OpenBSD: list.local,v 1.3 2015/04/02 20:51:04 deraadt Exp $ +# $OpenBSD: list.local,v 1.4 2015/10/15 19:28:32 miod Exp $ # $NetBSD: list,v 1.2.4.2 1996/06/26 19:25:00 pk Exp $ # extras LINK instbin sbin/disklabel LINK instbin usr/bin/grep usr/bin/egrep usr/bin/fgrep LINK instbin usr/bin/more usr/bin/less +LINK instbin usr/sbin/installboot SYMLINK /tmp var/tmp @@ -12,13 +13,6 @@ SYMLINK /tmp var/tmp SCRIPT ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV SPECIAL cd dev; sh MAKEDEV ramdisk -# for disklabel(8) -B -COPY ${DESTDIR}/usr/mdec/xxboot usr/mdec/xxboot -LINK usr/mdec/xxboot usr/mdec/hpboot -LINK usr/mdec/xxboot usr/mdec/raboot -LINK usr/mdec/xxboot usr/mdec/rdboot -LINK usr/mdec/xxboot usr/mdec/sdboot - # various files that we need in /etc for the install SYMLINK /tmp/fstab.shadow etc/fstab SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf |