summaryrefslogtreecommitdiff
path: root/distrib/armv7/ramdisk
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2022-02-07 20:24:31 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2022-02-07 20:24:31 +0000
commit8776ad1ff72c5194f6598db936f5b7ddf07db5d7 (patch)
treed57d4b5c65f1e066861377e8a4496bdfd4437b7a /distrib/armv7/ramdisk
parent236adda8343d854b8ae4f7115a153fdb50c3517c (diff)
Use fdisk's -b to create boot partitions instead of -e scripts.
Build, boot and install tested by visa@ ok visa@
Diffstat (limited to 'distrib/armv7/ramdisk')
-rw-r--r--distrib/armv7/ramdisk/install.md20
1 files changed, 2 insertions, 18 deletions
diff --git a/distrib/armv7/ramdisk/install.md b/distrib/armv7/ramdisk/install.md
index 7ed5b77d0f3..999dc7f99e0 100644
--- a/distrib/armv7/ramdisk/install.md
+++ b/distrib/armv7/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.50 2019/09/25 06:20:23 jsg Exp $
+# $OpenBSD: install.md,v 1.51 2022/02/07 20:24:30 krw Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -90,7 +90,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}
@@ -105,22 +104,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