From owner-freebsd-bugs Thu Jul 8 11:40:10 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id C3B5A154E1 for ; Thu, 8 Jul 1999 11:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id LAA42698; Thu, 8 Jul 1999 11:40:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from disco.cdrom.com (disco.cdrom.com [204.216.28.173]) by hub.freebsd.org (Postfix) with ESMTP id 9DEF714F7C for ; Thu, 8 Jul 1999 11:38:30 -0700 (PDT) (envelope-from murray@disco.cdrom.com) Received: (from murray@localhost) by disco.cdrom.com (8.9.3/8.9.2) id LAA18199; Thu, 8 Jul 1999 11:32:49 -0700 (PDT) (envelope-from murray) Message-Id: <199907081832.LAA18199@disco.cdrom.com> Date: Thu, 8 Jul 1999 11:32:49 -0700 (PDT) From: Murray Stokely Reply-To: murray@disco.cdrom.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/12564: Sysinstall can not use live filesystem from CDROM Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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