Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 1998 17:06:54 +0000 (GMT)
From:      Andrew Gordon <arg@arg1.demon.co.uk>
To:        stable@FreeBSD.ORG
Subject:   Problem with CD9660 root on -stable
Message-ID:  <Pine.BSF.3.96.981205163230.5450A-200000@server.arg.sj.co.uk>

next in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1577300402-912877614=:5450
Content-Type: TEXT/PLAIN; charset=US-ASCII

I've been playing with CD root filesystem ('-C' at the boot prompt).  All
seems to be OK on SCSI systems, within the limited scope of my testing.
However, using an IDE/ATAPI CDROM fails to mount the root filesystem.

Having traced this a bit, I find that iso_get_ssector()  [in
sys/isofs/cd9660/cd9660_vfsops.c] is returning bogus results; my immediate
problem can be fixed by hacking it to return zero always (disabling
support for multi-session CDROMs).

Digging a little deeper, it appears that the wdc driver implements
CDIOREADTOCENTRYS but not the related CDIOREADTOCENTRY that is needed by
iso_get_ssector().  This should still be OK - iso_get_sector() traps the
error and simply assumes a single-session CD in this case - but
unfortunately the error test is wrong (because it is calling the driver's
ioctl entry point directly, the return value is zero or an errno value).
The enclosed patch fixes the problem.

--0-1577300402-912877614=:5450
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="cd9660.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.BSF.3.96.981205170654.5450B@server.arg.sj.co.uk>
Content-Description: 

SW5kZXg6IGlzb2ZzL2NkOTY2MC9jZDk2NjBfdmZzb3BzLmMNCj09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT0NClJDUyBmaWxlOiAvY3VycmVudC9yZXBvc2l0b3J5
L3NyYy9zeXMvaXNvZnMvY2Q5NjYwL2NkOTY2MF92ZnNvcHMuYyx2DQpyZXRy
aWV2aW5nIHJldmlzaW9uIDEuMTUuNC4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lmIChpb2N0bHAoZGV2LCBDRElPUkVBRFRPQ0VO
VFJZLCAoY2FkZHJfdCkmdCwgRlJFQUQsIHApICE9IDApDQogIAkJCXJldHVy
biAwOw0KICAJCWlmICgodC5lbnRyeS5jb250cm9sICYgNCkgIT0gMCkNCiAg
CQkJLyogZm91bmQgYSBkYXRhIHRyYWNrICovDQo=
--0-1577300402-912877614=:5450--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.981205163230.5450A-200000>