mount devices

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
unnilquadium
Level 1
Level 1
Posts: 2
Joined: Fri Feb 15, 2013 7:47 am

mount devices

Post by unnilquadium »

Hi.
I'm totally new to linux and I don't know much about computers.

I've just installed linux mint 14 (MATE) and I can't seem to understand how it deals with drives.

1)
I have only one hard disk. When I open "Computer" on desktop it shows a "drive" named file system (I guess this is not an actual drive) which I am able to open and browse with no problems.
Then I have another "drive" (which I think it's the actual disk) named "250 GB Hard Disk", and when I click on it I get the error "unable to mount location can't mount file". How to get it to work? Is it already mounted? Isn't this the same as the file system?

2)
I have an actual floppy drive on my computer. It runs perfectly when I have a floppy disk inside it, but when I don't I always get an error at start-up:
"Error mounting system-managed device /dev/fd0: Command-line `mount "/media/floppy0"' exited with non-zero exit status 32: mount: /dev/fd0 is not a valid block device".

Mind you, when I DO have a floppy inside it, it runs normally, so I think the system is always trying to mount it at start-up, even when no floppy disk is present.
Any ideas on how to prevent this?

Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
cecar

Re: mount devices

Post by cecar »

Is mint the only operating system on your computer or is it a dualboot?

Open up a terminal and post the output of

Code: Select all

sudo blkid
unnilquadium
Level 1
Level 1
Posts: 2
Joined: Fri Feb 15, 2013 7:47 am

Re: mount devices

Post by unnilquadium »

Hi.

Yes. Linux Mint is the only OS installed, and is supposedly using all of the hard drive.

Results for sudo blkid are:
/dev/sda1: UUID="0327efb0-be29-4c31-af4b-d0b76a8da7b1" TYPE="ext4"
/dev/sda5: UUID="e9159582-c57a-4ef9-895d-6d05f5da4ef1" TYPE="swap"

cheers
pgmer6809
Level 4
Level 4
Posts: 228
Joined: Sun Mar 04, 2012 9:06 pm

Re: mount devices

Post by pgmer6809 »

Hi
I hope you get a more detailed answer from some experts.
Firstly Here is a link to a tutorial on the linux file system.
http://community.linuxmint.com/tutorial/view/355

If you know windows at all, then you know that under 'MyComputer' you will see several devices, C:, D:, A: etc. and also some Network locations etc.
In Linux the entire list of all devices is under / (Forward slash). That is the beginning (root).
The other major difference in Linux is that to make a device, or a disk partition visible, you need to 'mount' it. (This is a GOOD thing in general, but it does mean there is an extra step, and extra level of complexity).

In your case you have what amounts to only one 'disk drive' /dev/sda1 the first partition on your hard drive. in Windows this would be the C: drive usually.
This is mounted at "/" as part of the boot process.
Your other partition is /dev/sda5, which linux uses to save stuff to disk when it runs out of memory. This is like the windows 'pagefile.sys' except it is in its own partition instead of being in with other files.

Now lets say you have a file on a floppy disk you want to get at.
To make your floppy visisble you need two things.
a) The Kernel (Linux OS) must have detected the floppy during boot. Usually it wiil create a device called /dev/fd0 when it detects it.
b) you need to 'mount' the device. you could mount it anywhere, but the usual place is in /media/floppy or /media/fd0. (that is a zero)
Check to see that you have a directory called /media by issuing the cmd

Code: Select all

ls -l /media
you should see something like:
drwxr-xr-x 2 root root 4096 Jan 12 22:18 cdrom0
drwxr-xr-x 2 root root 4096 Jan 12 22:18 fd0
drwxr-xr-x 2 root root 4096 Jan 12 22:18 usb0
so now you can put a floppy in the drive and issue the cmd

Code: Select all

sudo mount -t vfat /dev/fd0 /media/fd0
and when sudo prompts you you can enter your password.
If all goes well you can then say:

Code: Select all

ls -l  /media/fd0
to see what is on the disk.
to copy a file called say myjunk.txt to your home directory:

Code: Select all

cp /media/fd0/myjunk.txt ~/mygoodstuff.txt
To explain:
the sudo mount mumbo jumbo above tells linux that the type of media in the drive is a FAT kind of filesystem (as for msdos etc.) and you want to make this drive avaiable through the media/fd0 directory.
You usually need to use sudo to mount things, because for security reasons linux does not by default let users mount stuff. (i.e. they might be mounting disks with viruses on them for example).
If there is no disk in the drive then the mount cmd will fail. The error message you get may not be all that accurate, but that will be the problem most often.
The mount cmd might fail if there is a hardware problem with the drive also, but that is more rare.

There is another aspect to this.
In linux there are many 'magic' files that tell various pieces of linux what to do.
One of these is /etc/fstab
In this file you can specify defaults for various mount options, so you don't have to type them out every time.
In some cases Linux has been configured to automatically detect when a CD or DVD is inserted, or a USB device is connected, or a floppy is inserted and to automatically
take certain actions. But that is another topic, somewhat beyond my expertise to explain.

If you are getting a 'cannot mount floppy' type of error at boot, it is probably because you have a line in /etc/fstab that refers to /dev/fd0 and you have no disk in the drive.
You could try to use an editor to modify fstab (BACK IT UP FIRST), and put a hash mark (#) in front of the line with /dev/fd0 on it.
e.g.

Code: Select all

cd /etc
sudo cp fstab fstab_original
sudo vi fstab

........ etc.
Regards,
pgmer6809
ex
Locked

Return to “Beginner Questions”