summaryrefslogtreecommitdiff
path: root/distrib/i386/floppies/inst
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-01-28 07:07:37 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-01-28 07:07:37 +0000
commitd149be210d3e4c5b3334bfcb1a9e8ceabd3b0d27 (patch)
treee643630cbf03d28a617acda69fd0ddd168a1e690 /distrib/i386/floppies/inst
parent20908fe39af50d89e8690b74cc745dc17ae12a8e (diff)
intuit more info from dmesg, hubert.feyrer@rz.uni-regensburg.de
Diffstat (limited to 'distrib/i386/floppies/inst')
-rw-r--r--distrib/i386/floppies/inst/install.sh30
1 files changed, 21 insertions, 9 deletions
diff --git a/distrib/i386/floppies/inst/install.sh b/distrib/i386/floppies/inst/install.sh
index 08637c4d122..7ac591dcf4d 100644
--- a/distrib/i386/floppies/inst/install.sh
+++ b/distrib/i386/floppies/inst/install.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sh,v 1.16 1996/12/09 07:06:56 tholo Exp $
+# $OpenBSD: install.sh,v 1.17 1997/01/28 07:07:36 deraadt Exp $
#
# Copyright (c) 1994 Christopher G. Demetriou
# All rights reserved.
@@ -171,20 +171,32 @@ esac
echo "You will now enter the disk geometry information"
echo ""
-echo -n "Number of bytes per disk sector? [512] "
-getresp 512
+bytes_per_sect=`cat /kern/msgbuf \
+ | sed -n -e /^${drivename}:/p -e /^${drivename}:/q \
+ | awk '{ print $9 }'`
+echo -n "Number of bytes per disk sector? [$bytes_per_sect] "
+getresp $bytes_per_sect
bytes_per_sect="$resp"
-echo -n "Number of disk cylinders? "
-getresp
+cyls_per_disk=`cat /kern/msgbuf \
+ | sed -n -e /^${drivename}:/p -e /^${drivename}:/q \
+ | awk '{ print $3 }'`
+echo -n "Number of disk cylinders? [$cyls_per_disk]"
+getresp $cyls_per_disk
cyls_per_disk="$resp"
-echo -n "Number of disk tracks (heads) per disk cylinder? "
-getresp
+tracks_per_cyl=`cat /kern/msgbuf \
+ | sed -n -e /^${drivename}:/p -e /^${drivename}:/q \
+ | awk '{ print $5 }'`
+echo -n "Number of disk tracks (heads) per disk cylinder? [$tracks_per_cyl]"
+getresp $tracks_per_cyl
tracks_per_cyl="$resp"
-echo -n "Number of disk sectors per disk track? "
-getresp
+sects_per_track=`cat /kern/msgbuf \
+ | sed -n -e /^${drivename}:/p -e /^${drivename}:/q \
+ | awk '{ print $7 }'`
+echo -n "Number of disk sectors per disk track? [$sects_per_track]"
+getresp $sects_per_track
sects_per_track="$resp"
cylindersize=`expr $sects_per_track \* $tracks_per_cyl`