📄 00000001.htm
字号:
这 片 "特 殊" 片 子 看 来 像 是 XA 碟 片 ( 就 像 相 片 光 碟 或 用 CD-R 烧 <BR>的 "一 次 写 入" (one-offs) 片 子 ) 多 数 Linux 核 心 CD-ROM 驱 动 程 式 并 <BR>不 支 援 XA 格 式 , 虽 然 你 也 许 能 在 一 些 档 案 库 找 到 一 些 修 补. <BR> <BR>sbpcd 驱 动 程 式 是 支 援 XA 的. 如 果 你 用 这 驱 动 程 式 , 你 可 以 依 <BR>以 下 方 法 确 定 片 子 是 不 是 XA 的 格 式: 修 改 sbpcd.c, 允 许 显 示 "目 <BR>录" (TOC) 资 讯 (DBG_TOC). 然 後 做 新 核 心 , 起 动 它. 则 每 次 挂 上 时 <BR>都 会 显 示 TOC ( 由 主 控 台 或 记 录 档 ). 看 第 一 个 数 字 , 如 果 是 20 <BR>, 那 就 是 XA 片 子 , 如 果 是 00 , 那 就 是 普 通 片 子 . 如 果 TOC 显 示 <BR>不 同 的 轨, 那 也 是 XA 片 子 的 信 号. <BR> <BR>(感 谢 Eberhard Moenkeberg 提 供 以 上 资 讯) <BR> <BR>其 它 的 无 法 读 取 CD 可 能 原 因: <BR> <BR> 1. 它 不 是 用 ISO-9660 档 案 系 统 ( 如 : 有 的 用 SunOS) <BR> 2. 它 是 CD 唱 片 <BR> 3. CD 有 损 坏 或 毁 伤 <BR> 4. 你 把 光 碟 片 放 反 了 :-) <BR> <BR>6.11 多 片 装 CD-ROM 在 Linux 下 能 用 吗 ? <BR> <BR>好 几 位 使 用 者 已 报 告 SCSI CD-ROM 多 片 机 种 运 作 顺 利. 你 也 许 要 <BR>打 开 " 对 每 一 个 SCSI 装 置 侦 测 所 有 LUN" 的 核 心 选 项. 起 码 使 用 <BR>者 也 要 加 大 驱 动 程 式 中 的 SCSI 超 时 等 待 值. Nakamichi MBR-7 的 七 <BR>片 装 及 先 锋 牌 的 12 片 装 已 确 定 能 用. <BR> <BR>EIDE/ATAPI 的 多 片 机 种 也 可 用. 2.0 版 核 心 对 一 些 机 器 使 用 <BR>CDROMLOADFROMSLOT 这 个 ioctl 函 式 做 了 初 步 支 援. IDECD 驱 动 程 式 的 <BR>文 件 档 包 含 了 一 个 原 始 码 可 做 一 般 程 式 选 择 换 片 槽 的 参 考. <BR>或 者 你 也 可 以 找 最 新 版 的 eject 程 式. <BR> <BR>6.12 我 得 到 "/cdrom: Permission denied" 错 误 <BR> <BR>有 些 CD 有 档 案 权 限 , 仅 允 许 root 读 取 它. 1995 年 三 月 的 InfoMagic <BR>CD set 就 是 一 个 好 例 子. 这 真 的 是 很 不 方 便. <BR> <BR>底 下 的 修 补 , 由 Christoph Lameter(<A HREF="mailto:clameter@waterf.org)">clameter@waterf.org)</A> 好 意 提 供 , 用 <BR>它 修 补 核 心 , 解 决 这 问 题. <BR> <BR>From: <A HREF="mailto:clameter@waterf.org">clameter@waterf.org</A> (Christoph Lameter) <BR>Newsgroups: comp.os.linux.setup <BR>Subject: Infomagic Developers Set: Fix for CD-Rom permissions <BR>Date: 12 Apr 1995 20:32:03 -0700 <BR>Organization: The Water Fountain - Mining for streams of Living Water <BR>NNTP-Posting-Host: waterf.org <BR>X-Newsreader: TIN [version 1.2 PL2] <BR> <BR>The March 1995 Edition of the Infomagic Developers CD-ROM Set has <BR>problems because the information stored in the root directory <BR>permissions is causing the following problems with using the CDs <BR> <BR>(1995年三月版的InfoMagic Developers CD-ROM set有问题,因为它在根目录存取权限处 <BR>存的资讯造成以下使用CD的问题.) <BR> <BR>1. Disc1 will always have the owner/group of 5101/51 and has write <BR>access allowed (?) <BR> <BR>(1. 第一片的拥有者/群组是5101/51,然後居然允许写入(?)) <BR> <BR>2. Disc2 and 3 have rwx set for root and no rights at all for any <BR>other group/user. These discs cannot be accessed from any user other <BR>than root! I run a BBS and I need to make them accessible for download <BR>by others. <BR> <BR>(2. 第二,三片对root有rwx权力,而对其它人/群组什麽也不给. 这两片光碟除了 <BR>root外任何人均无法存取! 我正在跑BBS,需要让别人能下载它们!) <BR> <BR>I have seen several fixes to this problem already floating <BR>around. Trouble is that these fixes usually change the rights for ALL <BR>directories on the CD. This fix here changes ONLY the rights for the <BR>root directory of the CD-Rom. If you want to run parts of Linux <BR>directly off the CD you might run into trouble if all directories are <BR>readable for everyone and if they are all owned by root. <BR> <BR>(我已经看到这问题的几个解决之道了. 麻烦的是它们会影响光碟上所有目录的 <BR>存取权.我的修正只改了它的根目录存取权. 如果你想在光碟上跑东东,而所有目录 <BR>都可存取的话,会带来麻烦,因为他们是root所有.) <BR> <BR>This fix will set the rights for the root directory to r-xr-xr-x and <BR>the owner/group to the values indicated in the uid and gid options to <BR>the mount command. <BR> <BR>(这个修补会将根目录权限改成r-xr-xr-x,将所有人/群组改成mount那人的 <BR>uid及gid) <BR> <BR>To apply:(用法:) <BR> cd /usr/src/linux/fs/isofs <BR> patch <**THIS MESSAGE** <BR> <BR>and recompile kernel (you may have to fix up the patch by hand <BR>depending on your kernel version). <BR>(然後重编译核心(依你的核心版本,可能要手动修补.)) <BR> <BR>This fix should probably be incorporated into the kernel. What business <BR>does data on a CD have to mess around with the permissions/owners of the <BR>mount-point anyways? <BR>(这个修正也许已放进核心了. 到底是什麽事,非要存放让挂载点的权限/所有人资料 <BR>变一团糟呢?) <BR> <BR>--- inode.c.ORIG Wed Apr 12 17:24:36 1995 <BR>+++ inode.c Wed Apr 12 17:59:12 1995 <BR>@@ -552,7 +552,15 @@ <BR> these numbers in the inode structure. */ <BR> <BR> if (!high_sierra) <BR>- parse_rock_ridge_inode(raw_inode, inode); <BR>+ { parse_rock_ridge_inode(raw_inode, inode); <BR>+ /* check for access to the root directory rights/owner CL */ <BR>+ if((inode->i_sb->u.isofs_sb.s_firstdatazone) == inode->i_ino) <BR>+ { /* Change owner/rights to the ones demanded by the mount command */ <BR>+ inode->i_uid = inode->i_sb->u.isofs_sb.s_uid; <BR>+ inode->i_gid = inode->i_sb->u.isofs_sb.s_gid; <BR>+ inode->i_mode = S_IRUGO | S_IXUGO | S_IFDIR; <BR>+ } <BR>+ } <BR> <BR> #ifdef DEBUG <BR> printk("Inode: %x extent: %x\n",inode->i_ino, inode->u.isofs_i.i_first_extent); <BR>@@ -805,4 +813,3 @@ <BR> } <BR> <BR> #endif <BR>- <BR> <BR>注意以上的修补有些旧了, 可能无法完全乾净地修补最新的2.0版核心, 也请参考 本篇 <BR>後面提到的隐藏档的相关问题. <BR> <BR>6.13 我 如 何 读 懂 IDE CD 的 核 心 错 误 讯 息 ? <BR> <BR>核 心 送 给 我 的 IDE CD-ROM 驱 动 程 式 讯 息 像: "hdxx: code: xx key: x <BR>asc: xx ascq: x",这 是 什 麽 意 思? <BR> <BR>这 是 IDE CD-ROM 的 状 态 / 错 误 报 告. 预 设 状 况 下 , IDECD 印 出 最 原 <BR>始 的 资 讯 , 而 不 浪 费 核 心 空 间 给 错 误 讯 息 . 你 可 以 改 变 它 , <BR>让 它 显 示 真 正 的 错 误 讯 息. 修 改 <BR>/usr/src/linux/drivers/block/ide-cd.c , 将 VERBOSE_IDE_CD_ERRORS 改 成 1, 并 <BR>重 编 译 核 心. <BR> <BR>---------------------------------------------------------------------------- <BR> <BR>译 注: SCSI 的 也 有 类 似 情 形. 如 果 你 对 最 後 的 问 题 "verbose SCSI <BR>error report..." 回 答 n, 那 可 减 少 12K 的 记 忆 体 浪 费, 但 显 示 出 的 <BR>讯 息 嘛... 看 不 懂. 我 个 人 是 宁 可 耗 多 点 RAM 换 取 看 得 懂 啦! <BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -