Subject: port-amd64/36116: Install of amd64 port tries to create MBR on RAID
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <ef@math.uni-bonn.de>
List: netbsd-bugs
Date: 04/02/2007 20:45:00
>Number:         36116
>Category:       port-amd64
>Synopsis:       Install of amd64 port tries to create MBR on RAID
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 02 20:45:00 +0000 2007
>Originator:     Edgar Fuß
>Release:        NetBSD 4.0_BETA2
>Organization:
Mathematisches Institut der Universität Bonn, Computerabteilung
>Environment:
>Description:
	During installation, the sysinst program (in the amd64 port)
	insists to create an MBR even when installing on a RAID device.
	Of course, this makes all the partitions move 63 blocks.
	As this includes the root partition, the boot will fail.
>How-To-Repeat:
	Install NetBSD 4.0_BETA2/amd64 on a RAIDFRAME raid device.
>Fix:
	Add "raid" with the "no_mbr" modifier in
	distrib/utils/sysinst/arch/amd64/md.h
	as in the following patch:
--- distrib/utils/sysinst/arch/amd64/md.h.orig	2006-02-26 11:25:52.000000000 +0100
+++ distrib/utils/sysinst/arch/amd64/md.h	2007-04-02 20:43:16.000000000 +0200
@@ -73,6 +73,14 @@
 #define SET_KERNEL_GENERIC	SET_KERNEL_1
 
 /*
+ * Disk names accepted as valid targets for a from-scratch installation.
+ *
+ * On amd64, we allow "wd"  ST-506/IDE disks,  "sd" scsi disks, "ld" logical
+ * disks, "ed" IBM ESDI disks, "raid" raidframe disks
+ */
+#define DISK_NAMES "wd", "sd", "ld", "ed", "raid:no_mbr", "xbd:no_mbr"
+
+/*
  * Machine-specific command to write a new label to a disk.
  * For example, i386  uses "/sbin/disklabel -w -r", just like i386
  * miniroot scripts, though this may leave a bogus incore label.