Modify the boot loader to recognize the -C flag and pass the RB_CDROM

flag to the kernel to mount a CDROM as the root filesystem.  Alternatively,
the boot_cdrom env var can be set.

As Mike Smith noted, "-C is the "wrong" way to do this", but this is
an acceptable stopgap in lieu of a better way.

PR:		bin/11884
Reviewed by:	msmith@freebsd.org
This commit is contained in:
ghelmer 1999-06-04 03:18:28 +00:00
parent 3176b666ac
commit b7771a65a4
3 changed files with 15 additions and 3 deletions

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: bootinfo.c,v 1.17 1999/03/08 11:05:52 dcs Exp $
* $Id: bootinfo.c,v 1.18 1999/03/18 14:36:22 dcs Exp $
*/
#include <stand.h>
@ -47,6 +47,7 @@ static struct
int mask;
} howto_names[] = {
{"boot_askname", RB_ASKNAME},
{"boot_cdrom", RB_CDROM},
{"boot_userconfig", RB_CONFIG},
{"boot_ddb", RB_KDB},
{"boot_gdb", RB_GDB},
@ -79,6 +80,9 @@ bi_getboothowto(char *kargs)
case 'c':
howto |= RB_CONFIG;
break;
case 'C':
howto |= RB_CDROM;
break;
case 'd':
howto |= RB_KDB;
break;

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: bootinfo.c,v 1.17 1999/03/08 11:05:52 dcs Exp $
* $Id: bootinfo.c,v 1.18 1999/03/18 14:36:22 dcs Exp $
*/
#include <stand.h>
@ -47,6 +47,7 @@ static struct
int mask;
} howto_names[] = {
{"boot_askname", RB_ASKNAME},
{"boot_cdrom", RB_CDROM},
{"boot_userconfig", RB_CONFIG},
{"boot_ddb", RB_KDB},
{"boot_gdb", RB_GDB},
@ -79,6 +80,9 @@ bi_getboothowto(char *kargs)
case 'c':
howto |= RB_CONFIG;
break;
case 'C':
howto |= RB_CDROM;
break;
case 'd':
howto |= RB_KDB;
break;

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: bootinfo.c,v 1.17 1999/03/08 11:05:52 dcs Exp $
* $Id: bootinfo.c,v 1.18 1999/03/18 14:36:22 dcs Exp $
*/
#include <stand.h>
@ -47,6 +47,7 @@ static struct
int mask;
} howto_names[] = {
{"boot_askname", RB_ASKNAME},
{"boot_cdrom", RB_CDROM},
{"boot_userconfig", RB_CONFIG},
{"boot_ddb", RB_KDB},
{"boot_gdb", RB_GDB},
@ -79,6 +80,9 @@ bi_getboothowto(char *kargs)
case 'c':
howto |= RB_CONFIG;
break;
case 'C':
howto |= RB_CDROM;
break;
case 'd':
howto |= RB_KDB;
break;