diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2022-02-10 15:12:58 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2022-02-10 15:12:58 +0000 |
commit | 9420ac579dcc270c77e61358a2d34af301257171 (patch) | |
tree | e7595e6eae453c5ebe6caa8ff62a82119ab544a7 /distrib | |
parent | dcd900451abb949609965a84dc7956e4ad73124f (diff) |
Use fdisk's -b to create boot partitions instead of -e scripts.
Build, boot and install tested by bluhm@
ok bluhm@
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/powerpc64/iso/Makefile | 5 | ||||
-rw-r--r-- | distrib/powerpc64/ramdisk/Makefile | 6 | ||||
-rw-r--r-- | distrib/powerpc64/ramdisk/install.md | 20 |
3 files changed, 6 insertions, 25 deletions
diff --git a/distrib/powerpc64/iso/Makefile b/distrib/powerpc64/iso/Makefile index 5571cff3f6d..9093e59f7dc 100644 --- a/distrib/powerpc64/iso/Makefile +++ b/distrib/powerpc64/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.4 2021/04/13 21:16:01 deraadt Exp $ +# $OpenBSD: Makefile,v 1.5 2022/02/10 15:12:57 krw Exp $ FS= install${OSrev}.img FSSIZE= 1032192 @@ -28,8 +28,7 @@ all: ${FS} ${CDROM} ${FS}: ${BASE} ${XBASE} dd if=/dev/zero of=${FS} bs=512 count=${TOTALSIZE} vnconfig -v ${FS} > vnd - echo 'u\ne 0\nc\nn\n${MSDOSSTART}\n${MSDOSSIZE}\ne 3\nA6\nn\n${FFSSTART}\n*\nf 0\nw\nq\n' \ - | fdisk -e `cat vnd` >/dev/null + 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 newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} diff --git a/distrib/powerpc64/ramdisk/Makefile b/distrib/powerpc64/ramdisk/Makefile index 76071c8960c..dd7a57d517b 100644 --- a/distrib/powerpc64/ramdisk/Makefile +++ b/distrib/powerpc64/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2021/07/26 12:47:46 kn Exp $ +# $OpenBSD: Makefile,v 1.4 2022/02/10 15:12:57 krw Exp $ FS= miniroot${OSrev}.img FSSIZE= 67584 @@ -9,7 +9,6 @@ RAMDISK= RAMDISK MSDOSSTART= 8192 MSDOSSIZE= 32768 -FFSSTART!= expr ${MSDOSSTART} + ${MSDOSSIZE} NEWFS_ARGS_msdos=-L boot -c1 -F16 MOUNT_ARGS_msdos=-o-l @@ -25,8 +24,7 @@ all: ${FS} ${FS}: bsd.rd dd if=/dev/zero of=${FS} bs=512 count=${FSSIZE} vnconfig -v -t ${FSDISKTYPE} ${FS} > vnd - echo 'u\ne 0\nc\nn\n${MSDOSSTART}\n${MSDOSSIZE}\ne 3\nA6\nn\n${FFSSTART}\n*\nf 0\nw\nq\n' \ - | fdisk -e `cat vnd` >/dev/null + 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 newfs -t msdos ${NEWFS_ARGS_msdos} /dev/r`cat vnd`i mount ${MOUNT_ARGS_msdos} /dev/`cat vnd`i ${MOUNT_POINT} diff --git a/distrib/powerpc64/ramdisk/install.md b/distrib/powerpc64/ramdisk/install.md index fa96503c0b4..e95aa5b5eb3 100644 --- a/distrib/powerpc64/ramdisk/install.md +++ b/distrib/powerpc64/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.8 2020/08/31 15:28:41 deraadt Exp $ +# $OpenBSD: install.md,v 1.9 2022/02/10 15:12:57 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -49,7 +49,6 @@ md_prep_fdisk() { local bootparttype="C" local bootsectorstart="32768" local bootsectorsize="32768" - local bootsectorend=$(($bootsectorstart + $bootsectorsize)) local bootfstype="msdos" local newfs_args=${NEWFSARGS_msdos} @@ -64,22 +63,7 @@ md_prep_fdisk() { case $resp in [wW]*) echo -n "Creating a ${bootfstype} partition and an OpenBSD partition for rest of $_disk..." - fdisk -e ${_disk} <<__EOT >/dev/null -reinit -e 0 -${bootparttype} -n -${bootsectorstart} -${bootsectorsize} -f 0 -e 3 -A6 -n -${bootsectorend} - -write -quit -__EOT + fdisk -iy -b "${bootsectorsize}@${bootsectorstart}:${bootparttype}" ${_disk} >/dev/null echo "done." disklabel $_disk 2>/dev/null | grep -q "^ i:" || disklabel -w -d $_disk newfs -t ${bootfstype} ${newfs_args} ${_disk}i |