Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running Ubuntu LTS 12.04 and I have mounted an ISO image to the /media directory. The command I used to mount is mount -t iso9660 -o loop,ro name_of_iso.iso /media.

  1. Am I correct to refer to it as a device although is a locally mounted image?
  2. Why is that when I attempt to attach an external harddrive, I get the message that it is unable to mount as there is already another device mounted?
  3. Why does Ubuntu create a new directory for it as it generally would?
  4. How does Ubuntu automatically create a directory that reflects the name of the device which it then mounts to?
  5. Does it mean that if I want to mount multiple devices manually i.e. by running the mount command I would need to create directories in the /media directory?
share|improve this question
    
(1) No, you mount a filesystem, not a device. (3) This makes no sense. (5) Yes, or try using the /mnt directory instead of /media when manually using the mount command. –  sawdust Dec 2 '12 at 8:58
    
@sawdust - Thanks. So even if I have attached a device such as an external harddrive, I would be mounting a filesystem? Why does (3) not make sense? Each time I attach an external harddrive or USB stick/pen, Ubuntu appears to create a directory I can access e.g. /media/{name_of_device}. What difference does it make if I use /mnt or /media? –  PeanutsMonkey Dec 2 '12 at 19:05
add comment

1 Answer 1

up vote 2 down vote accepted

The command I used to mount is
mount -t iso9660 -o loop,ro name_of_iso.iso /media.

You mounted a read-only filesystem.
That would inhibit any further mounts by the automount, since it can no longer create mount-points in the /media directory.

(1) No, you mount a filesystem, not a device.
(2) You made /media a read-only directory.
(3) This makes no sense. Do you mean "Why doesn't Ubuntu create a new directory for it as it normally would? See reply for (2).
(4) That's the job of the automount daemon.
(5) Yes, or try using the /mnt directory instead of /media when manually using the mount command. Leave /media alone for the automount daemon.

So even if I have attached a device such as an external harddrive, I would be mounting a filesystem?

mount is provided the filename where the filesystem is located. The filesystem can be in a file (e.g. ISO image file), a hard drive partition, or a (local or remote) directory (e.g. NFS).

Try an experiment: wipe the hard drive clean, and then try to mount it. It will not work; mount simply won't deal with a device. The HDD has to be partitioned and then a filesystem has to be created in the partition before that partition can be mounted. The entire "external harddrive" cannot be mounted, as there is no filesystem encompassing the whole drive.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.