How to mount dvd linux

how to mount dvd-rw drive/create mount point

I just get ubuntu 12.10. So I am a newbie. I have sata hard disc with partitions — sda 1 (swap) sda 2 (mount point /) and sda 3 (mount point /home).
Today I add another internal hard disc (not sata) which I plan to use only for data, and its mount point is /media/sdb1. But after adding another HD ubuntu doesnt mount my dvd rw drive any more.
I get this error:

mount point media cdrom0 does not exist
mount: can't find /cdrom in etc/fstab or etc/mtab

3 Answers 3

I looked in /dev. A file there was called dvd. I entered ‘ ls -al /dev/dvd ‘ and it told me that this was a link to /dev/sr0. I inferred that from this response:

lrwxrwxrwx 1 root root 3 Apr 24 15:56 /dev/dvd -> sr0 

The first ‘l’ means that it is a link, not a real file.

Then, I looked at /. There was a directory there called ‘mnt’, the usual node for subdirectories of mounted peripheral devices. It was empty.

I made a subdirectory of /mnt using:

Then, I mounted sr0 there with:

sudo mount /dev/sr0 /mnt/cdrom 

It came up with a lot of right-looking stuff, so I concluded success.

Still in 2017, this is the solution that worked for me, on Ubuntu 17.04. Not sure why Nautilus won’t auto-mount like it does for any other removable media, but this works.

CD/DVD Drive Rule: Mount Drive Upon Insert to «/media/DVD»

Do this if you want to restore auto-mounting with some control over how it is done.

  • Auto-creates mount point upon insertion of medium
  • Auto-mounts medium to mount point with specific permissions
  • Auto-removes mount point upon removal of medium

Action: CD/DVD Tray has media and is pulled in

