LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mount a Floppy Drive (https://www.linuxquestions.org/questions/linux-newbie-8/mount-a-floppy-drive-706025/)

rtrahan 02-19-2009 04:45 PM

Mount a Floppy Drive
 
This is theoretical because I don't actually have a floppy drive to mount but I am studying for the Linux+. I am using OpenSuse
The example is:
mount -t ext2 /dev/fd0 /mnt/floppy and I understand why and what..but

Ok first of all there was no file called "fd0" under /dev, nor is there a file called floppy; so I created one with touch.(touch fd0)..no problem

What I don't understand is that /mnt/floppy does not work since there is no file called floppy anyware. Since there is no file named "Floppy" under /dev or /mnt then this does not work, I get an error; no such file.

However, if I really did have a floppy to mount then would "floppy" appear under /mnt..so I could do a /mnt/floppy without adding the file floppy?

I know exactly what I said I hope you do

Thanks in advance..

colucix 02-19-2009 04:51 PM

Quote:

Originally Posted by rtrahan (Post 3450258)
However, if I really did have a floppy to mount then would "floppy" appear under /mnt..so I could do a /mnt/floppy without adding the file floppy?

I have not a floopy drive on my computer, now. However, I remember from my old desktop that /dev/fd0 was automatically created when the drive was detected by the kernel. Instead, the mount point /mnt/floppy is not created automatically. Older linux OS had some default mount points as /mnt/fd0 or /mnt/cdrom, but they where pre-built and not created on-the-fly upon connection of a floppy drive. To me you have to manually create the mount point, then use it:
Code:

# mkdir /mnt/floppy
# mount -t ext2 /dev/fd0 /mnt/floppy


rtrahan 02-19-2009 05:11 PM

Ok yea, I made the /dev/fd0 I just was not sure about the /mnt/floppy..should I make those in my /etc/fstab file. According to this text all mount points should be in the /etc/fstab file. For instance I checked my /etc/fstab and I didn't have any files for cdrom or usb. So if I wanted to mount those then I would have to make a mount point in the fstab file correct? Then the mount would be automatic....I think.

Thanks..

colucix 02-19-2009 05:20 PM

You have an entry in /etc/fstab for each drive or partition you want automatically to be mounted at boot. Usually removable drives like floppy, cdrom, usb sticks, zip drives and so on... are not included in /etc/fstab because it would require that a floppy disk or a CD is actually inserted in the proper drive at boot time.
Quote:

According to this text all mount points should be in the /etc/fstab file.
To me this is not correct. All necessary devices and their related mount points have to be in /etc/fstab, but you are free to mount any drive manually after the system is up! Just out of curiosity, which text are you reading?

rtrahan 02-19-2009 05:41 PM

It's called Linux+ Guide to Linux Certification, Second Edition. By Jason W. Eckert and M. John Schitka. It's CompTIA certified and was highly recommended...so...this particular part of mounting I understand the theory but I'm having a hard time with the mechanics. Like having to manually create the /dev/fb0 and /mnt/floppy..this is what the book says

"To save time typing on the command line, you can alternatively specify one argument and allow the system to look up the remaining information in the /etc/fstab (filesystem) file. The /etc/fstab file has a dual purpose; it is used to mount devices at boot time and is consulted when a user does not specify enough arguments on the command line when using the mount command"

that last part of the last sentence "and is consulted...." tells me the info has to be in the /etc/fstab when mounting manually.

???

colucix 02-19-2009 05:47 PM

It just tells that you can spare some typing when using the mount command if there is a corresponding device or mount point in /etc/fstab. For example you can do
Code:

mount /dev/fd0
if - and only if - in /etc/fstab there is an entry for /dev/fd0 which specifies the filesystem type and the mount point. In other words, if you don't give enough arguments to the mount command, it look for information in /etc/fstab. If no useful info is found in it, you receive an error message like this:
Code:

$ mount /dev/fd0
mount: can't find /dev/fd0 in /etc/fstab or /etc/mtab

Regarding the fact you have to manually create /dev/fd0, I disagree. To me it is the kernel and the proper driver which takes care of creating it for you. Anyway, I cannot test it right now, since I've not a machine with a floppy drive at hand.

rtrahan 02-19-2009 06:22 PM

It's ok because I ran into another barrier anyway. After doing touch /dev/fd0 and
touch /mnt/floppy
I ran mount -t ext2 /dev/fd0 /mnt/floppy;

I got an error stating the fd0 is not a block device (touch doesn't do it)
so I tried the mknod command but since there never was a fd0 file it did not have the major and minor numbers (even though I did through 2 and 0 in there)...think I will move on to cdrom and skip the rest of this one,

The funny thing is I really am getting an external floppy drive next week to make some boot disk; I'll figure it out..thanks

DragonSlayer48DX 02-19-2009 06:44 PM

Quote:

Originally Posted by rtrahan (Post 3450340)
It's ok because I ran into another barrier anyway. After doing touch /dev/fd0 and
touch /mnt/floppy
I ran mount -t ext2 /dev/fd0 /mnt/floppy;

I got an error stating the fd0 is not a block device (touch doesn't do it)
so I tried the mknod command but since there never was a fd0 file it did not have the major and minor numbers (even though I did through 2 and 0 in there)...think I will move on to cdrom and skip the rest of this one,

The funny thing is I really am getting an external floppy drive next week to make some boot disk; I'll figure it out..thanks

Yes, that's how it would work, since you don't actually have a floppy installed. ICYDK, you can't mount a single file on a filesystem that's already mounted.


All times are GMT -5. The time now is 05:51 AM.