From 8d8d84f6e2ce28b3126b2f5342633bbc73565b2e Mon Sep 17 00:00:00 2001 From: krw Date: Fri, 10 Feb 2023 15:54:33 +0000 Subject: [PATCH] Use "echo '/ *' | disklabel -wAT-" to put all free space into the root partition. Identical behaviour as but more readable than the "echo 'a a\n\n\n\nw\nq\n'| disklabel -E" it replaces. It also eliminates the extraneous output of -E that required ">/dev/null". ok kn@ --- distrib/arm64/iso/Makefile | 4 ++-- distrib/arm64/ramdisk/Makefile | 4 ++-- distrib/armv7/miniroot/Makefile.inc | 4 ++-- distrib/octeon/iso/Makefile | 4 ++-- distrib/powerpc64/iso/Makefile | 4 ++-- distrib/powerpc64/ramdisk/Makefile | 4 ++-- distrib/riscv64/iso/Makefile | 4 ++-- distrib/riscv64/ramdisk/Makefile | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/distrib/arm64/iso/Makefile b/distrib/arm64/iso/Makefile index c944cd52e62..89ee96295e6 100644 --- a/distrib/arm64/iso/Makefile +++ b/distrib/arm64/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2022/02/10 20:07:47 krw Exp $ +# $OpenBSD: Makefile,v 1.4 2023/02/10 15:54:33 krw Exp $ FS= install${OSrev}.img FSSIZE= 1032192 @@ -50,7 +50,7 @@ ${FS}: ${BASE} ${XBASE} dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v ${FS} > vnd fdisk -iy -b "${MSDOSSIZE}@${MSDOSSTART}:c" `cat vnd` >/dev/null - echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + echo '/ *' | disklabel -wAT- `cat vnd` newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} .for FILE in ${PIFILES} diff --git a/distrib/arm64/ramdisk/Makefile b/distrib/arm64/ramdisk/Makefile index 8ef480fee9d..eb549af67da 100644 --- a/distrib/arm64/ramdisk/Makefile +++ b/distrib/arm64/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.24 2022/02/10 20:07:47 krw Exp $ +# $OpenBSD: Makefile,v 1.25 2023/02/10 15:54:33 krw Exp $ FS= miniroot${OSrev}.img FSSIZE= 88064 @@ -46,7 +46,7 @@ ${FS}: bsd.rd dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v ${FS} > vnd fdisk -iy -b "${MSDOSSIZE}@${MSDOSSTART}:c" `cat vnd` >/dev/null - echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + echo '/ *' | disklabel -wAT- `cat vnd` newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} .for FILE in ${PIFILES} diff --git a/distrib/armv7/miniroot/Makefile.inc b/distrib/armv7/miniroot/Makefile.inc index 1377104bdd1..b1967e80823 100644 --- a/distrib/armv7/miniroot/Makefile.inc +++ b/distrib/armv7/miniroot/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.29 2022/02/07 20:24:30 krw Exp $ +# $OpenBSD: Makefile.inc,v 1.30 2023/02/10 15:54:33 krw Exp $ FS= miniroot-${BOARD}-${OSrev}.img FSSIZE= 71424 # ffs+msdos, actually @@ -19,7 +19,7 @@ ${FS}: bsd.rd dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v -t ${DISKTYPE} ${FS} > vnd fdisk -iy -b "${MSDOSSIZE}@${MSDOSSTART}:c" `cat vnd` >/dev/null - echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + echo '/ *' | disklabel -wAT- `cat vnd` newfs -O 1 -t msdos -L boot /dev/r`cat vnd`i mount -o-l /dev/`cat vnd`i ${MOUNT_POINT} diff --git a/distrib/octeon/iso/Makefile b/distrib/octeon/iso/Makefile index 3880b47e321..13ed6d7ec75 100644 --- a/distrib/octeon/iso/Makefile +++ b/distrib/octeon/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2022/02/06 15:52:23 krw Exp $ +# $OpenBSD: Makefile,v 1.3 2023/02/10 15:54:33 krw Exp $ FS= install${OSrev}.img FSSIZE= 832192 @@ -25,7 +25,7 @@ ${FS}: ${BASE} ${XBASE} dd if=/dev/zero of=${FS} bs=512 count=${TOTALSIZE} vnconfig -v ${FS} > vnd fdisk -iy -b "${MSDOSSIZE}@${MSDOSSTART}:c" `cat vnd` >/dev/null - echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + echo '/ *' | disklabel -wAT- `cat vnd` newfs -t msdos /dev/r`cat vnd`i mount /dev/`cat vnd`i ${MOUNT_POINT} cp ${RELDIR}/bsd.rd ${MOUNT_POINT}/bsd.rd diff --git a/distrib/powerpc64/iso/Makefile b/distrib/powerpc64/iso/Makefile index 9093e59f7dc..b9eb6dd499c 100644 --- a/distrib/powerpc64/iso/Makefile +++ b/distrib/powerpc64/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2022/02/10 15:12:57 krw Exp $ +# $OpenBSD: Makefile,v 1.6 2023/02/10 15:54:33 krw Exp $ FS= install${OSrev}.img FSSIZE= 1032192 @@ -29,7 +29,7 @@ ${FS}: ${BASE} ${XBASE} dd if=/dev/zero of=${FS} bs=512 count=${TOTALSIZE} vnconfig -v ${FS} > vnd fdisk -iy -b "${MSDOSSIZE}@${MSDOSSTART}:c" `cat vnd` >/dev/null - echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + echo '/ *' | disklabel -wAT- `cat vnd` newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} echo 'menuentry "OpenBSD install" {' > ${MOUNT_POINT}/grub.cfg diff --git a/distrib/powerpc64/ramdisk/Makefile b/distrib/powerpc64/ramdisk/Makefile index dd7a57d517b..274ce451573 100644 --- a/distrib/powerpc64/ramdisk/Makefile +++ b/distrib/powerpc64/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2022/02/10 15:12:57 krw Exp $ +# $OpenBSD: Makefile,v 1.5 2023/02/10 15:54:33 krw Exp $ FS= miniroot${OSrev}.img FSSIZE= 67584 @@ -25,7 +25,7 @@ ${FS}: bsd.rd dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd fdisk -iy -b "${MSDOSSIZE}@${MSDOSSTART}:c" `cat vnd` >/dev/null - echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + echo '/ *' | disklabel -wAT- `cat vnd` newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} cp bsd.rd ${MOUNT_POINT}/boot diff --git a/distrib/riscv64/iso/Makefile b/distrib/riscv64/iso/Makefile index 8da7710e62a..eb9203bdd0f 100644 --- a/distrib/riscv64/iso/Makefile +++ b/distrib/riscv64/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2022/02/04 18:12:47 krw Exp $ +# $OpenBSD: Makefile,v 1.5 2023/02/10 15:54:33 krw Exp $ FS= install${OSrev}.img FSSIZE= 1032192 @@ -28,7 +28,7 @@ ${FS}: ${BASE} ${XBASE} dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v ${FS} > vnd fdisk -iy -b "${MSDOSSIZE}@${MSDOSSTART}:c" `cat vnd` >/dev/null - echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + echo '/ *' | disklabel -wAT- `cat vnd` newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} mkdir -p ${MOUNT_POINT}/efi/boot diff --git a/distrib/riscv64/ramdisk/Makefile b/distrib/riscv64/ramdisk/Makefile index e126b2660c8..5e618218599 100644 --- a/distrib/riscv64/ramdisk/Makefile +++ b/distrib/riscv64/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2022/02/04 18:12:47 krw Exp $ +# $OpenBSD: Makefile,v 1.6 2023/02/10 15:54:33 krw Exp $ FS= miniroot${OSrev}.img FSSIZE= 67584 @@ -25,7 +25,7 @@ ${FS}: bsd.rd dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd fdisk -iy -b "${MSDOSSIZE}@${MSDOSSTART}:c" `cat vnd` >/dev/null - echo 'a a\n\n\n\nw\nq\n' | disklabel -E `cat vnd` >/dev/null + echo '/ *' | disklabel -wAT- `cat vnd` newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} mkdir -p ${MOUNT_POINT}/efi/boot -- 2.20.1