⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cdrom-howto-6.html

📁 CD-ROM使用与维修资料大全
💻 HTML
📖 第 1 页 / 共 2 页
字号:
Subject: Infomagic Developers Set: Fix for CD-Rom permissionsDate: 12 Apr 1995 20:32:03 -0700Organization: The Water Fountain - Mining for streams of Living WaterNNTP-Posting-Host: waterf.orgX-Newsreader: TIN [version 1.2 PL2]The March 1995 Edition of the Infomagic Developers CD-ROM Set hasproblems because the information stored in the root directorypermissions is causing the following problems with using the CDs(1995年三月版的InfoMagic Developers CD-ROM set有问题,因为它在根目录存取权限处存的资讯造成以下使用CD的问题.) 1. Disc1 will always have the owner/group of 5101/51 and has writeaccess allowed (?)(1. 第一片的拥有者/群组是5101/51,然後居然允许写入(?))2. Disc2 and 3 have rwx set for root and no rights at all for anyother group/user. These discs cannot be accessed from any user otherthan root! I run a BBS and I need to make them accessible for downloadby others.(2. 第二,三片对root有rwx权力,而对其它人/群组什麽也不给. 这两片光碟除了root外任何人均无法存取! 我正在跑BBS,需要让别人能下载它们!)I have seen several fixes to this problem already floatingaround. Trouble is that these fixes usually change the rights for ALLdirectories on the CD. This fix here changes ONLY the rights for theroot directory of the CD-Rom. If you want to run parts of Linuxdirectly off the CD you might run into trouble if all directories arereadable for everyone and if they are all owned by root.(我已经看到这问题的几个解决之道了. 麻烦的是它们会影响光碟上所有目录的存取权.我的修正只改了它的根目录存取权. 如果你想在光碟上跑东东,而所有目录都可存取的话,会带来麻烦,因为他们是root所有.)This fix will set the rights for the root directory to r-xr-xr-x andthe owner/group to the values indicated in the uid and gid options tothe mount command.(这个修补会将根目录权限改成r-xr-xr-x,将所有人/群组改成mount那人的uid及gid)To apply:(用法:) cd /usr/src/linux/fs/isofs patch &lt;**THIS MESSAGE**and recompile kernel (you may have to fix up the patch by handdepending on your kernel version).(然後重编译核心(依你的核心版本,可能要手动修补.))This fix should probably be incorporated into the kernel. What business does data on a CD have to mess around with the permissions/owners of the mount-point anyways?(这个修正也许已放进核心了. 到底是什麽事,非要存放让挂载点的权限/所有人资料变一团糟呢?)--- inode.c.ORIG        Wed Apr 12 17:24:36 1995+++ inode.c     Wed Apr 12 17:59:12 1995@@ -552,7 +552,15 @@    these numbers in the inode structure. */         if (!high_sierra)-         parse_rock_ridge_inode(raw_inode, inode);+       {  parse_rock_ridge_inode(raw_inode, inode);+           /* check for access to the root directory rights/owner CL */+          if((inode-&gt;i_sb-&gt;u.isofs_sb.s_firstdatazone) == inode-&gt;i_ino)+           { /* Change owner/rights to the ones demanded by the mount command */+             inode-&gt;i_uid = inode-&gt;i_sb-&gt;u.isofs_sb.s_uid;+             inode-&gt;i_gid = inode-&gt;i_sb-&gt;u.isofs_sb.s_gid;+            inode-&gt;i_mode = S_IRUGO | S_IXUGO | S_IFDIR;+           }+        }         #ifdef DEBUG        printk(&quot;Inode: %x extent: %x\n&quot;,inode-&gt;i_ino, inode-&gt;u.isofs_i.i_first_extent);@@ -805,4 +813,3 @@ }  #endif-</PRE><P>注意以上的修补有些旧了, 可能无法完全乾净地修补最新的2.0版核心, 也请参考本篇後面提到的隐藏档的相关问题.<P><H2><A NAME="ss6.13">6.13 我如何读懂 IDE CD 的核心错误讯息?</A></H2><P><P>核心送给我的 IDE CD-ROM 驱动程式讯息像: ``hdxx: code: xx key: x asc: xx ascq: x'',这是什麽意思?<P>这是 IDE CD-ROM 的状态/错误报告. 预设状况下, IDECD 印出最原始的资讯, 而不浪费核心空间给错误讯息. 你可以改变它, 让它显示真正的错误讯息. 修改 /usr/src/linux/drivers/block/ide-cd.c, 将 VERBOSE_IDE_CD_ERRORS 改成 1, 并重编译核心.<P><H2><A NAME="ss6.14">6.14 我如何测试我的 CD-ROM 是几倍速的呢?</A></H2><P><P>有一个办法, 就是测试它要花多久读取 1500K 的资料:<BLOCKQUOTE><CODE><PRE>% time -p dd if=/dev/cdrom of=/dev/null bs=1k count=15001500+0 records in1500+0 records outreal 5.24user 0.03sys 5.07</PRE></CODE></BLOCKQUOTE>正常的单倍速 CD-ROM 每秒传送 150KB, 所以约要 10 秒钟. 二倍速约要 5 秒钟, 四倍速的约 2.5 秒钟等等... real 时间也许是最好的值 -- 在上面情形指出它是二倍速机器. 你可以增加资料量得出更准确的值. (如果你担心受快取影响的话.)你也许应该多测几次, 求平均值.<P><H2><A NAME="ss6.15">6.15 装好 Linux 後, 我的 CD-ROM 不能用了</A></H2><P><P>最常见的症状是先用 Linux 安装时, Linux 承认你的 CD-ROM. 但装完後, 从软碟或硬碟开机却又不能用它了.<P>最大的可能就是多数 Linux 套件中, 装在硬碟的核心不一定就是和安装片用的一样. 你选了支援你设备的安装片, 它却给你在硬碟上装一个没有支援 CD-ROM 的``通用版''核心. 你可以照第四章所说的 ``问题与解决'' 去做.(从检查 /proc/devices 开始)<P>解法是重编译核心, 确定你需要的 CD-ROM 驱动程式及其它需要的部份(如 SCSI 卡,ISO-9660 档案系统)都编进去了. 如果你不知道怎麽做, 看<A HREF="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html">Kernel HOWTO</A><P>如果你安装时用了命令列参数(如``hdc=cdrom'')你要把它加进开机载入程式的设定档中(通常是 /etc/lilo.conf)<P><H2><A NAME="ss6.16">6.16 在 CD 上有隐藏档, 我没办法读...</A></H2><P><P>有些 CD 的一些档案有设定隐藏位元. 这些档案正常状态是看不到的. 不过如果你挂上时用了 "unhide" 选项, 那麽应该就可以读取了.(这个选项似乎没有文件记载过)<P><H2><A NAME="ss6.17">6.17 哪儿找得到CD-ROM API的文件资料?</A></H2><P><P>如果你想写自己的应用程式, 诸如CD唱片播放程式等, 你必须懂得Linux提供的应用程式介面(application programming interface, API)<P>原本CD-ROM核心驱动程式都是用自定的ioctl以支援这类机器的功能. 像/usr/include/linux/sbpcd.h 这样的标头档就描述了这些. 由於很多驱动程式都是由别的驱动程式发展而来, 介面虽不完全相同, 但类似之处颇多.<P>最近, 由David van Leeuwen(<A HREF="mailto:david@tm.tno.nl">david@tm.tno.nl</A>)发起, 建立一组CD-ROM用的共通 API. 这文件在/usr/src/linux/Documentation/cdrom/cdrom-standard.tex.已有几个核心驱动程式支援它了. 我预计下一个主要版本核心 (3.0?) 里, 所有CD-ROM驱动程式都会符合这API.<P>我的书, Linux Multimedia Guide, 也提到了如何写CD-ROM程式, 特别是放音方面的. 请看"参考文献"那节.<P><H2><A NAME="ss6.18">6.18 为什麽我不能看到Windows CD-ROM的长档名?</A></H2><P><P>如果你有一片CD-ROM, 上面有Windows可看到, 但Linux看不到的长档名, 那麽这片光碟可能是使用Microsoft专属的Joliet档案系统格式. 请看下一个问题.<P><H2><A NAME="ss6.19">6.19 Linux支援Microsoft的Joliet档案系统吗?</A></H2><P><P>Microsoft制定了一种叫Joliet的ISO CD-ROM档案系统延伸格式. 在写这篇时, 对Joliet的支援正进行中, 可以在 <A HREF="http://www-plateau.cs.berkeley.edu/people/chaffee/joliet.html">http://www-plateau.cs.berkeley.edu/people/chaffee/joliet.html</A><A HREF="ftp://www-plateau.cs.berkeley.edu/pub/multimedia/linux/joliet/">ftp://www-plateau.cs.berkeley.edu/pub/multimedia/linux/joliet/</A>找到修补档.<P><HR><A HREF="CDROM-HOWTO-7.html">Next</A><A HREF="CDROM-HOWTO-5.html">Previous</A><A HREF="CDROM-HOWTO.html#toc6">Contents</A></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -