Software :: Using UDEV To Automatically Run A Script On Optical Disc Mount?

Mar 1, 2010

I'm trying to get a script to run whenever an optical disc is mounted by the system but can't get it to work. I'm running Fedora 12 64bit and the drive is SATA device sr0.

Following online guides, I created a new rule file called '10-my.rules' in '/etc/udev/rules.d' which contains the following:

Code:
KERNEL=="sr0", RUN+="/usr/local/bin/myscript"

But nothing happens when a disc is mounted. The script itself runs fine manually and is clearly evident when launched so the problem must be the rule file. I've tried changing the name of the rule file in a few incremental steps from 10-my.rule to 99-my.rule to no effect.

I've gathered some information about my optical drive using the udevadm tool.
Here is the result of an info query:

Code:
P: /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
N: sr0
S: block/11:0
S: scd0

[Code]....

View 8 Replies


ADVERTISEMENT

Fedora :: Automatically Run Script On Optical Disc Is Mount?

Feb 23, 2010

how to get a bash script to automatically launch when the optical drive mounts a disc, any type of disc - DVD, CD, data, etc. It seems like such a simple task but after weeks of searching I have yet to find a workable solution.

View 1 Replies View Related

Fedora :: Determine Optical Disc Type From Terminal?

Feb 3, 2010

From the terminal, or a script, how can I determine the media type (CDDA, DVD, ISO, etc) of a mounted optical disc? I need this for an automated script on my headless media server - Fedora 12 64bit.

View 2 Replies View Related

Ubuntu :: Grub Rescue On Netbook (With No Disc Optical Drive)

Jan 2, 2010

My girlfriend has a dual boot netbook I set up for her with Vista + 9.10. Her internet service went down yesterday temporarily and she was messing around with the computer to get back online and somehow booted into the Windows Rescue Partition and began the Windows Restore process, then turned the computer off during the middle of the restore process.It's her only computer and she lives 1800 miles away. And since it's a netbook there's no optical drive.