You have to tell your system to react this this action. You can have it run a mount script (any custom script). To do this, you need to create a new rule in the lib/udev/rules.d folder. These commands need to be run as root (use the prefix sudo for the following commands to run them as root or become the root user with sudo -s

  • Make a new file and call it autodvd.rules touch /lib/udev/rules.d
  • Look for info about your CD/DVD drive by running udevadm info —query=all —attribute-walk —name=/dev/sr0 (root not necessary here, but works both ways) Look for something that uniquely identifies your drive (for better or for worse I picked ATTRS==»HL-DT-ST» , which is my drive (yours will be different unless you happen to own the same drive as me). Copy it down somewhere for later. You can take some time to look over this file and compare it with the rule example below. The SUBSYSTEM and ATTRS can be found in it.
  • Edit your new rule (you can use whatever editor you choose, I use vim /lib/udev/rules.d , but nano /lib/udev/rules.d works too and is easy. Add these things, editing your ATTRS to match yours (this is the sensitive part, you might have to pick a different attribute if it doesn’t work) and correct the YOURUSER and YOURGROUP fields:
Читайте также:  Установленные команды на линуксе

KERNEL==»sr7*», SUBSYSTEM==»block», ATTRS==»HL-DT-ST», SYMLINK+=»dvdburner», OWNER=»YOURUSER», GROUP=»YOURGROUP» ACTION==»change»,RUN+=»/home/YOURUSER/Scripts/Bash/automountdvd.sh»

  • The KERNEL==»sr3*» just means it will test all scsi devices (sr0-sr9)
  • The SYMLINK is just a symbolic link to the drive (like /dev/cdrom is to the real /dev/sr0 )

You may need to reload all of the udev rules:

udevadm control --reload rules reload udev udevadm trigger 

Mount Script

Save the following somewhere like: /home/YOURUSER/Scripts/Bash/automountdvd.sh and correct the YOURUSER and YOURGROUP fields. Oh by the way, it is dangerous to put this script in the user folder, because it will be run by root, which means if somebody hacks your user folder, they can adjust the script to do whatever they want and root will run it (and likely succeed, because the root user has full control over the system) Probably better to hide it in a folder that only root can see. If you are experimenting, it is fine.

#!/bin/bash < mountpoint="/media/DVD" user=YOURUSER group=YOURGROUP uid=$(id -u $) gid=$(id -g $) FS_TYPE="`blkid /dev/sr0 | grep -o 'udf'`" if [ $ == 'udf' ]; then echo "ID_CDROM_MEDIA set to 1, creating $ and attempting to mount DVD." mkdir -p $ && chown $:$ $ mount -t $ -o ro,uid=$,gid=$ /dev/sr0 $ echo "DVD mounted at $." else echo "Attempting to unmount -l $." umount -l $ rm -rf $ echo "Unmounting $ and removing folder $." fi > &>> "/var/log/autodvd.log" & 

Источник

Как монтировать DVD и CD-диски с помощью Ubuntu

В этом руководстве вам будет показано, как монтировать DVD или CD с использованием Ubuntu Linux. Руководство показывает несколько методов на случай, если один из способов не работает для вас.

Легкий путь

В большинстве случаев, когда вы вставляете DVD, вы должны быть немного терпеливы, пока DVD загружается. После этого вы увидите экран, аналогичный показанному в этом руководстве.

Сообщения, которые вы получите, будут различаться в зависимости от типа носителя, который вы вставили.

Например, если вы вставили DVD с передней стороны магазина, который содержит программное обеспечение, предназначенное для автоматического запуска, вы увидите сообщение о том, что программное обеспечение хочет работать. Затем вы можете выбрать, запускать это программное обеспечение или нет.

Если вы вставите чистый DVD, вас спросят, что вы хотите сделать с DVD, например, создать аудио DVD.

Если вы вставите аудио CD, вас спросят, хотите ли вы импортировать музыку в ваш аудиоплеер, такой как Rhythmbox.

Если вы вставите DVD, вас спросят, хотите ли вы воспроизвести DVD в Totem.

Вас спросят, что делать, когда вы снова вставите этот DVD в будущем. Примеры включают в себя:

  • спроси что делать
  • ничего не делать
  • откройте папку в файловом менеджере
  • выберите другое приложение

Вы можете спросить, в чем смысл руководства, показывающего, как сделать что-то настолько простое, но иногда все идет не по плану, и вы захотите использовать командную строку для монтирования DVD.

Смонтировать DVD с помощью файлового менеджера

Вы можете увидеть, был ли DVD смонтирован с помощью файлового менеджера. Чтобы открыть файловый менеджер, щелкните значок шкафа для хранения документов на панели запуска Ubuntu, который обычно является вторым вариантом вниз.

Если DVD-диск смонтирован, он появится в виде значка DVD в нижней части панели запуска Ubuntu. Вы можете открыть DVD в файловом менеджере, нажав на значок DVD.

Если вам повезет, вы увидите DVD в списке в левой части экрана диспетчера файлов. Как правило, вы можете дважды щелкнуть по имени DVD (с символом DVD), и файлы, которые находятся на DVD, появятся на правой панели.

Читайте также:  Получить билет kerberos linux

Если по какой-то причине DVD-диск не был автоматически подключен, попробуйте щелкнуть правой кнопкой мыши DVD-диск и выбрать в контекстном меню параметр mount .

Как извлечь DVD с помощью файлового менеджера

Вы можете извлечь DVD, щелкнув правой кнопкой мыши на DVD и выбрав опцию Извлечь , или нажав на значок извлечения рядом с DVD.

Как смонтировать DVD с помощью командной строки

DVD-привод является устройством. Устройства в Linux обрабатываются так же, как и любой другой объект, и поэтому они перечислены в виде файлов.

Вы можете перейти с помощью команды cd к папке/dev следующим образом:

Теперь используйте команду ls и команду less, чтобы получить список.

 ls -lt | меньше 

Если вы пройдете по списку, вы увидите следующие две строки:

 cdrom -> sr0 
dvd -> sr0

Это говорит нам о том, что CD-ROM и DVD связаны с sr0, поэтому вы можете смонтировать DVD или CD с помощью одной и той же команды.

Чтобы смонтировать DVD или CD, вам нужно использовать команду mount. Прежде всего, вам нужно куда-то установить DVD.

Для этого перейдите в папку/media/с помощью следующей команды:

Теперь создайте папку для монтирования DVD в

 sudo mkdir mydvd 

Наконец, смонтируйте DVD с помощью следующей команды:

 sudo mount/dev/sr0/media/mydvd 

DVD будет смонтирован, и вы сможете перейти к папке media/mydvd и выполнить просмотр каталога в окне терминала.

 cd/media/mydvd 
ls -lt

Как размонтировать DVD с помощью командной строки

Чтобы размонтировать DVD, все, что вам нужно сделать, это запустить следующую команду:

 sudo umount/dev/sr0 

Как извлечь DVD с помощью командной строки

Чтобы извлечь DVD с помощью командной строки, используйте следующую команду:

 sudo eject/dev/sr0 

Резюме

В большинстве случаев вы будете использовать графические инструменты для навигации и воспроизведения содержимого DVD-дисков, но если вы окажетесь на компьютере без графического дисплея, то теперь вы знаете, как установить DVD-диск вручную.

Источник

How to mount a DVD in Ubuntu

How to mount a DVD in Ubuntu

This tutorial will teach you how to mount or unmount a CD or DVD in Ubuntu. This very simple method can be done through your terminal and only requires the use of a command line.

Assuming that your CD or DVD is located in media/cdrom0, there are two lines of code that will enable you to mount or unmount a disc:

sudo mount /media/cdrom0/ -o unhide
  • Once your CD is mounted, you can access your data through your directory.
  • To unmount or eject the disc, open your terminal and enter
sudo umount /media/cdrom0/ -l
  • Ubuntu mount cdrom
  • Find and mount > Download — Backup and recovery
  • Xvideoservicethief ubuntu 14.04 download > Download — Video downloads
  • Install .tar.gz in ubuntu > Guide
  • Ubuntu reset network settings > Guide
  • Ubuntu remove password > Guide

Ubuntu

  • How to install Flex and Bison Ubuntu
  • Execute a script on Ubuntu: at startup, shutdown
  • How to set the fastest Ubuntu download server
  • How to boost the maximum volume in Ubuntu
  • How to disable Ubuntu screen reader
  • How to install ncurses-devel on Ubuntu
  • Clean up configuration residue packages in Ubuntu
  • Rename a partition: Ubuntu
  • How to disable clock in menu bar on Ubuntu?
  • How to repair a damaged filesystem in Ubuntu
  • Ubuntu commands: list, cheat sheet, for beginners
  • How to install Ubuntu on Windows 10: dual boot, USB, disk
  • How to enable/disable firewall on Ubuntu

This information will be transmitted to CCM Benchmark Group to ensure the delivery of your newsletter.

It will also be used, according to your selected preferences, to provide you with more relevant advertisements.

Читайте также:  Relink all in linux

You have the right to access and modify your personal data, as well as to request its suppression, within the limits foreseen by the legislation in force.

You can also change your preferences regarding the advertisements you receive at any time. For more information, please check our privacy policy. Processing of Personal Data.

Источник

How to mount DVD or CDROM in Linux

The Linux Juggernaut

DVDROM (Digital Versatile Disk Read-only memory) and CDROM (Compact Disc Read-only memory) are optical storage devices to store your data for future uses or for backups. May people use these disks to store movies, photos etc. By default many older Linux machines will not allow you to see the content of them. This is due that, they are not mounted by default in your box. We have to mount them properly so that we can access their content.

There are many ways to do mounting CDROM/DVDROM’s. One of the classic way is to use mount command which is available in Linux. Before mounting a CDROM or DVDROM we have to check what hardware file corresponding to our disk drive. If you have DVD Drive then you should see /dev/dvdrom or /dvd-rw file. If you have CDrom then you should find /dev/cdrom or /dev/cd-rw file. Once you are conformed about your device, you can use any one command mention below depending on your device name.

If your device is only CD reader use below command

mount -t iso9660 /dev/cdrom /media/

If your device is a CD readwrite use below command

mount -t iso9660 /dev/cdrw /media/

If your device is a DVD reader use below command

mount -t iso9660 /dev/dvdrom /media/

If your device is a DVD writer use below command

mount -t iso9660 /dev/dvd-rw /media/

Let us see what this command means.

mount is the command to mount devices files etc in a Linux/Unix box.

-t is the option to specify the format of the device, here it is iso9660 format. This is the format how data is written on to the device.

/dev/dvd-rw is a DVD writer present in your machine

/media is the point where you are going to mount your device. once you cd to /media you can see the contact of DVD.

Note:Some times you will not see /dev/cdrom or cdrw or dvd or dvd-rw files. At this time you have to know that it is associated with /dev/hdb or hdc etc.

We can do permanent mounting by using fstab file.

Surendra Anne

Mr Surendra Anne is from Vijayawada, Andhra Pradesh, India. He is a Linux/Open source supporter who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. He works as Devops Engineer with Taggle systems, an IOT automatic water metering company, Sydney . You can contact him at surendra (@) linuxnix dot com.

Latest posts by Surendra Anne (see all)

  • Docker: How to copy files to/from docker container — June 30, 2020
  • Anisble: ERROR! unexpected parameter type in action: Fix — June 29, 2020
  • FREE: JOIN OUR DEVOPS TELEGRAM GROUPS — August 2, 2019
  • Review: Whizlabs Practice Tests for AWS Certified Solutions Architect Professional (CSAP) — August 27, 2018
  • How to use ohai/chef-shell to get node attributes — July 19, 2018

Источник

Оцените статью
Adblock
detector