From owner-freebsd-hackers Thu Nov 2 09:39:26 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id JAA08229 for hackers-outgoing; Thu, 2 Nov 1995 09:39:26 -0800 Received: from seattle.polstra.com (seattle.polstra.com [198.211.214.4]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id JAA08221 for ; Thu, 2 Nov 1995 09:39:20 -0800 Received: by seattle.polstra.com (Smail3.1.28.1 #5) id m0tB3bY-00006mC; Thu, 2 Nov 95 09:39 PST Message-Id: Date: Thu, 2 Nov 95 09:39 PST From: jdp@polstra.com (John Polstra) To: jkh@time.cdrom.com Subject: Re: More nits (CDROM) Newsgroups: polstra.freebsd.hackers In-Reply-To: <844.815252532@time.cdrom.com> Organization: Polstra & Co., Seattle, WA Cc: freebsd-hackers@freebsd.org Sender: owner-hackers@freebsd.org Precedence: bulk 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