From: krw Date: Wed, 26 Apr 2023 14:42:27 +0000 (+0000) Subject: Don't rely on the disklabel defaults or a disktab entry's ba#/fa# X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=30ec91c39393e1b25c042b9e7d1407800a7a99ad;p=openbsd Don't rely on the disklabel defaults or a disktab entry's ba#/fa# values for the block/fragment sizes that some install media need. Hoist the desired values into the newfs(8) invocations to make it obvious non-default values are required and what the values are. No functional change. ok kn@ --- diff --git a/distrib/alpha/miniroot/Makefile b/distrib/alpha/miniroot/Makefile index a2b26eb5234..da148703a7f 100644 --- a/distrib/alpha/miniroot/Makefile +++ b/distrib/alpha/miniroot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.23 2021/07/26 12:47:44 kn Exp $ +# $OpenBSD: Makefile,v 1.24 2023/04/26 14:42:27 krw Exp $ FS= miniroot${OSrev}.img FSSIZE= 5760 @@ -20,7 +20,7 @@ ${FS}: bsd.gz dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v ${FS} > vnd disklabel -w `cat vnd` ${FSDISKTYPE} - newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a + newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} -b 8192 -f 4096 /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} install -c -m 555 -o root -g wheel \ ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot diff --git a/distrib/i386/iso/Makefile b/distrib/i386/iso/Makefile index 69373c5a20e..d068c7e9104 100644 --- a/distrib/i386/iso/Makefile +++ b/distrib/i386/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.32 2021/02/13 18:48:23 semarie Exp $ +# $OpenBSD: Makefile,v 1.33 2023/04/26 14:42:27 krw Exp $ FS= install${OSrev}.img FSSIZE= 921600 @@ -25,7 +25,7 @@ ${FS}: ${BASE} ${XBASE} bsd.rd vnconfig -v ${FS} > vnd fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd` disklabel -w `cat vnd` ${FSDISKTYPE} - newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a + newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} -b 8192 -f 1024 /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} objcopy -S -R .comment ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot installboot -v -r ${MOUNT_POINT} `cat vnd` \ diff --git a/distrib/i386/ramdisk/Makefile b/distrib/i386/ramdisk/Makefile index ceb437a3df8..2de4ae85ffd 100644 --- a/distrib/i386/ramdisk/Makefile +++ b/distrib/i386/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.17 2023/04/26 13:01:02 krw Exp $ +# $OpenBSD: Makefile,v 1.18 2023/04/26 14:42:27 krw Exp $ FS= floppy${OSrev}.img FSSIZE= 2880 @@ -16,7 +16,7 @@ ${FS}: bsd.gz dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v ${FS} > vnd disklabel -w `cat vnd` ${FSDISKTYPE} - newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a + newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} -b 4096 -f 512 /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} objcopy -S -R .comment ${DESTDIR}/usr/mdec/fdboot ${.OBJDIR}/boot installboot -v -r ${MOUNT_POINT} `cat vnd` \ diff --git a/distrib/i386/ramdisk_cd/Makefile b/distrib/i386/ramdisk_cd/Makefile index d997c79ea5c..7e1d7630276 100644 --- a/distrib/i386/ramdisk_cd/Makefile +++ b/distrib/i386/ramdisk_cd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.28 2023/04/26 13:01:02 krw Exp $ +# $OpenBSD: Makefile,v 1.29 2023/04/26 14:42:27 krw Exp $ FS= miniroot${OSrev}.img FSSIZE= 8448 @@ -18,7 +18,7 @@ ${FS}: bsd.gz vnconfig -v ${FS} > vnd fdisk -yi -l ${FSSIZE} -f ${DESTDIR}/usr/mdec/mbr `cat vnd` disklabel -w `cat vnd` ${FSDISKTYPE} - newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a + newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} -b 8192 -f 1024 /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} objcopy -S -R .comment ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/boot installboot -v -r ${MOUNT_POINT} `cat vnd` \ diff --git a/distrib/landisk/ramdisk/Makefile b/distrib/landisk/ramdisk/Makefile index bab3658555a..86f8dff98d5 100644 --- a/distrib/landisk/ramdisk/Makefile +++ b/distrib/landisk/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.34 2021/07/26 12:47:45 kn Exp $ +# $OpenBSD: Makefile,v 1.35 2023/04/26 14:42:27 krw Exp $ FS= miniroot${OSrev}.img FSSIZE= 5120 @@ -21,7 +21,7 @@ ${FS}: bsd.gz fdisk -i -y `cat vnd` fdisk -u -y -f ${DESTDIR}/usr/mdec/mbr `cat vnd` disklabel -w `cat vnd` ${FSDISKTYPE} - newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a + newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} -b 4096 -f 512 /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} installboot -vr ${MOUNT_POINT} `cat vnd` \ ${DESTDIR}/usr/mdec/xxboot ${DESTDIR}/usr/mdec/boot