diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-10-05 04:31:22 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-10-05 04:31:22 +0000 |
commit | 71225ab04a555346d0b273449fcd39d598658bb2 (patch) | |
tree | 4f78bf3442b54fd382d765dd6e5b2236288742d2 | |
parent | 0f9b1ecd7fa04e528ac93d213a506ec2c1a4ba96 (diff) |
Use MI installboot instead of disklabel -B to put boot blocks on installation
media.
-rw-r--r-- | distrib/landisk/miniroot/Makefile | 5 | ||||
-rw-r--r-- | distrib/landisk/ramdisk/install.md | 11 | ||||
-rw-r--r-- | distrib/landisk/ramdisk/list | 7 |
3 files changed, 10 insertions, 13 deletions
diff --git a/distrib/landisk/miniroot/Makefile b/distrib/landisk/miniroot/Makefile index abee6b8b482..c3b8c88f9aa 100644 --- a/distrib/landisk/miniroot/Makefile +++ b/distrib/landisk/miniroot/Makefile @@ -31,7 +31,8 @@ ${IMAGE}: rd_setup do_files rd_teardown .endif do_files: - cp ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot + installboot -vr ${MOUNT_POINT} ${VND} \ + ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot gzip -c < ${.OBJDIR}/../ramdisk/bsd.rd > ${MOUNT_POINT}/bsd.rd ln ${MOUNT_POINT}/bsd.rd ${MOUNT_POINT}/bsd @@ -41,9 +42,7 @@ rd_setup: fdisk -i -y ${VND} fdisk -u -y -f ${DESTDIR}/usr/mdec/mbr ${VND} disklabel -w ${VND} ${DISKTYPE} - disklabel -v -B -b ${DESTDIR}/usr/mdec/xxboot ${VND} newfs ${NEWFSARGS} ${VND_RDEV} - fsck ${VND_RDEV} mount ${VND_DEV} ${MOUNT_POINT} rd_teardown: diff --git a/distrib/landisk/ramdisk/install.md b/distrib/landisk/ramdisk/install.md index 3bc6e2bf50f..694e93766ac 100644 --- a/distrib/landisk/ramdisk/install.md +++ b/distrib/landisk/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.34 2015/06/02 19:54:06 rpe Exp $ +# $OpenBSD: install.md,v 1.35 2015/10/05 04:31:21 miod Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -33,10 +33,11 @@ # md_installboot() { - disklabel -B ${1} - - # Use cat to avoid holes created by cp(1) - cat /mnt/usr/mdec/boot > /mnt/boot + 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_fdisk() { diff --git a/distrib/landisk/ramdisk/list b/distrib/landisk/ramdisk/list index a1b0b796d9c..dc032584118 100644 --- a/distrib/landisk/ramdisk/list +++ b/distrib/landisk/ramdisk/list @@ -1,4 +1,4 @@ -# $OpenBSD: list,v 1.38 2015/04/13 21:27:07 deraadt Exp $ +# $OpenBSD: list,v 1.39 2015/10/05 04:31:21 miod Exp $ SRCDIRS distrib/special @@ -60,6 +60,7 @@ LINK instbin usr/bin/sed LINK instbin usr/bin/signify LINK instbin usr/sbin/chroot LINK instbin usr/sbin/pwd_mkdb +LINK instbin usr/sbin/installboot # firmware we might need COPY ${DESTDIR}/etc/firmware/kue etc/firmware/kue @@ -90,10 +91,6 @@ SPECIAL cd dev; sh MAKEDEV ramdisk # for fdisk(8) COPY ${DESTDIR}/usr/mdec/mbr usr/mdec/mbr -# for disklabel(8) -B -COPY ${DESTDIR}/usr/mdec/xxboot usr/mdec/xxboot -LINK usr/mdec/xxboot usr/mdec/wdboot -LINK usr/mdec/xxboot usr/mdec/sdboot # various files that we need in /etc for the install COPY ${DESTDIR}/etc/group etc/group |