Solved

Reading floppy and cdrom in linux?

Posted on 1998-12-15
2
325 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now