1. You are here:
  2. DSV
  3. Education
  4. Computer facilities
  5. Linux
  6. CD, Zip and floppy

CD, Zip and floppy

CD

All new Dell Optiplex GX270 pc's in computer lab rooms 403, 410 and 411 are equipped with combined DVD/CD readers that also can burn CD's in the formats CD-R (one time) and CD-RW (rewritable).

To listen to music CD's you simply enter them in the CD drive and access the disc with a suitable program, such as MPlayer. To mount a CD or DVD for reading, enter the UNIX command "mount /cdrom". The disc must contain a file system readable from UNIX.

To burn files on a CD-R, first convert the files to ISO format with the program mkisofs. It is done like this:

mkisofs -o /tmp/file.iso ~/directory/

Then the files in the directory ~/directory/ will be saved as the file /tmp/file.iso. You can then burn the disc with the program cdrecord. To find out the current drive name do "cdrecord -scanbus". If the CD burner is 0,1,0 you burn your ISO file with:

cdrecord -dev:0,1,0 -eject -v /tmp/file.iso

To write multiple sessions to a CD-RW, add the option "-multi" to the CDrecord command. To erase your CD-RW before writing to it anew enter the option "-blank=fast" to the cdrecord command. An example:

cdrecord -dev:0,1,0 -blank=fast -eject -v /tmp/file.iso

"man cdrecord" shows the various options to the program cdrecord.

When burning a CD it is often suitable to have access to a larger file area for caching your ISO-files. By giving the command:

mount /common

you get access to a 13 Gbyte FAT-partition /common which is shared with the Windows system on the same PC. The size is true for the new PC's with a CD-RW drive. If you need much space you can exchange /tmp for /common in the example above. Unmount the /common when you are done so the next Linux user can access it without rebooting the PC. Unmount it with:

umount /common

Zip

To mount a Zip disk, enter the UNIX command:

mount /zip

Then you can work with the Zip disk as if it was the directory /zip on the hard drive. Unmount the Zip disk with the command:

umount /zip

Floppy disks

To mount a floppy disk with a file system, for example DOS, enter the UNIX command:

mount /floppy

It is then possible to work with the floppy disk as if it was the directory /floppy on the hard drive. Unmount the floppy disk with the command:

umount /floppy

For reading and writing to a floppy disk that is MS DOS formatted, use the tools in the mtools package, see "man mtools". Examples of mtools commands are mcopy, mdir, mdel, mformat, mren, mcd and more. They are equivalent to the MS DOS commands with the same name excluding the "m" at the beginning. Enter a: as drive name. An example:

mcopy *.java a:

This will copy *.java from you UNIX hard drive directory to the floppy disk.

In cooperation with KTH.