975 lines
22 KiB
HTML
975 lines
22 KiB
HTML
|
<HTML
|
||
|
><HEAD
|
||
|
><TITLE
|
||
|
>Answers to Frequently Asked Questions</TITLE
|
||
|
><META
|
||
|
NAME="GENERATOR"
|
||
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
|
||
|
"><LINK
|
||
|
REL="HOME"
|
||
|
TITLE="The Linux CD-ROM HOWTO"
|
||
|
HREF="index.html"><LINK
|
||
|
REL="PREVIOUS"
|
||
|
TITLE="Applications"
|
||
|
HREF="x1113.html"><LINK
|
||
|
REL="NEXT"
|
||
|
TITLE="References"
|
||
|
HREF="x1383.html"></HEAD
|
||
|
><BODY
|
||
|
CLASS="SECT1"
|
||
|
BGCOLOR="#FFFFFF"
|
||
|
TEXT="#000000"
|
||
|
LINK="#0000FF"
|
||
|
VLINK="#840084"
|
||
|
ALINK="#0000FF"
|
||
|
><DIV
|
||
|
CLASS="NAVHEADER"
|
||
|
><TABLE
|
||
|
WIDTH="100%"
|
||
|
BORDER="0"
|
||
|
CELLPADDING="0"
|
||
|
CELLSPACING="0"
|
||
|
><TR
|
||
|
><TH
|
||
|
COLSPAN="3"
|
||
|
ALIGN="center"
|
||
|
>The Linux CD-ROM HOWTO</TH
|
||
|
></TR
|
||
|
><TR
|
||
|
><TD
|
||
|
WIDTH="10%"
|
||
|
ALIGN="left"
|
||
|
VALIGN="bottom"
|
||
|
><A
|
||
|
HREF="x1113.html"
|
||
|
>Prev</A
|
||
|
></TD
|
||
|
><TD
|
||
|
WIDTH="80%"
|
||
|
ALIGN="center"
|
||
|
VALIGN="bottom"
|
||
|
></TD
|
||
|
><TD
|
||
|
WIDTH="10%"
|
||
|
ALIGN="right"
|
||
|
VALIGN="bottom"
|
||
|
><A
|
||
|
HREF="x1383.html"
|
||
|
>Next</A
|
||
|
></TD
|
||
|
></TR
|
||
|
></TABLE
|
||
|
><HR
|
||
|
ALIGN="LEFT"
|
||
|
WIDTH="100%"></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT1"
|
||
|
><H1
|
||
|
CLASS="SECT1"
|
||
|
><A
|
||
|
NAME="AEN1186"
|
||
|
>6. Answers to Frequently Asked Questions</A
|
||
|
></H1
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1188"
|
||
|
>6.1. How can a non-root user mount and unmount discs?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Most <TT
|
||
|
CLASS="LITERAL"
|
||
|
>mount</TT
|
||
|
> commands support the <EM
|
||
|
>user</EM
|
||
|
> option. If you
|
||
|
make an entry such as the following in <TT
|
||
|
CLASS="FILENAME"
|
||
|
>/etc/fstab</TT
|
||
|
>:</P
|
||
|
><P
|
||
|
><TABLE
|
||
|
BORDER="1"
|
||
|
BGCOLOR="#E0E0E0"
|
||
|
WIDTH="100%"
|
||
|
><TR
|
||
|
><TD
|
||
|
><FONT
|
||
|
COLOR="#000000"
|
||
|
><PRE
|
||
|
CLASS="SCREEN"
|
||
|
>/dev/sbpcd /mnt/cdrom iso9660 user,noauto,ro</PRE
|
||
|
></FONT
|
||
|
></TD
|
||
|
></TR
|
||
|
></TABLE
|
||
|
></P
|
||
|
><P
|
||
|
>then an ordinary user will be allowed to mount and unmount the drive
|
||
|
using these commands:</P
|
||
|
><P
|
||
|
><TABLE
|
||
|
BORDER="1"
|
||
|
BGCOLOR="#E0E0E0"
|
||
|
WIDTH="100%"
|
||
|
><TR
|
||
|
><TD
|
||
|
><FONT
|
||
|
COLOR="#000000"
|
||
|
><PRE
|
||
|
CLASS="SCREEN"
|
||
|
>% mount /mnt/cdrom
|
||
|
% umount /mnt/cdrom</PRE
|
||
|
></FONT
|
||
|
></TD
|
||
|
></TR
|
||
|
></TABLE
|
||
|
></P
|
||
|
><P
|
||
|
>By default the disc will be mounted with some options that help
|
||
|
enforce security (e.g. programs cannot executed, device files are
|
||
|
ignored). If this is too restrictive you can use additional options
|
||
|
(e.g. the "exec" option will enable execution or programs). See the
|
||
|
mount(8) man page for details.</P
|
||
|
><P
|
||
|
>Another method is to get the <TT
|
||
|
CLASS="LITERAL"
|
||
|
>usermount</TT
|
||
|
> package which allows
|
||
|
non-root users to mount and unmount removable devices such as floppies
|
||
|
and CD-ROMs, but restricts access to other devices (such as hard disk
|
||
|
partitions). It is available on major archive sites.</P
|
||
|
><P
|
||
|
>Yet another option is to use the <TT
|
||
|
CLASS="LITERAL"
|
||
|
>sudo</TT
|
||
|
> program
|
||
|
which allows users to run selective programs with root privileges.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1204"
|
||
|
>6.2. Why do I get device is busy when unmounting a CD-ROM?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>The disc cannot be unmounted if any processes are accessing the drive,
|
||
|
including having their default directory set to the mounted
|
||
|
filesystem. If you cannot identify the processes using the disc, you
|
||
|
can use the <TT
|
||
|
CLASS="LITERAL"
|
||
|
>fuser</TT
|
||
|
> command, as shown in the following example.</P
|
||
|
><P
|
||
|
><TABLE
|
||
|
BORDER="1"
|
||
|
BGCOLOR="#E0E0E0"
|
||
|
WIDTH="100%"
|
||
|
><TR
|
||
|
><TD
|
||
|
><FONT
|
||
|
COLOR="#000000"
|
||
|
><PRE
|
||
|
CLASS="SCREEN"
|
||
|
>% umount /cdrom
|
||
|
umount: /dev/hdd: device is busy
|
||
|
% fuser -v /cdrom
|
||
|
USER PID ACCESS COMMAND
|
||
|
/mnt/cdrom tranter 133 ..c.. bash</PRE
|
||
|
></FONT
|
||
|
></TD
|
||
|
></TR
|
||
|
></TABLE
|
||
|
></P
|
||
|
><P
|
||
|
>On some systems you may need to be root when running the
|
||
|
<TT
|
||
|
CLASS="LITERAL"
|
||
|
>fuser</TT
|
||
|
> command in order to see the processes of other users.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1212"
|
||
|
>6.3. How do I export a CD-ROM to other hosts over NFS?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>You need to add an entry to the <TT
|
||
|
CLASS="FILENAME"
|
||
|
>/etc/exports</TT
|
||
|
> file. Users on
|
||
|
other machines will then be able to mount the device. See the
|
||
|
<TT
|
||
|
CLASS="LITERAL"
|
||
|
>exports(5)</TT
|
||
|
> man page for details.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1217"
|
||
|
>6.4. Can I boot Linux from a CD-ROM?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Most Linux distributions support directly booting a Linux kernel from
|
||
|
CD as an alternative to a boot floppy. This requires a bootable CD and
|
||
|
ROM BIOS and CD-ROM drive which supporting booting from CD.</P
|
||
|
><P
|
||
|
>The latest version of <TT
|
||
|
CLASS="LITERAL"
|
||
|
>mkisofs</TT
|
||
|
>
|
||
|
supports creating such disks using the El Torito standard for bootable
|
||
|
CDs.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1222"
|
||
|
>6.5. How can I read digital data from audio CDs?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Heiko Eissfeldt (<A
|
||
|
HREF="mailto:heiko@colossus.escape.de"
|
||
|
TARGET="_top"
|
||
|
>heiko@colossus.escape.de</A
|
||
|
>)
|
||
|
and Olaf Kindel have written a
|
||
|
utility that reads audio data and saves it as <TT
|
||
|
CLASS="LITERAL"
|
||
|
>.wav</TT
|
||
|
> format
|
||
|
sound files. The package is called <TT
|
||
|
CLASS="LITERAL"
|
||
|
>cdda2wav.tar.gz</TT
|
||
|
> and can be
|
||
|
found on <TT
|
||
|
CLASS="LITERAL"
|
||
|
>www.ibiblio.org</TT
|
||
|
>.</P
|
||
|
><P
|
||
|
>Another utility to extract digital audio is <TT
|
||
|
CLASS="LITERAL"
|
||
|
>cdparanoia</TT
|
||
|
>
|
||
|
available from
|
||
|
<A
|
||
|
HREF="http://www.xiph.org/paranoia/"
|
||
|
TARGET="_top"
|
||
|
>http://www.xiph.org/paranoia</A
|
||
|
>.</P
|
||
|
><P
|
||
|
>Because CD-ROM drives are changing very quickly, it is difficult to
|
||
|
list which models support reading digital data. Your best
|
||
|
bet is to get the latest <TT
|
||
|
CLASS="LITERAL"
|
||
|
>cdda2wav</TT
|
||
|
> or <TT
|
||
|
CLASS="LITERAL"
|
||
|
>cdparanoia</TT
|
||
|
>
|
||
|
package and read the documentation.</P
|
||
|
><P
|
||
|
>For more information on this subject, see the web site
|
||
|
<A
|
||
|
HREF="http://www.tardis.ed.ac.uk/~psyche/cdda/"
|
||
|
TARGET="_top"
|
||
|
>http://www.tardis.ed.ac.uk/~psyche/cdda/</A
|
||
|
>
|
||
|
and the alt.cd-rom FAQ listed in the references section.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1237"
|
||
|
>6.6. Why doesn't the find command work properly?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>On ISO-9660 formatted discs without the Rock Ridge Extensions, you
|
||
|
need to add the <TT
|
||
|
CLASS="LITERAL"
|
||
|
>-noleaf</TT
|
||
|
> option to the <TT
|
||
|
CLASS="LITERAL"
|
||
|
>find</TT
|
||
|
> command.
|
||
|
See the find(1) man page for details.</P
|
||
|
><P
|
||
|
>(In my experience virtually all recent Linux CDs use the Rock Ridge
|
||
|
extensions, so this problem should occur very rarely.)</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1243"
|
||
|
>6.7. Does Linux support any recordable CD-ROM drives?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Linux supports most CD-R and CD-RW drives. The cdrecord and mkisofs
|
||
|
tools can be used to burn CDs, there are also many graphical
|
||
|
front-ends to these tools. For more information see the
|
||
|
<A
|
||
|
HREF="http://www.ibiblio.org/LDP/HOWTO/CD-Writing-HOWTO.html"
|
||
|
TARGET="_top"
|
||
|
>Linux CD-Writing HOWTO</A
|
||
|
>.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1247"
|
||
|
>6.8. Why do I get mount: Read-only file system when mounting a CD-ROM?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>CD-ROM is a read-only media. With some early kernels you could mount a
|
||
|
CD-ROM for read/write; attempts to write data to the CD would simple
|
||
|
be ignored. As of kernel version 1.1.33 this was corrected so that
|
||
|
CD-ROMs must be mounted read only (e.g. using the -r option to mount).</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1250"
|
||
|
>6.9. Why does the disc tray open when I shut down the system?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>The sbpcd driver supports automatically ejecting the CD when it is
|
||
|
unmounted. In some older kernel versions this was the default
|
||
|
behaviour. If you shut down the system, a mounted CD will be
|
||
|
unmounted, causing it to eject.</P
|
||
|
><P
|
||
|
>This feature is for convenience when changing discs. If the tray is
|
||
|
open when you mount or read a CD, it will also automatically be
|
||
|
closed.</P
|
||
|
><P
|
||
|
>I found that this caused problems with a few programs (e.g. cdplay and
|
||
|
workbone). As of the 1.1.60 kernel you can control this feature under
|
||
|
software control. A sample program is included in the sbpcd
|
||
|
documentation file (or use the
|
||
|
<A
|
||
|
HREF="http://www.pobox.com/~tranter/eject.html"
|
||
|
TARGET="_top"
|
||
|
>eject</A
|
||
|
> program).
|
||
|
You can also control the default behaviour by editing the kernel
|
||
|
source file <TT
|
||
|
CLASS="FILENAME"
|
||
|
>sbpcd.h</TT
|
||
|
>.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1257"
|
||
|
>6.10. I have a "special" CD that can't be mounted</A
|
||
|
></H2
|
||
|
><P
|
||
|
>If you have a particular disc that cannot be mounted, here are some
|
||
|
possible reasons:
|
||
|
|
||
|
<P
|
||
|
></P
|
||
|
><OL
|
||
|
TYPE="1"
|
||
|
><LI
|
||
|
><P
|
||
|
>It is an XA, CD-R, or CD-RW disc and your drive or the Linux driver
|
||
|
does not support reading these discs (this is only likely for very old
|
||
|
drives).</P
|
||
|
></LI
|
||
|
><LI
|
||
|
><P
|
||
|
>It is a DVD disc, which is only readable by a DVD-ROM drive.</P
|
||
|
></LI
|
||
|
><LI
|
||
|
><P
|
||
|
>The disc doesn't use an ISO-9660 file system (e.g. some use
|
||
|
SunOS or HFS).</P
|
||
|
></LI
|
||
|
><LI
|
||
|
><P
|
||
|
>It is an audio CD.</P
|
||
|
></LI
|
||
|
><LI
|
||
|
><P
|
||
|
>The CD is damaged or defective.</P
|
||
|
></LI
|
||
|
><LI
|
||
|
><P
|
||
|
>You put it in the drive upside down :-)</P
|
||
|
></LI
|
||
|
></OL
|
||
|
> </P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1273"
|
||
|
>6.11. Do multi-platter CD-ROM drives work with Linux?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Several users have reported success with SCSI multi-disc CD-ROM
|
||
|
changers. You probably need to enable the "Probe all LUNs on each
|
||
|
SCSI device" kernel configuration option (this is not necessary if
|
||
|
your CD changer is already known to the SCSI-driver. Have a look at
|
||
|
<TT
|
||
|
CLASS="FILENAME"
|
||
|
>/usr/src/linux/drivers/scsi.c</TT
|
||
|
>).</P
|
||
|
><P
|
||
|
>At least one user also had to increase a SCSI timeout value in the
|
||
|
kernel driver. A symptom of this is an error message like "wrong fs
|
||
|
type, bad option, bad superblock on /dev/sr5, or too many mounted file
|
||
|
systems" when trying to mount a CD for the first time, but a second
|
||
|
mount immediately afterwards succeeds. To increase the timeout
|
||
|
increase the value of IOCTL_TIMEOUT at the beginning of
|
||
|
<TT
|
||
|
CLASS="FILENAME"
|
||
|
>/usr/src/linux/drivers/scsi/sr_ioctl.c</TT
|
||
|
> and recompile the
|
||
|
kernel. A value of 10000 instead of the default 3000 is reported to
|
||
|
work with a NEC Multispin 4Xc.</P
|
||
|
><P
|
||
|
>It might be necessary to create additional block special files, so
|
||
|
that all LUNs can be accessed. A device file is needed for every
|
||
|
LUN. So for a 7 disc changer <TT
|
||
|
CLASS="LITERAL"
|
||
|
>/dev/sr0</TT
|
||
|
> to <TT
|
||
|
CLASS="LITERAL"
|
||
|
>/dev/sr6</TT
|
||
|
>
|
||
|
are needed (more if you have additional SCSI CD-ROM drives). To create
|
||
|
the block special file execute <TT
|
||
|
CLASS="LITERAL"
|
||
|
>mknod /dev/sr? b 11 ?</TT
|
||
|
> as root
|
||
|
with ? being the required number.</P
|
||
|
><P
|
||
|
>The Nakamichi MBR-7 7 disc changer, NEC Multispin 4Xc and Pioneer 12
|
||
|
disc changer have been reported to work.</P
|
||
|
><P
|
||
|
>EIDE/ATAPI multi-disc changers are also available. The kernel has
|
||
|
support for some drives using the CDROM_SELECT_DISC ioctl
|
||
|
function. The IDE-CD kernel driver documentation file includes source
|
||
|
code for a program to select changer slots, or you can use various
|
||
|
utilities such as the <TT
|
||
|
CLASS="LITERAL"
|
||
|
>eject</TT
|
||
|
> program described earlier.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1286"
|
||
|
>6.12. I get "/cdrom: Permission denied" errors</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Some CDs have root directory file permissions that only allow user
|
||
|
<TT
|
||
|
CLASS="LITERAL"
|
||
|
>root</TT
|
||
|
> to read them. This is an error on the part of the CD-ROM
|
||
|
vendor and is a real inconvenience. A more common occurrence is for
|
||
|
certain files or directories not to be world readable. Some people
|
||
|
have patched their kernels to work around the problem.</P
|
||
|
><P
|
||
|
>Also see the related question on hidden files later in this document.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1291"
|
||
|
>6.13. How do I interpret IDE CD kernel error messages?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>What does it mean when I get a kernel message from the IDE CD-ROM
|
||
|
driver like "hdxx: code: xx key: x asc: xx ascq: x"?</P
|
||
|
><P
|
||
|
>This is an status/error message from the IDE CD-ROM drive. By default
|
||
|
the IDECD driver prints out the raw information instead of wasting
|
||
|
kernel space with error messages. You can change the default to
|
||
|
display the actual error messages by going into
|
||
|
<TT
|
||
|
CLASS="FILENAME"
|
||
|
>/usr/src/linux/drivers/block/ide-cd.c</TT
|
||
|
>, changing the value of
|
||
|
VERBOSE_IDE_CD_ERRORS to 1, and recompiling the kernel.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1296"
|
||
|
>6.14. How can I tell what speed CD-ROM I have?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Here's one way. This command measures how long is takes to read 1500K
|
||
|
of data from CD:</P
|
||
|
><P
|
||
|
><TABLE
|
||
|
BORDER="1"
|
||
|
BGCOLOR="#E0E0E0"
|
||
|
WIDTH="100%"
|
||
|
><TR
|
||
|
><TD
|
||
|
><FONT
|
||
|
COLOR="#000000"
|
||
|
><PRE
|
||
|
CLASS="SCREEN"
|
||
|
>% time -p dd if=/dev/cdrom of=/dev/null bs=1k count=1500
|
||
|
1500+0 records in
|
||
|
1500+0 records out
|
||
|
real 5.24
|
||
|
user 0.03
|
||
|
sys 5.07</PRE
|
||
|
></FONT
|
||
|
></TD
|
||
|
></TR
|
||
|
></TABLE
|
||
|
></P
|
||
|
><P
|
||
|
>The transfer rate of single speed drives is 150 kilobytes
|
||
|
per second, which should take about 10 seconds. At double speed it
|
||
|
would take five seconds, quad speed would take 2.5, etc.</P
|
||
|
><P
|
||
|
>The "real" time above is probably the best number to look at -- in
|
||
|
this case it indicates a double speed drive. You can increase the
|
||
|
amount of data transferred to get a more accurate value (the data does
|
||
|
not get cached). You should probably run the command a few times and
|
||
|
take the average.</P
|
||
|
><P
|
||
|
>I've also written a small C program that measures and reports CD-ROM
|
||
|
data transfer rate; I can send it to you on request.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1304"
|
||
|
>6.15. My CD-ROM stopped working after Linux was installed</A
|
||
|
></H2
|
||
|
><P
|
||
|
>The usual symptom is that the boot disk used to initially install
|
||
|
Linux recognized your CD-ROM drive, but after Linux was installed on
|
||
|
the hard drive or floppy and rebooted it no longer recognizes the
|
||
|
CD-ROM.</P
|
||
|
><P
|
||
|
>The most common reason for this problem is that with some Linux
|
||
|
distributions the kernel that is installed on your hard drive (or
|
||
|
floppy) is not necessarily the same one that was on your boot
|
||
|
disk. You selected a boot disk that matched your CD-ROM hardware,
|
||
|
while the kernel you installed is a "generic" kernel that is lacking
|
||
|
CD-ROM support. You can verify this by following the troubleshooting
|
||
|
guidelines discussed previously in this document (e.g. start by
|
||
|
checking <TT
|
||
|
CLASS="FILENAME"
|
||
|
>/proc/devices</TT
|
||
|
>).</P
|
||
|
><P
|
||
|
>The solution is to recompile the kernel, ensuring that the drivers for
|
||
|
your CD-ROM drive and any others that are needed (e.g. SCSI
|
||
|
controller, ISO-9660 file system) are included. See the
|
||
|
<A
|
||
|
HREF="http://www.ibiblio.org/LDP/HOWTO/Kernel-HOWTO.html"
|
||
|
TARGET="_top"
|
||
|
>Kernel HOWTO</A
|
||
|
>
|
||
|
if you don't know how to do this.</P
|
||
|
><P
|
||
|
>If you passed any command line options to the boot disk
|
||
|
(e.g. "hdc=cdrom") you need to add these to your boot program
|
||
|
configuration file (typically /etc/lilo.conf).</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1312"
|
||
|
>6.16. There are "hidden" files on a CD which I can't read</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Some CDs have files with the "hidden" bit set on them. Normally these
|
||
|
files are not visible. If you mount the CD with the "unhide" option
|
||
|
then the files should be accessible (this doesn't seem to be
|
||
|
documented anywhere).</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1315"
|
||
|
>6.17. Where is the CD-ROM API documented?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>If you want to write your own application, such as an audio CD player
|
||
|
program, you will need to understand the application programming
|
||
|
interface (API) provided by Linux.</P
|
||
|
><P
|
||
|
>Originally the CD-ROM kernel drivers used their own ioctl() functions
|
||
|
to support features specific to each drive. Header files such as
|
||
|
<TT
|
||
|
CLASS="FILENAME"
|
||
|
>/usr/include/linux/sbpcd.h</TT
|
||
|
> describe these. Because many of
|
||
|
the drivers were based on other drivers, the interfaces, while not
|
||
|
identical, have a lot in common.</P
|
||
|
><P
|
||
|
>More recently there has been an initiative headed by David van Leeuwen
|
||
|
(<A
|
||
|
HREF="mailto:david@tm.tno.nl"
|
||
|
TARGET="_top"
|
||
|
>david@tm.tno.nl</A
|
||
|
>) to
|
||
|
standardize the API for CD-ROM drives, putting common code
|
||
|
in one place and ensuring that all drivers exhibit the same behaviour.
|
||
|
This is documented in the file
|
||
|
<TT
|
||
|
CLASS="FILENAME"
|
||
|
>/usr/src/linux/Documentation/cdrom/cdrom-standard.tex</TT
|
||
|
>.
|
||
|
Several kernel drivers support this. As of the 2.0 kernel all CD-ROM
|
||
|
drivers conform to this API.</P
|
||
|
><P
|
||
|
>My book, <EM
|
||
|
>Linux Multimedia Guide</EM
|
||
|
>, goes into quite a bit of
|
||
|
detail on how to program CD-ROM drives, especially for audio
|
||
|
functions. See the end of the References section.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1325"
|
||
|
>6.18. Why don't I see long filenames on this Windows CD-ROM?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>If you have a CD-ROM which has long filenames under Windows
|
||
|
but not under Linux, it may be formatted using Microsoft's proprietary
|
||
|
Joliet filesystem. See the next question for a solution.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1328"
|
||
|
>6.19. Is Microsoft's Joliet filesystem supported?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Microsoft has created an extension to the ISO CD-ROM format called
|
||
|
Joliet. It allows for long filenames encoded using the
|
||
|
16-bit UNICODE format.</P
|
||
|
><P
|
||
|
>Starting with version 2.0.34 the Linux kernel has support for the
|
||
|
Microsoft Joliet file system extensions. You need to enable support
|
||
|
for it in the kernel.</P
|
||
|
><P
|
||
|
>If you want to display filenames with native language characters from
|
||
|
Joliet CD-ROMs correctly on the screen, you need to enable support in
|
||
|
the kernel for the appropriate NLS ISO8859 character sets.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1333"
|
||
|
>6.20. Does Linux support "enhanced" CDs?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Some audio CDs are "enhanced" with additional data. Typically you
|
||
|
will find that these CDs have the usual audio CD tracks as well as a
|
||
|
data track which can be mounted as an ISO-9660 file system.</P
|
||
|
><P
|
||
|
>An enhanced CD I examined had Microsoft Windows and Apple Macintosh
|
||
|
applications on it (which won't run directly under Linux of course,
|
||
|
although I had partial success running the Windows application under
|
||
|
the WINE Windows emulator). There were some GIF images which could be
|
||
|
viewed using a standard viewer such as <TT
|
||
|
CLASS="LITERAL"
|
||
|
>xv</TT
|
||
|
> and some animations
|
||
|
in Apple QuickTime format which could be viewed using the
|
||
|
<TT
|
||
|
CLASS="LITERAL"
|
||
|
>xanim</TT
|
||
|
> program. It was a multi-session disk which some very old
|
||
|
CD-ROM drives do not support reading. On the disc was a
|
||
|
<TT
|
||
|
CLASS="LITERAL"
|
||
|
>readme.txt</TT
|
||
|
> file containing an Enhanced CD FAQ.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1340"
|
||
|
>6.21. Does Linux support DVD-ROM?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>SCSI and ATAPI compliant DVD-ROM drives should work under Linux for
|
||
|
reading discs formatted with an ISO-9660 file system. In other words
|
||
|
they will work as a (possibly large) CD-ROM drive.</P
|
||
|
><P
|
||
|
>Many DVD-ROM discs use the UDF file system. Recent kernels have UDF
|
||
|
filesystem support.</P
|
||
|
><P
|
||
|
>A number of Linux MPEG-2 DVD players are available. For more
|
||
|
information see the
|
||
|
<A
|
||
|
HREF="http://www.ibiblio.org/LDP/HOWTO/DVD-Playing-HOWTO.html"
|
||
|
TARGET="_top"
|
||
|
>DVD Playing HOWTO</A
|
||
|
>.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1346"
|
||
|
>6.22. Does Linux support CD-RW?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>SCSI and ATAPI compliant CD-RW drives work under Linux for discs
|
||
|
formatted with an ISO-9660 or UDF file system. This includes the
|
||
|
ability to write to the disc. Utilities such as cdrecord can be used
|
||
|
to erase a disc.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1349"
|
||
|
>6.23. How do I mount a multi-session disc?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>You mount a multi-session disc like any other CD-ROM. The normal
|
||
|
behaviour for multi-session support is that the
|
||
|
<EM
|
||
|
>last</EM
|
||
|
> session will be seen when you mount the
|
||
|
disc. You will not see multiple partitions. If it does not work it
|
||
|
could be for three reasons:
|
||
|
|
||
|
<P
|
||
|
></P
|
||
|
><OL
|
||
|
TYPE="1"
|
||
|
><LI
|
||
|
><P
|
||
|
>Your CD-ROM drive does not support reading multi-session CDs (it would
|
||
|
probably have to be quite old for this to be the case).</P
|
||
|
></LI
|
||
|
><LI
|
||
|
><P
|
||
|
>The Linux kernel driver for your CD-ROM type does not support
|
||
|
multi-session (mostly only some old proprietary, non-IDE/ATAPI
|
||
|
and non-SCSI drives fall into this category).</P
|
||
|
></LI
|
||
|
><LI
|
||
|
><P
|
||
|
>If you are mounting a CD with a file system other than ISO-9660, then
|
||
|
multi-session may not be supported.</P
|
||
|
></LI
|
||
|
></OL
|
||
|
> </P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1360"
|
||
|
>6.24. How do I read a CD volume label?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>There is a small utility called <TT
|
||
|
CLASS="LITERAL"
|
||
|
>volname</TT
|
||
|
>
|
||
|
included with recent versions of the <TT
|
||
|
CLASS="LITERAL"
|
||
|
>eject</TT
|
||
|
> program.
|
||
|
Alternatively you can run this shell command:</P
|
||
|
><P
|
||
|
><TABLE
|
||
|
BORDER="1"
|
||
|
BGCOLOR="#E0E0E0"
|
||
|
WIDTH="100%"
|
||
|
><TR
|
||
|
><TD
|
||
|
><FONT
|
||
|
COLOR="#000000"
|
||
|
><PRE
|
||
|
CLASS="SCREEN"
|
||
|
>dd if=/dev/cdrom bs=1 skip=32808 count=32 </PRE
|
||
|
></FONT
|
||
|
></TD
|
||
|
></TR
|
||
|
></TABLE
|
||
|
></P
|
||
|
><P
|
||
|
>assuming /dev/cdrom is the device file name for your drive.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1368"
|
||
|
>6.25. My IDE CD-R or CD-RW drive is not working with Linux</A
|
||
|
></H2
|
||
|
><P
|
||
|
>You need to use the IDE SCSI emulation driver for writable drives.
|
||
|
See the
|
||
|
<A
|
||
|
HREF="http://www.ibiblio.org/LDP/HOWTO/CD-Writing-HOWTO.html"
|
||
|
TARGET="_top"
|
||
|
>Linux CD-Writing HOWTO</A
|
||
|
> for more information.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1372"
|
||
|
>6.26. Is the <EM
|
||
|
>insert your brand/model here</EM
|
||
|
> IDE CD-ROM drive supported?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Yes, of course it is. Linux supports the IDE interface used by all
|
||
|
modern IDE CD-ROM drives. It has been like this since kernel version
|
||
|
1.1.85.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1376"
|
||
|
>6.27. I can't seem to find a driver for my IDE drive in the kernel source?</A
|
||
|
></H2
|
||
|
><P
|
||
|
>Unlike for the older proprietary drives, there isn't a specific driver
|
||
|
for each model of ATAPI/IDE CD-ROM drives. All drives conforming to
|
||
|
the standard should work with the ATAPI CD-ROM driver included in the
|
||
|
standard Linux kernel.</P
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="SECT2"
|
||
|
><H2
|
||
|
CLASS="SECT2"
|
||
|
><A
|
||
|
NAME="AEN1379"
|
||
|
>6.28. I'm having problems with my CD-ROM on Red Hat 7.1</A
|
||
|
></H2
|
||
|
><P
|
||
|
>You may be running into an issue with hardware that does not support
|
||
|
DMA (Direct Memory Access). RedHat ships a highly tuned version of the
|
||
|
Linux kernel which enables DMA on selected IDE controller chipsets.
|
||
|
Information on this issue can be found at
|
||
|
<A
|
||
|
HREF="http://www.exocore.com/linux/rhl71dma/"
|
||
|
TARGET="_top"
|
||
|
>http://www.exocore.com/linux/rhl71dma/</A
|
||
|
></P
|
||
|
></DIV
|
||
|
></DIV
|
||
|
><DIV
|
||
|
CLASS="NAVFOOTER"
|
||
|
><HR
|
||
|
ALIGN="LEFT"
|
||
|
WIDTH="100%"><TABLE
|
||
|
WIDTH="100%"
|
||
|
BORDER="0"
|
||
|
CELLPADDING="0"
|
||
|
CELLSPACING="0"
|
||
|
><TR
|
||
|
><TD
|
||
|
WIDTH="33%"
|
||
|
ALIGN="left"
|
||
|
VALIGN="top"
|
||
|
><A
|
||
|
HREF="x1113.html"
|
||
|
>Prev</A
|
||
|
></TD
|
||
|
><TD
|
||
|
WIDTH="34%"
|
||
|
ALIGN="center"
|
||
|
VALIGN="top"
|
||
|
><A
|
||
|
HREF="index.html"
|
||
|
>Home</A
|
||
|
></TD
|
||
|
><TD
|
||
|
WIDTH="33%"
|
||
|
ALIGN="right"
|
||
|
VALIGN="top"
|
||
|
><A
|
||
|
HREF="x1383.html"
|
||
|
>Next</A
|
||
|
></TD
|
||
|
></TR
|
||
|
><TR
|
||
|
><TD
|
||
|
WIDTH="33%"
|
||
|
ALIGN="left"
|
||
|
VALIGN="top"
|
||
|
>Applications</TD
|
||
|
><TD
|
||
|
WIDTH="34%"
|
||
|
ALIGN="center"
|
||
|
VALIGN="top"
|
||
|
> </TD
|
||
|
><TD
|
||
|
WIDTH="33%"
|
||
|
ALIGN="right"
|
||
|
VALIGN="top"
|
||
|
>References</TD
|
||
|
></TR
|
||
|
></TABLE
|
||
|
></DIV
|
||
|
></BODY
|
||
|
></HTML
|
||
|
>
|