Solved

Reading floppy and cdrom in linux?

Posted on 1998-12-15
2
330 Views
Last Modified: 2013-12-15
I have Red Hat 4.2 installed on my machine.  How do I access the floppy drive and the cdrom to read files and save files. What are the command line commands.  I have to big Unix and Linux books and neither of them tell me how to do such a simple thing as accessing the floppy drive or the cdrom drive.  Thanks for your help.
fugitive_2
0
Comment
Question by:fugitive_2
2 Comments
 
LVL 7

Accepted Solution

by:
jconde earned 30 total points
ID: 1631924
usually redhat creates the following directories:

/mnt/cdrom
/mnt/floppy

The floppy disk, cdrom, and all other storage devices work as if they where directories.

for example
if you want to copy /etc/passwd to the floppy drive all you do is
cp /etc/passwd /mnt/floppy

if you want to see the contents of a cd what you do is:
ls -laF /mnt/cdrom

if by any chance that fails, you will need to mount devices.
to mount the devices do the following
mount /dev/fd0 /mnt/floppy      //For the floppy
mount /dev/scd0 /mnt/cdrom   //CD-ROM

NOTE:

in the last case /mnt/floppy and /mnt/cdrom are simple directories....if you don't have them created you can create them or mount your device to any other directory.

i.e.
mount /dev/fd0 /my/floppy/directory.


bye

Jorge


0
 
LVL 1

Expert Comment

by:talwyn
ID: 1631925
ok  ,

    Here goes... Unix uses a single filesystem.  That is You don't have multiple Disks accessesed seperately like in Win/dos (A: C: D:) etc.  

 The process you need to follow is called mounting a file system.
the command relevant to this is 'mount'  for example :

$ mount /dev/fd0 /flop -tmsdos

  Will  mount the floppy disk in a directory called mount.

 similarly

$ mount /dev/cdrom  /mnt -tiso9660

 will mount a cdrom on a directory named mnt.

Generally mount can only be executed by root.  You can read the details in the man page.  This can be gotten around by changing permission of the mount program (this may be a security concern) or using sudo or other software allowing this sort of access.

Once mounted you can copy files to or from the device (assuming it is set with proper access rights ... see man page on fstab)

 Once you are done with a particular cd or floppy you can unmount the directory with:
   $ umount /flop
or $ umount /mnt

You cannot umount if the device is in use (i.e. you are in the directory representing the device) and again this command is generally only available to the root user.

 As a backup device you can access the floppy directly and read and write raw disk images by using the cp command.

  cp afile.txt /dev/fd0
copies an image of afile.txt onto the disk.
this method can only write a single file to a disk or copy a single file back from the disk.

for this reason the tar , and the cpio commands are used to archive multiple files.

--Talwyn

   


0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question