Hello all.
While I would always defend everybody's right to use OpenBSD to shoot
himself in his foot, I don't think it is neither practical nor ethical to
hint him to do so.
So if the installer finds a valid MBR which contains some partition(s),
then don't make whole disk (overwriting everything) the default choice and
let it up to the user. For those who still want to use whole disk in this
not so frequent case, it requires exactly one key press more.
Will it fit on the floppies and is it is worth the extra 16 bytes? (Yes,
it can be made in a little more compact way.)
Regards,
David
Index: src//distrib/amd64/common/install.md
===================================================================
RCS file: /cvs/src/distrib/amd64/common/install.md,v
retrieving revision 1.29
diff -u -p -r1.29 install.md
--- src//distrib/amd64/common/install.md 6 Jul 2011 20:02:16 -0000
1.29
+++ src//distrib/amd64/common/install.md 7 Mar 2012 15:19:35 -0000
@@ -54,6 +54,9 @@ md_prep_fdisk() {
_d=whole
if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then
_q=", use the (O)penBSD area,"
_d=OpenBSD
Index: src//distrib/armish/ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/armish/ramdisk/install.md,v
retrieving revision 1.14
diff -u -p -r1.14 install.md
--- src//distrib/armish/ramdisk/install.md 17 Apr 2011 20:57:10 -0000
1.14
+++ src//distrib/armish/ramdisk/install.md 7 Mar 2012 15:19:35 -0000
@@ -42,6 +42,9 @@ md_prep_fdisk() {
_d=whole
if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then
_q=", use the (O)penBSD area,"
_d=OpenBSD
Index: src//distrib/beagle/ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/beagle/ramdisk/install.md,v
retrieving revision 1.2
diff -u -p -r1.2 install.md
--- src//distrib/beagle/ramdisk/install.md 17 Apr 2011 20:57:11 -0000
1.2
+++ src//distrib/beagle/ramdisk/install.md 7 Mar 2012 15:19:35 -0000
@@ -42,6 +42,9 @@ md_prep_fdisk() {
_d=whole
if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then
_q=", use the (O)penBSD area,"
_d=OpenBSD
Index: src//distrib/i386/common/install.md
===================================================================
RCS file: /cvs/src/distrib/i386/common/install.md,v
retrieving revision 1.53
diff -u -p -r1.53 install.md
--- src//distrib/i386/common/install.md 6 Jul 2011 20:02:16 -0000 1.53
+++ src//distrib/i386/common/install.md 7 Mar 2012 15:19:35 -0000
@@ -56,6 +56,9 @@ md_prep_fdisk() {
_d=whole
if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then
_q=", use the (O)penBSD area,"
_d=OpenBSD
Index: src//distrib/landisk/ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/landisk/ramdisk/install.md,v
retrieving revision 1.26
diff -u -p -r1.26 install.md
--- src//distrib/landisk/ramdisk/install.md 17 Apr 2011 20:57:10 -0000
1.26
+++ src//distrib/landisk/ramdisk/install.md 7 Mar 2012 15:19:35 -0000
@@ -50,6 +50,9 @@ md_prep_fdisk() {
_d=whole
if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then
_q=", use the (O)penBSD area,"
_d=OpenBSD
Index: src//distrib/loongson/ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/loongson/ramdisk/install.md,v
retrieving revision 1.6
diff -u -p -r1.6 install.md
--- src//distrib/loongson/ramdisk/install.md 17 Apr 2011 20:57:10 -0000
1.6
+++ src//distrib/loongson/ramdisk/install.md 7 Mar 2012 15:19:35 -0000
@@ -56,6 +56,9 @@ md_prep_fdisk() {
_d=whole
if fdisk $_disk | grep -q 'Signature: 0xAA55'; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if fdisk $_disk | grep -q '^..: A6 '; then
_q=", use the (O)penBSD area,"
_d=OpenBSD
Index: src//distrib/macppc/ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/macppc/ramdisk/install.md,v
retrieving revision 1.50
diff -u -p -r1.50 install.md
--- src//distrib/macppc/ramdisk/install.md 6 Jul 2011 20:02:16 -0000
1.50
+++ src//distrib/macppc/ramdisk/install.md 7 Mar 2012 15:19:35 -0000
@@ -79,6 +79,9 @@ __EOT
_d=whole
if fdisk $_disk | grep -q 'Signature: 0xAA55'; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if fdisk $_disk | grep -q '^..: A6 '; then
_q=", use the (O)penBSD area,"
_d=OpenBSD
Index: src//distrib/palm/ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/palm/ramdisk/install.md,v
retrieving revision 1.2
diff -u -p -r1.2 install.md
--- src//distrib/palm/ramdisk/install.md 17 Apr 2011 20:57:11 -0000
1.2
+++ src//distrib/palm/ramdisk/install.md 7 Mar 2012 15:19:36 -0000
@@ -44,6 +44,9 @@ md_prep_fdisk() {
_d=whole
if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then
_q=", use the (O)penBSD area,"
_d=OpenBSD
Index: src//distrib/socppc/ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/socppc/ramdisk/install.md,v
retrieving revision 1.15
diff -u -p -r1.15 install.md
--- src//distrib/socppc/ramdisk/install.md 24 Jul 2011 02:08:10 -0000
1.15
+++ src//distrib/socppc/ramdisk/install.md 7 Mar 2012 15:19:36 -0000
@@ -50,6 +50,9 @@ md_prep_fdisk() {
_d=whole
if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then
_q=", use the (O)penBSD area,"
_d=OpenBSD
Index: src//distrib/zaurus/ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/zaurus/ramdisk/install.md,v
retrieving revision 1.27
diff -u -p -r1.27 install.md
--- src//distrib/zaurus/ramdisk/install.md 17 Apr 2011 20:57:11 -0000
1.27
+++ src//distrib/zaurus/ramdisk/install.md 7 Mar 2012 15:19:36 -0000
@@ -44,6 +44,9 @@ md_prep_fdisk() {
_d=whole
if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then
fdisk $_disk
+ if [[ -n $(fdisk $_disk | grep '^.[^#]: [^0][^0] ') ]];
then
+ _d=
+ fi
if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then
_q=", use the (O)penBSD area,"
_d=OpenBSD