How to find the filesystem of CD/DVD to make it mount automatically : [Linux]

Updated on September 2, 2017

Question: I recently burnt a DVD and was trying to mount it on my Ubuntu box. It worked, when I tried to mount it manually, but failed to mount via /etc/fstab for automount. The error message indicated that the file system type is wrong. But I did not know how to determine the file system type. Below is the snapshot of the error message.

mount: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so

Solution: For making an entry in /etc/fstab, you need to know the file system type with which the DVD was burnt.  Firstly, follow below steps to find out the file system type and then make an entry in /etc/fstab.

Step 1: How to find the file system with which you have burnt CD/DVD

Since you are able to mount DVD from the command line, you can straight away execute df -T to identify the file system type.

# df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
devtmpfs devtmpfs 32904088 4 32904084 1% /dev
tmpfs tmpfs 32970704 384 32970320 1% /dev/shm
tmpfs tmpfs 32970704 107624 32863080 1% /run
tmpfs tmpfs 32970704 0 32970704 0% /sys/fs/cgroup
/dev/sda3 ext4 192113548 18778924 163552660 11% /
/dev/loop0 ext4 1900368 6148 1772980 1% /srv/node/swiftloopback
/dev/sdb1 ext4 961102880 1389816 910868572 1% /home
/dev/sda1 ext4 19091540 346832 17751840 2% /boot
/dev/sda2 ext4 663120968 73752 629339440 1% /scratch
tmpfs tmpfs 6594144 24 6594120 1% /run/user/1001
tmpfs tmpfs 6594144 0 6594144 0% /run/user/0
/dev/sr0 iso9660 1305902 1305902 0 100% /mnt/cdrom

[OR]

You can also find out the file system by executing the below command:

# head /dev/sr0 | file -

Step 2: From the above output, it’s clear that the file system type is iso9660. Now enter the values in /etc/fstab as shown below:

/dev/sr0 /media/cdrom iso9660 defaults 1 1

Step 3: Execute the below command and test it out.

# mount -a

Step 4: That’s it. Next time when you insert DVD in the drive, it will be mounted automatically.

Was this article helpful?

Related Articles

Leave a Comment