diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-11 04:28:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-11 04:28:52 +0000 |
commit | a61ea7305e003810ae54bf1066bc073a054c02a7 (patch) | |
tree | b93dcf1c1df7f79e12d990e92207304157035d13 /distrib/landisk | |
parent | 7a1f7ce0c39fcad6bf32847efcc53c5c36c8c99b (diff) |
Do not show MBRs without the correct signature, instead say they are
bogus and provide less options to the user
ok krw
Diffstat (limited to 'distrib/landisk')
-rw-r--r-- | distrib/landisk/ramdisk/install.md | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/distrib/landisk/ramdisk/install.md b/distrib/landisk/ramdisk/install.md index 58be58d90bb..e97b402b3e5 100644 --- a/distrib/landisk/ramdisk/install.md +++ b/distrib/landisk/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.24 2009/06/04 00:44:47 krw Exp $ +# $OpenBSD: install.md,v 1.25 2009/06/11 04:28:50 deraadt Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -47,15 +47,17 @@ md_prep_fdisk() { local _disk=$1 _q _d while :; do - fdisk $_disk - if [[ -n $(fdisk $_disk | grep ' A6 ') ]]; then - _q=" use the (O)penBSD area," - _d=OpenBSD + _d=whole + if [[ -n $(fdisk $_disk | grep 'Signature: 0xAA55') ]]; then + fdisk $_disk + if [[ -n $(fdisk $_disk | grep '^..: A6 ') ]]; then + _q=", use the (O)penBSD area," + _d=OpenBSD + fi else - _q= - _d=whole + echo "MBR has invalid signature; not showing it." fi - ask "Use (W)hole disk,$_q or (E)dit the MBR?" "$_d" + ask "Use (W)hole disk$_q or (E)dit the MBR?" "$_d" case $resp in w*|W*) echo -n "Setting OpenBSD MBR partition to whole $_disk..." |