Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 95 09:39 PST
From:      jdp@polstra.com (John Polstra)
To:        jkh@time.cdrom.com
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: More nits (CDROM)
Message-ID:  <m0tB3bY-00006mC@seattle.polstra.com>
In-Reply-To: <844.815252532@time.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <844.815252532@time.cdrom.com> you write:
> > 1. If a CD-ROM is specified in /etc/fstab, and there is no CD in the
> >    drive, the mount will fail and rc will abort.  This doesn't make
> >    much sense, especially for people who don't understand the
> >    background.
> > 
> >    I'd like some feedback on whether you would like to change this,
> >    since otherwise I need to talk about it in my book.
> 
> This is a known bug, and it would appear that nobody is particularly
> keen to change it.  I beat my chest about it several times and
> everybody involved just sort of waffled on it until the subject died
> down again.  Until then, I may just take the automount of the CDROM
> out of /etc/fstab and have people do it by hand.  I hate this, but I
> lack the time to go fix whatever stupidity it is in our system that
> prevents the system from coming up whenever a CDROM isn't in the
> drive.  Unless we fix it, /cdrom is coming out of the default fstab
> in 2.1.  Better a system that comes up without a CDROM rather than
> one that doesn't!

Wait, don't do anything drastic.  This problem is easy to fix in the
/etc/rc file.  Here's what I did to mine (diffs relative to 2.0.5-RELEASE):

-------------------------------------------------------------------------------
*** /cdrom/etc/rc	Fri Jun  9 13:05:10 1995
--- rc	Tue Jun 20 09:13:37 1995
***************
*** 72,82 ****
  
  umount -a >/dev/null 2>&1
  
! mount -a -t nonfs
  if [ $? != 0 ]; then
  	echo "Filesystem mount failed, startup aborted"
  	exit 1
  fi
  
  # If the machine runs wall CMOS clock (compatible with MSDOS),
  # activate following line by creating empty file /etc/wall_cmos_clock
--- 72,84 ----
  
  umount -a >/dev/null 2>&1
  
! mount -a -t nonfs,cd9660
  if [ $? != 0 ]; then
  	echo "Filesystem mount failed, startup aborted"
  	exit 1
  fi
+ 
+ mount -a -t cd9660 >/dev/null 2>&1
  
  # If the machine runs wall CMOS clock (compatible with MSDOS),
  # activate following line by creating empty file /etc/wall_cmos_clock
-------------------------------------------------------------------------------

Explanation:  The original mount is changed so that it does not attempt
to mount the CD-ROM.  This mount command still is required to succeed.
Then a separate mount is attempted on just the CD-ROM.  Errors from this
mount command are sent to the bit bucket.

I've been using this ever since installing 2.0.5.  It works great.  If a
CD-ROM is in the drive at boot time, then the system comes up with it
mounted.  If the drive is empty, the system still comes up.

-- 
   John Polstra                                       jdp@polstra.com
   Polstra & Co., Inc.                        Seattle, Washington USA
   "Self-knowledge is always bad news."                 -- John Barth



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