When she boots up now, the netbook goes straight into Grub Rescue mode. I got her to try most of the commands for Grub Rescue, but most of them come back as "Unknown Command". The "LS" command works though, and she was able to get a list of partitions displayed.Does anyone know of some commands she could use try to boot back into 9.10 (assuming it's still there)? Or even boot into Windows? Specifically, is there a simple command that could be combined with "LS" to specify a partition and try to boot into it?

View 9 Replies View Related

Hardware :: Definition Of A Term In The Context Of Optical Disc Authoring

Nov 5, 2010

I have run a CD/DVD burner program (cdrecord) on a blank DVD and I got the following message.

Code:

WARNING: Phys disk size 1823462 differs from rzone size 0! Prerecorded disk?
WARNING: Phis start: 196608 Phys end: 2020099

What can the program be referring to with "prerecorded disk"?

View 2 Replies View Related

OpenSUSE Hardware :: Optical Disc Drive Detected But Doesn't Work?

May 9, 2010

OpenSUSE 11.2 x86_64
KDE SC 4.4.3
Linux 2.6.34-rc6-29-desktop (from KERNEL:HEAD)
HAL 0.5.13-4.2.1
udisks 1.0.0.git20100224-11.1
ASRock G43Twins-FullHD LGA 775 Intel G43 Micro ATX Intel Motherboard
Samsung 22X DVDR DVD Burner Black SATA Model SH-S223Q (connected via SATA. detected as: /dev/sr0)

Discs are read by the drive when inserted (they are spun and the LED light on the drive lights up) but nothing happens after that.

I disconnected the SATA cable and tried a new SATA cable on a different SATA port and also tried a different SATA power cable but that did not fix anything.

View 9 Replies View Related

General :: Udev Rules To Automatically Apply 666 Permission?

Apr 3, 2010

my linux box the device node for my printer is by default setup as the following: crw-rw---- 1 root lp 189, 1 Apr 3 07:45 /dev/bus/usb/001/002 This causes cups to not print at all. The Hp backend (HPLIP) fails because of these permissions. How do I change it so that it's crw-rw--rw 1 root lp 189, 1 Apr 3 07:45 /dev/bus/usb/001/002. Ie I would like 666 file permission on that node.

View 2 Replies View Related

Ubuntu :: Can't Mount Cdrom Or Usb After Replacing Optical Drive

Mar 24, 2010

My cdrom was sort of working, but the tray was physically damaged. The usb was working without a problem.

After replacing the the cdrom drive with a similar model known to work well I could not get it to mount. I then tried to move important files to usb to try a fresh install. The usb stick flickered when I put it in, but it didn't mount. Same behaviour as the cdrom, the light goes on when I turn on the computer, but once I'm logged in I can't access the cdrom.

I have tried multiple variations of playing with fstab and trying to mount things in terminal to no avail. I just can't get Ubuntu to recognize the usb or cdrom even though their lights go on when I first try to use them.

View 4 Replies View Related

General :: Optical Disks Won't Mount After Install FC8 / Resolve This?

Mar 19, 2009

Finally got FC8 installed on new machine, and now it won't mount CDs/DVDs - didn't change anything in BIOS, CD/DVD drive is only thing on the IDE controller (HD is SATA) so is it likely a driver issue? FC8 seemed to have correct (or at least working) drivers for LAN, audio, SATA, etc.

View 1 Replies View Related

Hardware :: Mount Magneto Optical Disk OS2 / SCSI

Nov 20, 2010

I am trying to mount a a Magneto Optical WORM drive, mechanically it is a 2.6 Gb, 1024 Bytes/Sector, 5.25", Verbatim Media, The disk was created under OS-2.

I am using CentOS 5, and have tried mounting the disk as msdos and as vfat and get superblock errors among others.

what filesystem type did OS-2 use? is there an add on to CentOS that will support the filesystem?

View 6 Replies View Related

Slackware :: No Optical Drive Found - K3b Did Not Find Any Optical Device In Your System

May 22, 2010

I dont know when k3b stopped working but have just gone to burn a disk and when opening it tells me

Quote: No optical drive found. K3b did not find any optical device in your system. Solution: Make sure HAL daemon is running, it is used by K3b for finding devices.

I can boot from cd and can mount cds from within Slackware but for some reason k3b insists that i don't have a drive.

View 8 Replies View Related

Ubuntu Multimedia :: Optical Out From TV Into The SPDIF / Optical In On PC

Jul 5, 2010

I currently have the following:-

Optical Out from my TV into the SPDIF / Optical In on my PC
Optical Out from my PC into my Sony 5.1 Theatre Kit

The audio from the PC comes through ok when listening to music and movies. But unfortunately I can figure out how to enable the audio passthrough from my Tv so that the audio comes out of my theatre kit. In Sound Preferences, the hardware is set to 1 Output / 1 Input [Digital Stereo (IEC95 Output + Digital Stereo (IEC95 Input]. When I click on the audio tab, the Input Volume is at 100% and the Input Level is moving in conjunction with the audio coming from the Tv.

I saw it mentioned in another thread to install Gnome Alsa Mixer which I've done, it seeems to identify the audio chipset as Realtek ALC882, the motherboard is an Abit AB9 Pro. Hopefully I'm missing some config somewhere or there a box I should be ticking but I just can't find it.

View 2 Replies View Related

Ubuntu :: Using Udev To Mount USB Storage In Home?

Apr 1, 2010

I would like to have my USB stoage devices to be mounted under my $HOME automatically when I insert them. Those devices have been partitioned, formated with XFS and also given a UUID for this purpose. I think I should use udev's rules and have also done some attempts like this one:

SUBSYSTEM=="usb", ENV{ID_FS_UUID}=="c195a25a-c03e-4cd8-9d86-9b9219acfeb4", OWNER="uqbar", GROUP="uqbar", RUN+="/bin/mount /dev/%k /home/uqbar/work"

Of course it doesn't work. I'm running Kubuntu 9.10 and Ubuntu 9.04 and would prefer a solution not tied to a specific desktop.

View 7 Replies View Related

OpenSUSE Hardware :: Can't Make Floppy Drive Read Disc Automatically

Oct 24, 2010

Not sure if anyone uses floppy drives anymore much. I know that most machines don't come with them anymore unless you ask for one.One of my machines [Machine # 2] has a floppy and I have never had the occaision to use it under linux [opensuse 11.2 currently]. Until now that is! I have about 30 floppies that I need to transfer the data from. I am able to mount the floppy drive and take data off the currently inserted floppy, but if I want to insert another floppy and remove the data from it, I must unmount and remount the floppy everytime. There is an entry in fstab:

/dev/fd0 /media/floppy auto noauto,user 0 0

and a mount point in media [/media/floppy] Is there something else I need to have in the fstab line for the floppy so that it will read automatically everytime I insert a disk?

View 8 Replies View Related

Ubuntu Installation :: Prevent OpenOffice Automatically Installing When Using The Alternate Disc?

Feb 5, 2011

UBUNTU 10.04.1 LTS
AMD64

Is there any way I can prevent OpenOffice automatically installing when using the Alternate disc? I want to install a different package (LibreOffice 3.3) without having to uninstall Ubuntu's OpenOffice.

View 3 Replies View Related

General :: Setup Fstab To Automatically Mount NTFS Partitions - GUI To Set The Mount Permissions?

Feb 10, 2010

I am trying to setup fstab to automatically mount my NTFS partitions. I have used various Mount managers to create the entries in fstab. The fstab seems fine, but when mounting at boot or even via Nautilus I get the error message that I do not have permission to mount the disk.

1) Can this permission be set in the fstab file? If so what is the syntax of the fstab entry?

2) If not, is there a tool i.e. GUI to set the mount permissions?

View 14 Replies View Related

Hardware :: Stop USB Stick To Mount Automatically And Mount It Manually?

Jan 26, 2011

I need a guicance related to mounting USB stick of 2GB capacity. Normally when I insert my USB stick it mount automatically and show me.I want that instead the usb mount automatically I manually mount it. Now there are two steps to do it. First How to stop USB to mount automatically ? Second How to mount it manually ?

View 1 Replies View Related

Red Hat / Fedora :: Preparing A DVD+RW Disc For Writing - Mount: You Must Specify A Filesystem Type

Jun 15, 2011

I'm trying to mount an external DVD +RW Drive so I can burn a directory from my Linux Server to disk. I think I've figured out how to mount the drive, but it only works when there's a disk with data in the drive. When I enter mount /dev/scd1 /mnt I'm able to read from the drive, no problem. When I try to do the same thing, however, with a blank disk I get the following message: "mount: you must specify a filesystem type" So I'm assuming I need to prepare the disk somehow. I've verified that the dvd+rw-tools package is installed on the RH server but I'm not sure what the next step is.

View 4 Replies View Related

Ubuntu :: Mount A Toshiba External Hard Disc Drive To 9.04?

Jan 6, 2010

how could I mount a Toshiba external hard disc drive to my Ubuntu 9.04?

View 3 Replies View Related

Ubuntu :: Live Disc Mount Hard Drive - Root User Access?

Mar 23, 2009

My wife's XP has crashed and I need to save files. I've discovered the command to mount the hard drive - unfortunately I need to force the mount, but I can't do it because I have to be in root. I can see the root user in the user list, but when I try to switch I can't access it. How I can do it to back up my wife's files. I have Kubuntu 8 and KDE 4.1.

View 2 Replies View Related

Ubuntu :: Hard Disc Failure - Error Mounting: Mount: Wrong Fs Type, Bad Option, Bad Superblock ?

Apr 18, 2011

Ubuntu 10.04 has just failed to load from my hard drive, so I've resorted to booting from CD just to get the machine going.I'm wondering if my main boot drive has gone caput??When trying to mount it using DISK UTILITY...get the message: Error mounting volume

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

View 5 Replies View Related

General :: How To Mount Automatically

Jan 5, 2010

I want to mount a partition automatically when ubuntu starts.I have read some articles about but i think i make some mistake.I have read about etc/fstab and I wrote a statement below./dev/sda5/home/xyz/Desktop/ABC udf,iso9660 user,auto,exec,utf8.

View 4 Replies View Related

OpenSUSE Install :: 11.3 - Can't Find Grub Without Disc / Boot From Hard Disc

Jan 1, 2011

I have just installed 11.3 x64. The installation went fine and worked for the first few hours. I ran the online update tool, and now it cannot find grub unless the installation disc is inserted and I select the "boot from hard disc" option.

I have read about the problem of the root partition being back, but not sure that's it.

sda1 - swap
sda2 - /
sda3 - /home

There used to be a repair tool in the installation disks. I could not find that in this media. Is that still available?

View 9 Replies View Related

Ubuntu :: Unable Multisessions When Burning Disc Or Import A Disc Which Has A Multisession?

Mar 10, 2010

this blew my mind today, because i've been using ubuntu for 2 and half years. Brasero 2.28.2 in Karmic does not have an option enable multisessions when burning disc or import a disc which has a multisession.

Seriously, wtf is going on? This is supposed to be Ubuntu's default CD authoring software.

View 4 Replies View Related

Ubuntu :: Install Files - Stuck On - Please Insert The Disc Labeled - Disc 2

Dec 19, 2010

I'm trying to install files and everytime I manage to install from the first disc I succeed. When I get the the second disc I just keep clicking the "OK" button instead of "Cancel" and it keeps neglecting it.

View 1 Replies View Related

Ubuntu Installation :: How To Automatically Mount Second HD

Jan 7, 2010

I have installed the second drive, I have partition it and now it is OK. How could I make it to mount automatically at boot so it could be accessed easily, please?I understand that I have to use some commands (forgot where I read that) but have no idea how to do it.Is there an application with GUI to do that, so I will not make mistakes in terminal?

View 2 Replies View Related

Hardware :: Some CDs / DVDs Do Not Automatically Mount

Jun 5, 2010

I have checked out 'similar threads' to no avail. I am using Mandriva 2010 on /dev/sda6. I have two Pioneer CD/DVD drives. Some data CDs/DVDs automatically mount. Some do not show up in Dolphin's 'Places'. I tested many. Age of disk, brand name and whether pen parked gave no significant correlation. Using PCLinuxOS 2010 (live disk) created the same problem - not altogether surprising. But using Ubuntu 9.04 (live disk) created no problem.

Booting with slightly different kernel versions solved nothing. Using Windows XP or Mandriva 2009.1, both on other partitions, created no problem but when I tried Ubuntu 10.04 (live disk) I had 'no signal'. I have just put in a new Radeon (later than HD 2000) video card (fglrx) so I wondered if Ubuntu does not like it but this issue is unimportant - if Mandriva 2010 can be tamed. What did correlate was that both drives either recognised or both ignored any particular disk. Manual mounting as root works okay but my wife is not comfortable with the CLI.

The fstab file is below:
# Entry for /dev/sda6 :
UUID=14353eb6-82ff-45cc-ae64-8eed13800b46 / ext3 defaults 1 1
/dev/sr0 /media/cdrom auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
/dev/sr1 /media/cdrom1 auto umask=0,users,iocharset=utf8,noauto,ro,exec 0 0
none /proc proc defaults 0 0
# Entry for /dev/sda5 :
UUID=07e9f3ee-d92e-4696-b762-03a07ed102d2 swap swap defaults 0 0

I checked but could not positively identify this issue as a known bug in Mandriva 2010.

View 2 Replies View Related

Fedora :: USB Disc - Access To USB Disc From Text Mode?

Dec 6, 2009

I'm sorry for this stupid question, but I have nowhere found it.I need to access to my USB disc from text mode (In Fedora LiveCD I see it and i can access /media/New Volume). In F12 runlevel 3 in mc I see it in /dev/disc/by-label as @Newx20Volume. But I don't know what is the correct path.

View 2 Replies View Related

Ubuntu :: Unable To Play Audio CD's Or Video DVD's - Unable To Mount Disc: Location Is Not Mountable

May 24, 2010

I'm totally unable to play or mount audio CDs and unable to use video DVD's on my box right now. When I insert an audio CD I get a dialog box saying:

Unable to mount disc: Location is not mountable

and if I check messages in the Log File Viewer I see the following text repeated (save for the last line) a couple of dozen times.

Code:

May 24 13:04:37 Amber kernel: [ 6680.434685] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
May 24 13:04:37 Amber kernel: [ 6680.434691] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current]
May 24 13:04:37 Amber kernel: [ 6680.434695] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track

[code]...

on a similar but ultimately unrelated thread someone was asked to enter a few commands so I tried them and the following was the output:

Code:

main@Amber:~$ ls /dev/scd*
/dev/scd0
main@Amber:~$ sudo mount /dev/cdrom /media/cdrom0

[code]...

An error occurred: Could not open location; you might not have permission to open the file. As far as I can tell I have the relevant CSS libraries installed I'm lost without being able to play CD's and DVD's on my system.

View 9 Replies View Related

Fedora :: Mount Internal Disk Automatically?

Dec 9, 2009

FC11 had "Authorization" choice in System > Preferences menu that we could change setting of system. but in Fedora 12 I don't have Authorization choice in menus. Now, how I can change setting of system? for example? Mount internal disk automatically!

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved