LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can't mount floppy disk. (https://www.linuxquestions.org/questions/linux-newbie-8/cant-mount-floppy-disk-636693/)

swamprat 04-20-2008 09:08 PM

Can't mount floppy disk.
 
Hello,

I've tried a number of different things to get my floppy drive mounted and nothing works.

Read the man page...clear as mud for a newbie, but didn't help...got more confused.

I tried the following and it also didn't work:

[root@centos5 /]# mount -t msdos /dev/fd0 /mnt/floppy
mount: mount point /mnt/floppy does not exist

Floppy isn't in the /etc/fstab file.

There is a valid floppy disk in the drive with a text file on it wich can be read by windows notepad.

BTW, there isn't anything special in the mnt or media directories.

Any help will be appreciated.

Sorrofix 04-20-2008 09:30 PM

A mount point must exist before you can mount it there. In other words, you're mounting the contents of the floppy into the specified directory, not creating a new one. So, try the following first:
Code:

# mkdir /mnt/floppy
Or you could just mount it to /mnt. :)

swamprat 04-20-2008 09:37 PM

Thanks,

That command worked and I saw the new directory in mnt.

Now how do I mount the floppy to see what's on the disk and/or format the floppy?

onebuck 04-20-2008 10:23 PM

Hi,
Quote:

Originally Posted by swamprat (Post 3127503)
Thanks,

That command worked and I saw the new directory in mnt.

Now how do I mount the floppy to see what's on the disk and/or format the floppy?

Maybe you should look at the links in my sig for command references. I would also suggest that you look at 'Rute Tutorial & Exposition'.

This link and others are available from 'Slackware-Links' .

swamprat 04-21-2008 08:13 AM

Thanks onebuck.

I just looked at the file you suggested, it isn't much/any better then the man pages.

I posted my message because I can't seem to find the right combination to mount the floppy drive.

If you know how to do this or have a suggestion of commands I can use, please post them here.

Best way for one to learn is by example.

Thanks

onebuck 04-21-2008 09:26 AM

Hi,

Not always true!

I posted the links so you can learn from the information provided.

Code:

excerpt from 'man mount'
DESCRIPTION
      All files accessible in a Unix system are arranged in one big tree, the
      file hierarchy, rooted at /.  These files can be spread out  over  sev-
      eral  devices. The mount command serves to attach the file system found
      on some device to the big file tree. Conversely, the umount(8)  command
      will detach it again.

      The standard form of the mount command, is
              mount -t type device dir
      This  tells the kernel to attach the file system found on device (which
      is of type type) at the directory dir.  The previous contents (if  any)
      and  owner  and  mode of dir become invisible, and as long as this file
      system remains mounted, the pathname dir refers to the root of the file
      system on device.

How hard is it to read 'mount -t type device dir' where mount is the command, -t type 'is the filesytem', device is 'the device you want to mount', dir is 'the mount point'.

You will need a mount point, on my system there is '/mnt/floppy'. The device on my machine can be found with a 'ls -al /dev/floppy;
Code:

:~# ls -al /dev/floppy
total 0
drwxr-xr-x  2 root root      60 2008-03-28 13:41 ./
drwxr-xr-x 19 root root  14200 2008-03-28 18:41 ../
brw-rw----  1 root floppy  2, 0 2008-03-28 13:41 0

amos2:~# ls -al /dev/fd0
lrwxrwxrwx 1 root root 8 2008-03-28 13:41 /dev/fd0 -> floppy/0

~# ls /mnt
README      cdrom/  flash1/  floppy/  memory/    nfs_share/  tmp/      zip/
cdrecorder/  dvd/    flash2/  hd/      nfs-share/  share/      transfer/

I can use the '/dev/floppy' or '/dev/fd0' to mount therefore a 'mount -t ext2 /dev/fd0 /mnt/floppy' would mount the disk with a ext2 filesystem in '/dev/fd0' at the mount point '/mnt/floppy'.

You really need to get used to reading the available material for your distribution or linux in general. The 'man command' is your friend.

If you want a online reference then 'LINUX MAN PAGES ONLINE'.

This link and others are available from 'Slackware-Links' .

swamprat 04-21-2008 10:30 AM

Thanks onebuck.

What I did was go out to google and found some simple descriptions of the mount command and its options and how to get started with it.

I previously created the mount point as indicated from a previous listers reply in /mnt/floppy.

Then cd to /mnt/floppy

I haven't had a chance this morning yet because I'm not near a Linux machine but if I do:

touch newfile then

vi newfile then

enter text then

:wq

that should put the file out on the floppy should't it?


Thanks again...


BTW, I did look over the links you provided, however, the details were as cryptic as the man pages were for mount.

Sorrofix 04-21-2008 07:13 PM

Just curious, what kind of filesystem do you currently have on the floppy disk? In any case, you can probably just do "mount /dev/fd0 /mnt/floppy" and the mount command will detect the filesystem for you. But yes indeed, once the floppy's been mounted, you can cd to /mnt/floppy and create files on it with vi. Or, my personal favorite:
Code:

echo "enter text" > /mnt/floppy/newfile
Less typing. :)

onebuck 04-21-2008 07:19 PM

Hi,

The 'Rute' is a good reference and it will help you once you start to have things sink in.

Experience with the OS will help. Find out what you are doing wrong or what it takes to do a specific task then apply it. There are loads of tutorials that you can find online. Several good ones in my sig that you can reference.

You can also look at 'Slackware-Links'.
The Wiki is not just for SlackwareŽ, loads of Linux references. Take a look an see what you can use.

newtovanilla 05-02-2008 02:01 AM

http://www.alwanza.com/howto/linux/floppy.html
Quote:

"The first step in being able to use a floppy drive on Linux is to know where to find it in the file system. Mine is in /dev/fd0 (that's floppy drive zero in the device directory) and the following instructions will be written using that path. If your path is different, substitute accordingly.

Let's check to see where your floppy drive is:

Find your file system table (fstab), usually in /etc/fstab.

find / -type f -name fstab

And see what it says:

cat /path_to_fstab/fstab

Mine said:

/dev/fd0 /mnt/floppy auto noauto, owner, kudzu 0 0

That translates to:

floppy device location: /dev/fd0
mounted read/write location for the file system: /mnt/floppy
file system type auto
mount options noauto, owner, kudzu
file system dump frequency 0
file system check frequency 0

We are only going to concern ourselves with the first three fields. The first field maps the location of the floppy device. To format a floppy disk for use in Linux (this will also delete everything on the disk), use the command (substitute your floppy device path):

mkfs -t ext3 /dev/fd0 1440

Now we have a blank disk we can use and need to figure out how to read and write to it.

We need to check our second field, the read/write location (/mnt/floppy in my case) to see if a mount point has already been set up for our floppy. Look in the path to the floppy directory:

ls -l /mnt

If "floppy" is not listed as a directory, we need to create it:

mkdir floppy

Then map the floppy device to the file system read/write area (need to be root to do this and the command will not work unless there is a disk in the floppy drive.): "

swamprat 05-02-2008 06:15 PM

newtovanilla

Thank you for your detailed reply.

And again thanks to all who were kind enough to reply to my newbie question.

The detail you provided hit the spot.


All times are GMT -5. The time now is 07:42 AM.