Hello Martin. Doesn't boot -a already do this by allowing you to select the root filesystem and the init path? I'm certain I've booted systems running with raid roots off of cdroms for repair purposes. -Brian
On Apr 18, 7:41am, Martin Husemann wrote: } Subject: New boothowto flag to prevent raid auto-root-configuration } } --6c2NcOVqGQ03X4Wi } Content-Type: text/plain; charset=us-ascii } Content-Disposition: inline } } Hi folks, } } as described in PR 44774 (see } http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44774), it is } currently not possible to use a standard NetBSD install CD on a system } wich normally boots from raid (at least on i386, amd64 or sparc64, where } a stock GENERIC kernel is used). } } To fix this, I'd like to introduce a new boothowto flag, that turns off } all magic to override the root device (for now: turns off the root part } of raidframe autoconfiguration, but could do similar things in the future } with LVM or whatever). } } The patch attched does this. It will be accompanied by bootloader changes to } set this flag if a new keyword is present in /boot.cfg. } } What do you think? Better naming suggestion also welcome. } } Martin } } } --6c2NcOVqGQ03X4Wi } Content-Type: text/plain; charset=us-ascii } Content-Disposition: attachment; filename="rf.patch" } } Index: sys/reboot.h } =================================================================== } RCS file: /cvsroot/src/sys/sys/reboot.h,v } retrieving revision 1.25 } diff -c -u -r1.25 reboot.h } --- sys/reboot.h 25 Dec 2007 18:33:48 -0000 1.25 } +++ sys/reboot.h 18 Apr 2011 05:34:01 -0000 } @@ -53,6 +53,9 @@ } #define RB_STRING 0x00000400 /* use provided bootstr */ } #define RB_POWERDOWN (RB_HALT|0x800) /* turn power off (or at least halt) */ } #define RB_USERCONF 0x00001000 /* change configured devices */ } +#define RB_NO_ROOT_OVERRIDE 0x00002000 /* no automatic override of the booted } + * device, like raidframes auto } + * root configuration */ } } /* } * Extra autoboot flags (passed by boot prog to kernel). See also } Index: dev/raidframe/rf_netbsdkintf.c } =================================================================== } RCS file: /cvsroot/src/sys/dev/raidframe/rf_netbsdkintf.c,v } retrieving revision 1.284 } diff -c -u -r1.284 rf_netbsdkintf.c } --- dev/raidframe/rf_netbsdkintf.c 18 Mar 2011 23:53:26 -0000 1.284 } +++ dev/raidframe/rf_netbsdkintf.c 18 Apr 2011 05:34:01 -0000 } @@ -465,7 +465,7 @@ } /* if the user has specified what the root device should be } then we don't touch booted_device or boothowto... */ } } - if (rootspec != NULL) } + if ((rootspec != NULL) || (boothowto & RB_NO_ROOT_OVERRIDE)) } return; } } /* we found something bootable... */ } } --6c2NcOVqGQ03X4Wi-- >-- End of excerpt from Martin Husemann