Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jul 1999 11:32:49 -0700 (PDT)
From:      Murray Stokely <murray@disco.cdrom.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/12564: Sysinstall can not use live filesystem from CDROM
Message-ID:  <199907081832.LAA18199@disco.cdrom.com>

next in thread | raw e-mail | index | archive | help

>Number:         12564
>Category:       bin
>Synopsis:       Sysinstall can not use live filesystem from CDROM
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul  8 11:40:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Murray Stokely
>Release:        FreeBSD 3.2-STABLE i386
>Organization:
Walnut Creek CDROM
>Environment:

  FreeBSD 3.2 / i386

>Description:

  Sysinstall will not allow you too use the Live filesystem CDROM
(disc #2) because it is located on the same CDROM where the Alpha
installation resides and the generic sysinstall CDROM handling
routines barfs when you try to read an Alpha CDROM (as defined in
cdrom.inf) on a i386 machine.  So you can not use the live filesystem
on i386 machines with the official FreeBSD 3.2 CDROM set.

>How-To-Repeat:

  Boot off of the first disc, when in sysinstall, select 'Fixit' then
insert the live filesystem CD as it requests.  You will get an error
saying it is for the wrong architecture.

>Fix:
	
  This patch fixes the problem by adding a 'IGNOREARCH' flag into the
flags variable of the mediaDevice.  It then checks this flag only when
you are attempting to read the live filesystem.  So the architecture
check is still in place except for when you are trying to use the live
filesystem cd.

/usr/src/release# patch < arch.patch

diff -c -r sysinstall.old/cdrom.c sysinstall/cdrom.c
*** sysinstall.old/cdrom.c	Thu May 20 08:57:41 1999
--- sysinstall/cdrom.c	Thu Jul  8 10:59:35 1999
***************
*** 142,148 ****
  		else
  		    bogusCDOK = TRUE;
  	    }
! 	    if ((cp = property_find(cd_attr, "CD_MACHINE_ARCH")) != NULL) {
  #ifdef __alpha__
  		if (strcmp(cp, "alpha")) {
  #else
--- 142,149 ----
  		else
  		    bogusCDOK = TRUE;
  	    }
! 	    if (((cp = property_find(cd_attr, "CD_MACHINE_ARCH")) != NULL) &&
! 		(!dev->flags & IGNOREARCH)) {
  #ifdef __alpha__
  		if (strcmp(cp, "alpha")) {
  #else
diff -c -r sysinstall.old/install.c sysinstall/install.c
*** sysinstall.old/install.c	Wed Jul  7 04:26:44 1999
--- sysinstall/install.c	Thu Jul  8 11:11:38 1999
***************
*** 257,263 ****
      variable_set2(SYSTEM_STATE, "fixit", 0);
      (void)unlink("/mnt2");
      (void)rmdir("/mnt2");
! 
      while (1) {
  	msgConfirm("Please insert a FreeBSD live filesystem CDROM and press return");
  	if (DITEM_STATUS(mediaSetCDROM(NULL)) != DITEM_SUCCESS || !mediaDevice || !mediaDevice->init(mediaDevice)) {
--- 257,264 ----
      variable_set2(SYSTEM_STATE, "fixit", 0);
      (void)unlink("/mnt2");
      (void)rmdir("/mnt2");
!     mediaDevice->flags |= IGNOREARCH; /* Set a flag to ignore the  */
! 				      /* architecture of the CDROM */
      while (1) {
  	msgConfirm("Please insert a FreeBSD live filesystem CDROM and press return");
  	if (DITEM_STATUS(mediaSetCDROM(NULL)) != DITEM_SUCCESS || !mediaDevice || !mediaDevice->init(mediaDevice)) {
diff -c -r sysinstall.old/sysinstall.h sysinstall/sysinstall.h
*** sysinstall.old/sysinstall.h	Wed Jul  7 04:26:45 1999
--- sysinstall/sysinstall.h	Thu Jul  8 10:59:09 1999
***************
*** 238,243 ****
--- 238,246 ----
  #define CD_ALREADY_MOUNTED	1
  #define CD_WE_MOUNTED_IT	2
  
+ /* DEVICE Flags */
+ #define IGNOREARCH              1
+ 
  /* A "device" from sysinstall's point of view */
  typedef struct _device {
      char name[DEV_NAME_MAX];


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907081832.LAA18199>