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 16:14:16
	Of course there _had_ to be a typo in it :)

	Version II

	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. You can raid the entire disk, or just part,
	  using the remainder for less critical storage, or even swap.

	- 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

	- Setup the raid
	  raidctl -C /etc/raid0.conf raid0
	  raidctl -i raid0		(Ignore error messages)

	- disklabel -i -I raid0
	  Create at least raid0a.

	- Copy installed system from / to /mnt. Dump, pax, or tar OK.
	  eg:
	  newfs raid0a
	  mount /dev/raid0a /mnt	(If separate /usr etc, newfs & mount).
	  eg: 'cd / ; pax -X -rw -pe / /mnt'

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

	- /usr/mdec/installboot -b 16 /usr/mdec/biosboot.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/biosboot.sym /dev/rwd0d


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