Subject: Re: Can you boot direct from a raidframe partition in 1.6...
To: David Laight <david@l8s.co.uk>
From: David Brownlee <abs@netbsd.org>
List: port-i386
Date: 07/17/2002 15:20:22
	I ended up pushing the root partition an extra 64 sectors down
	the disk and using '-b 16' to installboot to install the second-stage
	boot loader contigously in the space.

        The following should work for anyone wanting to setup a RAID system.
	As a bonus it it _should_ be possible to use it to convert an existing
	system to mirrored without needing any console access, but do _not_
	just believe that, try with a test system first :)

	Assuming you want to mirror wd0 and wd1.

	- Install the system normally on wd0, without setting up RAID.

	- disklabel wd1, and ensure wd1a starts at least 100 blocks from
	  the start of the disk (a cylinder is a good unit), wd1c should
	  be identical to wd1d.

	- Create /etc/raid0.conf, note 'wd9a' should be a non existant disk
	    START array
	    1 2 0

	    START disks
	    /dev/wd1a
	    /dev/wd9a

	    START layout
	    128 1 1 1

	    START queue
	    fifo 100

	- Run the following commands
	  raidctl -C /etc/raid0.conf raid0
	  raidctl -i raid0		(Ignore error messages)
	  disklabel -i -I raid0		(Create at least raid0a)
	  newfs raid0a
	  mount /dev/raid0a /mnt 	(If you have separate /usr etc,
					 newfs and mount them now).

	- Copy installed system from / to /mnt. Dump, pax, or tar OK.
	  eg: 'cd / ; pax -X -rw -pe / /mnt'

	- Edit /mnt/etc/fstab and update wd0 lines to raid0.

	- /usr/mdec/installboot -b 16 /usr/mdec/installboot.sym /dev/rwd1d

	- 'raidctl -A root raid0', then reboot.  The kernel should boot
	  from wd0, then automatically use raid0 as the root filesystem.

	- disklabel wd0 to match wd1.

	- raidctl -a /dev/wd0a raid0

	- raidctl -F component1 raid0

	- /usr/mdec/installboot -b 16 /usr/mdec/installboot.sym /dev/rwd0d

-- 
		David/absolute		-- www.netbsd.org: No hype required --