Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any command or any way to know what file system is there on a medium like hard disk or CD/DVD or flash drive etc. From GUI gparted one can know the type on hard disks/pen drive but not of CD/DVD.

I ran the below command to mount my DVD.

ravbholua@ravbholua-Aspire-5315:~/Documents/Other$ sudo mount -t iso9660  /dev/cdrom ~/Downloads
mount: block device /dev/sr0 is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/sr0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


From the error thrown by mount, I feel that the file system that I had given in the command i.e. 'iso9660' may not be right. From this it strikes my mind to 1st know the f.s. present on the DVD. I'm working on Ubuntu 13.04.

share|improve this question

marked as duplicate by slm, Anthon, Bernhard, rahmu, jasonwryan Dec 29 '13 at 17:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

why don't you omit the -t flag and let the Linux kernel guess the fs type for you? – strugee Dec 29 '13 at 12:15

Mounting a CD or DVD

There are 2 types of media that you'll typically see when dealing with CDs or DVDs. The type iso9660 is what is typically used for CDROMs. So mounting a CD your command would be fine.

However, when mounting a DVD, a completely different filesystem is used. It's called UDF aka. Universal Disk Format. So you'd need to change your command slightly.

$ sudo mount -t UDF /dev/dvd /mnt

I would suggest not mounting media under ~/Downloads. This will likely lead to problems if you're running a web browser. Better to mount them to a directory such as /mnt or create a completely separate directory under $HOME for the exclusive use of mounting this device.

Determining an already mounted filesystem

Incidentally, if you're interested in determining an already mounted filesystem, I think you can use the command line tool df with the -T switch to do this.

$ df -T .

excerpt from df man page

   -T, --print-type
          print file system type


$ df -T .
Filesystem                        Type 1K-blocks      Used Available Use% Mounted on
/dev/mapper/fedora_greeneggs-home ext4 420590200 152457112 246745212  39% /home

In the Type column it shows the type, i.e. ext4.


share|improve this answer
@RobinGreen yes you have caught the right point. DVD isn't mounted yet. – Ravi Dec 29 '13 at 9:26

Try this, changing ‘/dev/cdrom’ to whatever your particular device is. /dev/sr0 (short for SCSI reader, don't ask) is a common, ‘proper’ device special for your first optical drive, but /dev/cdrom is a common symlink on Debian and friends:

sudo file -s /dev/cdrom

Unless something is very wrong with the filesystem, it should detect what it is.

You can use some deductive skills, too. Optical disks almost always have either ISO 9660 or UDF filesystems on them (they're designed for the slow-as-molasses seek times of these devices).

Also, (pessimist here), mount will print out the same message if you try to mount a thoroughly corrupted filesystem, or one on a damaged medium. dmesg will show error messages in the latter case.

share|improve this answer
Thanks a lot for sharing this useful info. – Ravi Dec 29 '13 at 11:38
I ran the command on 1 working DVD (having videos on it) and it showed the f.s. I'm having a few SONY DVDs (purchased recently from shop) which aren't getting burnt. When I ran the same command on these DVDs, it outputs "/dev/sr0: ERROR: cannot read `/dev/sr0' (Input/output error)". So, Alexios may I now presume that these DVDs are having corrupted f.s. (These DVDs may be duplicate)You may please have a look at this thread of mine that shows the error log when I tried burning these DVDs. – Ravi Dec 29 '13 at 12:01
you may be right when you told that mount will print the same message. Yes mount might have printed the message because of corrupted f.s. or damaged medium. Your reply is a perfect & exemplary reply to a question like this. You have touched all aspects of my query. Great & many thanks! – Ravi Dec 29 '13 at 12:31
@Ravi a blank DVD will not have any filesystem and cannot be mounted. Please answer my comment here and tell us if your drive can support the type of DVD you have (DVD-R). Attempting to mount it or using dd won't help. – terdon Dec 29 '13 at 12:35
@Ravi if this answers your question, please mark it as accepted. – terdon Dec 29 '13 at 12:35

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