Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 May 1998 21:58:33 +0200 (CEST)
From:      Stefan Eggers <seggers@semyam.dinoco.de>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Cc:        seggers@semyam.dinoco.de
Subject:   misc/6752: sysinstall w/o cd9660 fs loaded can't mount CD
Message-ID:  <199805251958.VAA02393@semyam.dinoco.de>

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

>Number:         6752
>Category:       misc
>Synopsis:       sysinstall w/o cd9660 fs loaded can't mount CD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 25 13:00:00 PDT 1998
>Last-Modified:
>Originator:     Stefan Eggers
>Organization:
none
>Release:        FreeBSD 2.2.6-STABLE i386
>Environment:

	I use a kernel w/o cd9660 fs built in and it doesn't get
loaded on system startup - the first mount of a CD-ROM will have to
load it.  The kernel is pretty much GENERIC with unnecessary stuff
removed.

>Description:

	When the cd9660 LKM is not loaded and it is not compiled into
the kernel sysinstall can't mount the CD-ROM.

>How-To-Repeat:

	Make a kernel w/o cd9660 fs and make sure the cd9660 fs module
is not loaded.  Now start sysinstall and try to install some package
from CD-ROM.

>Fix:
	
	This fix I made for 2.2-stable from about a week ago - about
May 17.  I copied the code mount_cd9660 uses and added it to the
relevant place in sysinstall.  As I was at it I also changed mount() a
little bit to be more the way mount_cd9660 is instead of the - accor-
ding to the comment below the example in vfsload(3) - old way of doing
it.

*** cdrom.c.ORIG	Wed Jan 29 02:11:22 1997
--- cdrom.c	Mon May 25 21:26:42 1998
***************
*** 61,66 ****
--- 61,67 ----
      char *cp;
      Boolean readInfo = TRUE;
      char *mountpoint = "/dist";
+     struct vfsconf *vfc;
  
      if (cdromMounted)
  	return TRUE;
***************
*** 74,80 ****
  
      Mkdir(mountpoint);
  
!     if (mount(MOUNT_CD9660, mountpoint, MNT_RDONLY, (caddr_t) &args) == -1) {
  	if (errno == EINVAL) {
  	    msgConfirm("The CD in your drive looks more like an Audio CD than a FreeBSD release.");
  	    return FALSE;
--- 75,95 ----
  
      Mkdir(mountpoint);
  
!     vfc = getvfsbyname("cd9660");
!     if ((vfc == NULL) && vfsisloadable("cd9660")) {
! 	if (vfsload("cd9660") != 0) {
! 	    msgConfirm("Can't load CD filesystem.");
! 	    return FALSE;
! 	}
! 	endvfsent(); /* flush cache */
! 	vfc = getvfsbyname("cd9660");
!     }
!     if (vfc == NULL)
!     {
! 	msgConfirm("CD filesystem neither in kernel nor loadable as LKM.");
! 	return FALSE;
!     }
!     if (mount(vfc->vfc_index, mountpoint, MNT_RDONLY, (caddr_t) &args) == -1) {
  	if (errno == EINVAL) {
  	    msgConfirm("The CD in your drive looks more like an Audio CD than a FreeBSD release.");
  	    return FALSE;
>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?199805251958.VAA02393>