Tuesday, March 6, 2012

Look Mah, I got a new DVD drive

Replacing a dvd drive in any OS is due to happen and it's inevitable. either because its broken, busted or you just want to replace it with  a new shiny full featured dvd drive. In SuSE  It will work-out-of-the-box as i assume it would  be in any other distro  but sooner or later you will encounter some annoying message, you will get an error while using the "eject" command.

If you want to play a disc entry using VLC.


Checking the device entry:

 ls -l /dev/cdrom* 
 ls -l /dev/dvd* 

Then checking out   /etc/udev/rules.d/70-persistent-cd.rules   will yield something like this.

There's your culprit. A quick solution would be adding the 1 at the end of the device. Although the first entry is a VBOX_CD-ROM since this system came from a vbox install The same is true if you have replaced your drive or clone your system and booted from another machine.

Quick fix:
 eject /dev/cdrom1 

vlc /dev/dvdrom1

That should fix that issue but that's not what we want. Unfortunately   yast   has no module entry for DVD/CD drives so the permanent fix would be removing that file from the udev directory as shown below.
  mv /etc/udev/rules.d/70-persistent-cd.rules /tmp   

here we choose the /tmp directory but you can put it somewhere else. A simple reboot would fix the issue, and udev will reconfigure your drive by creating a new entry in the udev directory with only your new drive in it, but you can force udev to reconfigure your hardware without a reboot by executing the following command as root.

Using force:
 /etc/init.d/boot.udev force-reload 

The more gentle approach:
  /etc/init.d/boot.udev stop && /etc/init.d/boot.udev start  

Systemd starting from 12.1
  systemctl restart udev.service  

That will create entry for that file we just removed from it's directory. Doing again those check's we did before should make you a happy camper.

Have fun playing dvd's!!!

No comments:

Post a Comment