From ghelmer@mocha.cs.iastate.edu Tue May 25 07:52:44 1999
Return-Path: <ghelmer@mocha.cs.iastate.edu>
Received: from mocha.cs.iastate.edu (mocha.cs.iastate.edu [129.186.3.34])
	by hub.freebsd.org (Postfix) with ESMTP id AA25B15782
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 25 May 1999 07:52:41 -0700 (PDT)
	(envelope-from ghelmer@mocha.cs.iastate.edu)
Received: (from ghelmer@localhost)
	by mocha.cs.iastate.edu (8.9.3/8.9.1) id JAA13168;
	Tue, 25 May 1999 09:52:40 -0500 (CDT)
	(envelope-from ghelmer)
Message-Id: <199905251452.JAA13168@mocha.cs.iastate.edu>
Date: Tue, 25 May 1999 09:52:40 -0500 (CDT)
From: ghelmer@cs.iastate.edu
Sender: ghelmer@mocha.cs.iastate.edu
Reply-To: ghelmer@cs.iastate.edu
To: FreeBSD-gnats-submit@freebsd.org
Subject: /boot/loader doesn't pass RB_CONFIG flag to kernel
X-Send-Pr-Version: 3.2

>Number:         11884
>Category:       bin
>Synopsis:       /boot/loader doesn't provide a way to make kernel mount CDROM as root fs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 25 08:00:01 PDT 1999
>Closed-Date:    Thu Jun 3 22:19:46 CDT 1999
>Last-Modified:  Thu Jun  3 22:20:18 CDT 1999
>Originator:     Guy Helmer
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Iowa State University Department of Computer Science
>Environment:

FreeBSD 4.0-CURRENT #32: Fri May 14 08:48:35 CDT 1999

>Description:

/boot/loader ignores -C flag to request that thekernel mount the CD-ROM
as the root filesystem.  There does not exist an environment variable
setting for the boot loader to provide equivalent functionality.

>How-To-Repeat:

Boot from a CD-ROM and use "boot -C" to try to make the kernel mount
the CD-ROM as the root filesystem.  The kernel will not even check
the CD-ROM devices for a potential root filesystem.

>Fix:

The following patch adds a check for the boot_cdrom environment variable
and the -C flag, either of which will set the RB_CDROM flag to tell the
kernel to check the CD-ROM drives for a root filesystem.

--- sys/boot/i386/libi386/bootinfo.c.ORIG	Mon Mar 22 10:13:36 1999
+++ sys/boot/i386/libi386/bootinfo.c	Tue May 25 08:23:28 1999
@@ -47,6 +47,7 @@
     int		mask;
 } howto_names[] = {
     {"boot_askname",	RB_ASKNAME},
+    {"boot_cdrom",	RB_CDROM},
     {"boot_userconfig",	RB_CONFIG},
     {"boot_ddb",	RB_KDB},
     {"boot_gdb",	RB_GDB},
@@ -78,6 +79,9 @@
 		    break;
 		case 'c':
 		    howto |= RB_CONFIG;
+		    break;
+		case 'C':
+		    howto |= RB_CDROM;
 		    break;
 		case 'd':
 		    howto |= RB_KDB;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ghelmer 
State-Changed-When: Thu Jun 3 22:19:46 CDT 1999 
State-Changed-Why:  
Patch committed after review. 
>Unformatted:
