Software :: Udev Creates External USB HD Device Node Too Late
May 22, 2010
On my debian lenny OS I have an external usb hard disk I would like to automount it at boot. So I edited the /etc/fstab file in order to automount /dev/sdb1. It worked without problem. Then I recompiled the kernel and, as consequence, /dev/sdb1 changed to /dev/sdc1. I started playing with udev in order to match the now called /dev/sdc1 and to change its name in /dev/maxtor (being maxtor the brand of the hard disk). Obviously I edited also /etc/fstab: /dev/sdb1 is now /dev/maxtor.
The boot automount doesn't work anymore. On the boot sequence I can read the message "Mounting local filesystem...mount: special device /dev/maxtor does not exist FAILED". But when I log into the system I can run the command "mount /dev/maxtor /mnt/maxtor" and it works! So, IMHO, my udev rule is correct otherwise also the manual mount wouldn't work, right? I have to tell to udev to create /dev/maxtor BEFORE the boot automount process.
I tried to delete my udev rule and to edit /etc/fstab changing /dev/maxtor in /dev/sdc1 (the name udev gave to my hard disk after kernel recompile, before was /dev/sdb1) and it didn't work: on boot process I always see the "Mounting local filesystem...mount: special device /dev/sdc1 does not exist Failed". Then I tried to change /dev/sdc1 in /dev/sdb1 in /etc/fstab and to reboot with the old original kernel and int this way it works. With my compiled kernel, the OS seems to have lost the capacity to detect my device node correctly.
View 2 Replies
ADVERTISEMENT
Aug 23, 2011
I've bought an X10 Home Automation USB interface: the CM15.
This is the information lsusb gives:
skerit@KIP-DU-SKER:~$ lsusb Bus 008 Device 002: ID 0bc7:0001 X10 Wireless Technology, Inc. ActiveHome (ACPI-compliant)
But this tells me nothing about where the device file is! How can I find that, or create one myself?
View 1 Replies
View Related
Mar 26, 2010
I am developing for a Linux based device for which the HOT PLUG option is deactivated. As part of optimizing the code, we also don't want to create device files for unused devices. We understand that both USB attached and fixec SCSI hard disks would create device files like /dev/sda,/dev/sda1 /dev/sdb, /dev/sdb1 etc. Is this understanding correct?
In the case of USB attached SCSI devices, would driver create this device file entry? How is it created? Can somebody please tell me how it is being created automatically. In case I attach a fixed SCSI hard disk before boot up(and create device file /dev/sda1), would USB SCSI device driver create device files starting from /dev/sdb, automatically.
View 4 Replies
View Related
May 5, 2011
I have a printer that is not getting a device node assigned at boot.The printer is attached with a USB to Parallel (IEEE-1284) adapter cable.When I plug in the usb cable when the machine is running, the printer is assigned the device node: /dev/usb/lp0
I am guessing that during startup, the printer device is not detected since it is plugged in over an adapter cable which may be considered a device in itself?This is for a retail store, and we rely on the printer to pop the cash drawer open, so it kinda has to work without a "secret handshake".Unfortunately our workstations do not have Parallel ports. I would be happy to share terminal output, udev info, I'll write you a poem but I could sure use a helping hand- I'm stumped!
View 5 Replies
View Related
Jul 7, 2010
This device doesn't automount, doesn't show in KDE 4's device notifier, and I can't mount this camera manually because it doesn't appear to get assigned to a device node. Any known solutions? It worked in Slackware 12.2, but not in 13.0 or 13.1.
View 2 Replies
View Related
Apr 12, 2010
I have a Linux server that runs the Sybase DB. Sybase suggests using character devices to access raw devices rather than O_DIRECT to block devices, or cooked FS's. So, I went ahead and configured /etc/sysconfig/rawdevices as such:
/dev/raw/raw1 /dev/vg01/tempdb
/dev/raw/raw2 /dev/vg01/testdb
/dev/raw/raw3 /dev/vg01/fakedb ...
This works fine. I set 'chkconfig rawdevices on' and all is well. I read that this method is deprecated and went about trying to accomplish the same via Udev rules. I already use udev rules in /etc/udev/rules.d/60-raw.rules to set permissions on these devices, i.e.
ACTION=="add", KERNEL=="raw*", OWNER=="sybase", GROUP=="sybase", MODE=="0660"
That works fine. I even set symbolic links:
KERNEL=="raw1", SYMLINK+="vg01/rtempdb"
KERNEL=="raw2", SYMLINK+="vg01/rtestdb1"
KERNEL=="raw3", SYMLINK+="vg01/rfakedb2"
But I cannot seem to get the actual device creation piece to work within udev (it only works using rawdevices). I've tried:
ACTION=="add", KERNEL=="vg01/tempdb", RUN+="/bin/raw /dev/raw/raw1 %N"
No errors, but nothing happens. The device just doesn't create. I've also tried doing it by passing major and minor numbers. Is it possible to get all of this into udev rules or am I stuck with rawdevices? I'm also utterly confused as to the future of rawdevices... the raw man page said it was deprecated, and now at v5.5 it has that piece taken out. Also RHEL 5.3 dropped support for rawdevices in initscripts only to add itback in 5.4. I'm an admin, not a DBA, so I cannot say if this is a bad or good way, only that it is the way the vendor supports and recommends, so it is the way that I must go... just trying to make it work as "un-deprecated" and cleanly as possible.
View 1 Replies
View Related
Jan 23, 2011
I have a problem copying my udev rules from other distro to another pc running debian. My box is running debian without any DE and I want my USB disks to be automounted based on the label; I believe udev is the nicest way to do this task.
Anyways : my rules are (copied from archlinux wiki btw)
cat /etc/udev/rules.d/92-my-media-automount.rules
# vim:enc=utf-8:nu:ai:si:et:ts=4:sw=4:ft=udevrules:
# /etc/udev/rules.d/92-my-media-automount.rules
# Only work on sd*
KERNEL!="sd[a-z]*", GOTO="my_media_automount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="my_media_automount_end" .....
I notice the directory is made successfully up inserting the usb HD, but the mount doesn't succeed. If I manually execute above command, the mount goes ok.
View 7 Replies
View Related
Oct 15, 2010
Having finally made the switch from Windows (7 Professional) to Linux (Fedora 13) on my laptop, I'm now trying to get all my devices working, specifically an Olympus VN-4100PC Digital Voice Recorder. I've installed odvr and it works in root, but not as a normal user. The installation instructions say: odvr *requires* access to the user-space USB interface.
It is recommended to place "41-odvr.rules" into "/etc/udev/rules.d" or setup your own udev rules rather than running odvr as root. After changing udev rules, don't forget to run "udevcontrol reload_rules" and to replugin your DVR. Again, root privileges are required unless udev is properly setup. The file "41-odvr.rules" (designed for Ubuntu) has the following content:
SUBSYSTEM=="usb", SYSFS{idVendor}=="07b4", SYSFS{idProduct}=="020d", ACTION=="add", GROUP="audio", MODE="0664"
I tried just doing what it said and copying it to "/etc/udev/rules.d" but it didn't seem to work. Looking at other files, I then changed it to:
SUBSYSTEM=="usb", ATTR{idVendor}=="07b4", ATTR{idProduct}=="020d", ACTION=="add", GROUP="audio", MODE="0664"
And now if I do "ls -l /dev/bus/usb/002", I get:
crw-rw-r--. 1 root audio 189, 134 Oct 15 01:21 007
Which seems to suggest that it is running the "41-odvr.rules" file, since lsusb gives:
Bus 002 Device 007: ID 07b4:020d Olympus Optical Co., Ltd Digital Voice Recorder VN-240PC
But odvr still doesn't work as a normal user, giving:
Failed to open Olympus device: couldn't claim interface
View 2 Replies
View Related
Jun 7, 2011
My touchscreen "LG Display LGD-MultiTouch" will be recognized sometimes as /dev/input/event0 and sometimes as /dev/input/event3. How to hardcode /dev/input/event0 using udev and xorg.conf?
Code:
# cat /proc/bus/input/devices
I: Bus=0003 Vendor=1fd2 Product=0064 Version=0100
N: Name="LG Display LGD-MultiTouch"
P: Phys=usb-0000:00:1d.7-4.1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: EV=1b
B: KEY=403 0 30000 0 0 0 0 0 0 0 0
B: ABS=700 3f
B: MSC=10
# udevadm info --query=all --path=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
P: /devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
E: PRODUCT=3/1fd2/64/100
E: NAME="LG Display LGD-MultiTouch"
E: PHYS="usb-0000:00:1d.7-4.1/input0"
E: UNIQ=""
E: EV==1b
E: KEY==403 0 30000 0 0 0 0 0 0 0 0
E: ABS==700 3f
E: MSC==10
E: MODALIAS=input:b0003v1FD2p0064e0100-e0,1,3,4,k110,111,140,141,14A,ra0,1,2,3,4,5,28,29,2A,m4,lsfw
E: SUBSYSTEM=input
View 3 Replies
View Related
Jan 28, 2010
I've set up DRBD on 2 machines, 1 of them is the master, another is the slave.
After each bootup, I need to run the following on the master machine:
Code:
drbdadm -- --overwrite-data-of-peer primary all
Do we need to specify which machine should be the primary node every time? Is there any method to make the machine "know" it's itself the primary node?
View 1 Replies
View Related
Dec 16, 2010
I have created a simple menu driven script for our Operations to take care of the basic monitoring and managing of our production application from the back-end. Now, the script when tested in UAT environment was fine, but when deployed to production it kind of behaved oddly.hen the Operator chooses an option from the menu he is given the output and at the end is prompted to return to the main menu by using ctrl+c. In production, this return does not occur for some strange reason and the program just sits there.The session becomes unresponsive after that and I'm forced to terminated it by closing the PuTTY.I tried enabling the debug mode too (set -x) and still was not able to find any useful hints/trails as to why.
View 5 Replies
View Related
Mar 1, 2011
I am familiar with windows 2008 cluster servers, and I just started testing with centos cluster. I am creating a simple 2-node cluster, for a simple ping test.
Node 1: 10.0.0.1
Node 2: 10.0.0.1
Virtual ip: 10.0.0.10
So far, I can ping a virtual ip, and manually relocate it between the nodes, but I didn't figure out, how to do this automatically. So this is my question: How can I setup the cluster, to it automatically failover the a service to another node case one node fails?
View 1 Replies
View Related
Mar 20, 2010
Is there any way to pipe video from the screen to a video device that can be used as if it came from a webcam? I assume it uses udev somehow...
View 4 Replies
View Related
May 21, 2010
I need to prevent udev from creating the /dev/v4l/by-path/* and /dev/v4l/by-id/* files upon connecting my webcam. The problem is that Kopete doesn't want to display the video if these files are present. It works fine if I remove them, but I'd rather not have them created in the first place, since they seem to be completely useless anyway.
View 4 Replies
View Related
Oct 5, 2010
My co-workers and I are trying to develop a USB device, which uses an FTDI chip as a USB-serial controller. The thing is, we would ideally like to set a custom idVendor and idProduct on the FTDI chip. The problem occurs that when we set custom idVendor and idProduct values, udev(7) loads the "usb" driver. If we leave the idVendor and idProduct values to their originals, udev(7) loads the "ftdi_sio" driver. The whole reason for the custom idVendor and idProduct values is so that I can (hopefully) write a udev(7) rule to map that particular device to a specific entry in /dev. Is there a way to write a udev(7) rule so that you can forcefully load a particular driver for a device? Is there something else that could be done to get a similar result?
View 2 Replies
View Related
Oct 27, 2010
I don't have much experience in clustering. And I'm deploying a cluster system on CentOS.But I don't know how long a node failover and another node take over those resouces to continue running service is good, fast or slow? 1s, 10s or
View 2 Replies
View Related
Jan 24, 2010
I have just bought a DVB-T usb dongle to watch some TV. The software I'm using is vdr, which has to be started through the /etc/init.d/vdr service. I have created a udev script that executes the service on device insertion. It works nicely, however now when I boot up the computer it takes ages to get to desktop. I believe it is because of the WAIT_FOR part. But without this part, the service starts too soon because the usb dongle has been inserted but the firmware has not finished loading. Can someone point out an alternative way to do it? The script is here [URL].
View 4 Replies
View Related
Jun 2, 2010
how udev rules work to create device files. Following is what I did for that: Up on plugging in my phone (sony w800i), I am getting a device file 'devcdc-wdm0' created. I just tried to figure out the rule which is responsible for the creation of this particular file.
I searched in 'etcudev ules.d' and 'libudev ules.d' for the string 'cdc-wdm' to find that rule. But I am not getting any hits in that search. Could any one help me out in this one.
BTW: I am using Ubuntu 9
View 6 Replies
View Related
Feb 24, 2010
Some times I boot up, and udev has labelled what is usually eth0 as eth1. Of course, my rc.inet1.conf is configured for seeing internet at eth0, so no connection, quite obviously. Then I reboot and the device label is back to "eth0". Actually I'm still not able to get connected, even at eth0, despite my nameservers being OK, and the default route gateway being all OK. PS. I have a static ip address.
View 3 Replies
View Related
Sep 9, 2015
I am using a 3rd party kernel driver that does not support udev properly. When I was using wheezy I placed the required device files in /lib/udev/devices.
The udev in jessie does not appear to support this. Is there any way to have udev create these device files or will I have to create then using a script at boot-up?
View 1 Replies
View Related
Dec 15, 2010
UUIDs make fstab hard to read, so.. Is it possible to use udev rules to prevent HDs to change device, instead of using UUID in /etc/fstab?
View 2 Replies
View Related
Jun 16, 2010
I'm trying to mount a custom device node for each usb port of my pc. For example: Every pen drive connected to my usb 1-1.2 will be called /dev/usb2 and mounted on /mnt/usb2, on usb 1-1.3 port the device node will be called /dev/usb3 and mounted on /mnt/usb3.
I'm using an embedded linux, the device handler is mdev. Editing mdev.rules I'm able to manage new devices and write special rules for them (on /bin/hotplug.sh I can mount the /dev/udisk device on anywhere I wanna):
Code:
# This will be called after scsi emulation, so the
# new device (sda1, sdb1 ...) will be managed by /bin/hotplug.sh
mmcblk0p10:00600=sdcard */bin/hotplug.sh
sda10:00600=udisk * /bin/hotplug.sh
[Code].....
Is there anyway to change scsi emulation configurations or code? I want to call my pen drive on my way (/dev/usb1 instead of /dev/sd*)!
View 4 Replies
View Related
Jun 12, 2011
How can I figure out the "Device" name from the "Sysfs" node? e.g. [root@baba 0000:00:01.0]# lspci | grep -i Ethernet
00:19.0 Ethernet controller: Intel Corporation 82566DC Gigabit Network Connection (rev 02)
View 1 Replies
View Related
Feb 28, 2011
I had tried to install Ubuntu 10.10 on an external harddrive, the Laptop was running Vista. It all worked fine, but now, when the external hd isn't connected, I ge the message: error: no such device : ... grub rescue> the I put the ls command grub rescue> ls (hd0)(hdo,msdos3)(hd0,msdos)(hdmsdos1) Now I just want to get Vista working again, without having to connect the hd.
View 9 Replies
View Related
Aug 14, 2010
External USB TV device to work on 10.04 I have an External USB TV tuner[URL] Device,That is Compatible with Windows.Is there any way to make it work with UBUNTU 10.04.
View 7 Replies
View Related
Jul 2, 2010
Are there any tools in Ubuntu that could defragment my MP4 player (Sansa E280R)? One of the songs on my MP4 player isn't showing its Album Name or Artist Name. I know I have the artist and album name tagged onto the MP3 because I set them both & double checked using mp3tag.
View 9 Replies
View Related
Aug 11, 2010
I am setting up a Linux laptop for my parents, and want to also create some backup scripts to allow them to easily back up to an external hard drive. [And for them to be able to use it, it has to be super simple.]
For security purposes (should the external drive ever get lost or stolen), I want to encrypt the entire device using TrueCrypt. That means my scripts will have to use TrueCrypt to mount the backup volume using the device name. [Right?]
Now to the actual question(s): 1) Is there a way to ensure that an external hard drive will ALWAYS be assigned the same device name when plugged in? [That would be the simplest solution for me.]
2) Alternatively, is there a way (using bash scripting) to "find" the device name of a particular external hard drive, even if it might not be known in advance.
View 2 Replies
View Related
Aug 31, 2010
I don't have any sound in my external device (TV). I'm attempting to watch a movie on the VLC player but I can't seem to get the sound to work through my television speakers! They are coming out of my computer speakers just fine though.
View 5 Replies
View Related
Jun 1, 2010
I have a server with RHEL 5. I have bought a HDD and put it into a USB box. Then I plug it to my server by USB cable. I want to mount it but the fdisk -l command don't show external usb device.
View 7 Replies
View Related
Jan 6, 2010
I have a large external drive, which I connect to my laptop via a PCMCIA card - the machine is old and does not have USB 2.0 built in, so I use the PCMCIA card for that.
I am thinking of the following setup, and hope you can give me some tips on whether or not that would be a sound solution:
- designate a boot partition on the laptop's internal hard drive, which could store kernels
- make up a linux partition (or more than one) to use as root for any distribution on the external drive
- keep /home as separate partition on the external drive
My goal in mind is to be able to boot more than one Linux partition from the external drive. I can't make it through USB boot because the PCMCIA card is not recognized before a kernel module is loaded, and I can't use the internal USB 1.1 port for the external drive.
Do you think this is the way to go? Currently, I only have my /home partition mounted off the external drive.
View 5 Replies
View Related