Add support for booting off RAIDframe RAID1 mirrors. Check the first partition
type in biosdiskopen(), and if it is of type FS_RAID, add 64 to d->b_off. NOTE: installboot(8) still needs some hacking to DTRT, but at least this way if you can load "/boot" off another partition (e.g, wd0h), then wd0a can be of type `RAID' with a raidframe mirror at the start and the kernel will load OK of wd0a, and with raidctl -A root partitions, it will change root as well.
This commit is contained in:
parent
10203d4eca
commit
b14a596beb
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: biosdisk.c,v 1.12 1999/08/03 19:46:22 drochner Exp $ */
|
||||
/* $NetBSD: biosdisk.c,v 1.13 2000/10/30 07:30:59 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1998
|
||||
|
@ -96,6 +96,8 @@ struct biosdisk {
|
|||
static struct btinfo_bootdisk bi_disk;
|
||||
#endif
|
||||
|
||||
#define RF_PROTECTED_SECTORS 64 /* XXX refer to <.../rf_optnames.h> */
|
||||
|
||||
int
|
||||
biosdiskstrategy(devdata, flag, dblk, size, buf, rsize)
|
||||
void *devdata;
|
||||
|
@ -256,6 +258,8 @@ biosdiskopen(struct open_file *f, ...)
|
|||
goto out;
|
||||
} else {
|
||||
d->boff = lp->d_partitions[partition].p_offset;
|
||||
if (lp->d_partitions[partition].p_fstype == FS_RAID)
|
||||
d->boff += RF_PROTECTED_SECTORS;
|
||||
#ifdef COMPAT_OLDBOOT
|
||||
d->disktype = lp->d_type;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue