Subject: RAIDframe bootblocks partition choice admonition in NetBSD guide?
To: None <netbsd-help@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: netbsd-help
Date: 02/06/2006 20:47:01
I have followed the instructions in NetBSD guide RAIDframe chapter for
a RAID-1 set that is bootable, except that I used no fdisk partition
table and started wd0a at 0:

 a: 781422768         0       RAID                     # (Cyl.      0 - 775220)
 d: 781422768         0     unused      0     0        # (Cyl.      0 - 775220)
 e:    491520        64     4.2BSD      0     0     0  # (Cyl.      0*-    487*)
 f:   1585152    491584       swap                     # (Cyl.    487*-   2060*)
 g:   8388608   2076736     4.2BSD      0     0     0  # (Cyl.   2060*-  10382*)
 h: 770957312  10465344     4.2BSD      0     0     0  # (Cyl.  10382*- 775220*)

(efgh overlap my raid partions, e for grub/xen, f for dump, and g and
h only for convincing myself I did the math right).

In the guide, one is told to use wd1a and not wd1d:

        Caution

        Although it may seem logical to install the 1st stage boot block into
        /dev/rwd1{c,d} (which is historically correct with NetBSD 1.6.x
        installboot(8) , this is no longer the case. If you make this mistake,
        the boot sector will become irrecoverably damaged and you will need to
        start the process over again.

On i386, install the boot loader into /dev/rwd1a :

# /usr/sbin/installboot -o timeout=30 -v /dev/rwd1a
  /usr/mdec/bootxx_ffsv1
File system:         /dev/rwd1a
File system type:    raw (blocksize 8192, needswap 1)
Primary bootstrap:   /usr/mdec/bootxx_ffsv1
Preserving 51 (0x33) bytes of the BPB


I did this on wd1, but haven't yet on wd0.  Given that installboot
seems to write the beginning of the filesystem, I don't see why it
cares what the end is, and why wd1a matters vs wd1d.

In my case, it seems one gives the RAID component, so the boot blocks
fit in blocks 1 and 2-15 after block 0/MBR of the RAID label.  So I'm
particularly baffled as to why choosing wd1d and wd1a should lead to
different results.

I'd appreciate it if someone could explain the point of the caution,
and the details of the bad thing it seeks to avoid?

This is a bit academic because I'm going to follow the grub/raid/xen
instructions next, but I'd like to have a straight NetBSD system
booting off RAID-1 before proceeding.

-- 
        Greg Troxel <gdt@ir.bbn.com>