From owner-freebsd-questions Sat Jul 21 19:54:48 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-27-141-144.mmcable.com [24.27.141.144]) by hub.freebsd.org (Postfix) with SMTP id 2511437B401 for ; Sat, 21 Jul 2001 19:54:45 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 54694 invoked by uid 100); 22 Jul 2001 02:54:44 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15194.16500.171698.883443@guru.mired.org> Date: Sat, 21 Jul 2001 21:54:44 -0500 To: Ed Alley Cc: , Subject: Re: Why panic when mounting bad CD? In-Reply-To: <20010721191608.U4095-100000@jordan.llnl.gov> References: <15193.48484.879754.875650@guru.mired.org> <20010721191608.U4095-100000@jordan.llnl.gov> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Ed Alley types: > So fixating a disk is the same as writing and/or validating the > file system descriptor tables for the ISO filesystem on the CD. > I see the problem. I don't know that that's what fixating a disk actually does. It seems more likely that "fixating" writes an "end of volume" mark of some kind, and without that you just read off the end of what you are written. That's just speculation, though. > Thanks for the explanation Mike, I learned alot; if I knew anything > about ISO9660 I would try to figure something out myself. :( I don't know very much about it myself. I know a bit about what it's capable of, but not any real details. You're welcome, On Sat, 21 Jul 2001, Mike Meyer wrote: > > > Ed Alley types: > > > I am running FreeBSD 4.3 with an HP 9500 ide CD-RW. > > > > > > My question is why does the kernel panic > > > under these conditions? Does it get lost > > > trying to find the disklabel or does the > > > kernel think that the numbers it picked > > > up are the disklabel and merrily goes > > > off into some other world looking for > > > the superblock? > > > > CD's generally use the ISO 9660 file system, not UFS. They don't have > > superblocks or disklabels, they have volume descriptors. And yes, if a > > file system has bogus description data in it, the system tends to > > crash while trying to deal with it. This is true for most file > > systems. > > > > > Wouldn't it be a good idea to have a > > > magic number in with the disklabel > > > that the kernel could test against > > > before it believes what it finds? > > > > UFS has a magic number in the superblock, and it's checked. ISO 9660 > > file systems also have a magic number in the volume descriptor, and > > that's checked. The code in -stable check for either the ISO 9660 or > > the ISO SIERRA magic numbers, as it understands both formats. > > > > Neither of these guarantee that the file system descriptor tables are > > actually correct. Mounting a file system with a valid magic number and > > bogus descriptor tables is generally a bad idea. It appears that an > > unfixated CD meets that description. There may be a way to detect that > > the CD is unfixated; if so, submitting a patch to the > > /usr/src/sys/isofs/cd9660_vfsops.c via a PR would be appreciated. > > > > > -- > > Mike Meyer http://www.mired.org/home/mwm/ > > Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. > > > > > > -- Mike Meyer http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message