Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: jls on July 30, 2012, 05:04:20 AM

Title: [4.5.6] udev problems
Post by: jls on July 30, 2012, 05:04:20 AM
I was trying eeze which is used by enlightenmenet to manage the devices  (cdrom, usb sticks) but it doesn't work, so I asked why on the #e freenode irc channel and 1 of the "e" developers typed me me to pastebin the results of:
Code: [Select]
udevadm info --export-db
The guy examined what I pastedbin and typed:
Quote
(13:41:35) zmike:
well either your kernel or udev are broken then
(13:41:43) zmike:
because they aren't setting the bus of your hard disks properly

and again
(13:45:34) zmike:
BUS is not set for your hard drives
(14:05:22) zmike:
your distribution seems to be incompatible with eeze due to your udev+kernel setup
...........
(14:11:36) zmike:
I will not change eeze to accommodate your distribution
(14:11:47) zmike:
I will close any bugs filed about this
Title: Re: [4.5.6] udev problems
Post by: Rich on July 30, 2012, 05:46:25 AM
Hi jls_legalize
You might also want to include the pastebin link in case someone needs to see it.
Title: Re: [4.5.6] udev problems
Post by: Juanito on July 30, 2012, 05:51:17 AM
I seem to recall that if you load udev-extra and copy the full "60-persistent-storage.rules" from the udev source tarball, then you'll get the bus type reported correctly.
Title: Re: [4.5.6] udev problems
Post by: jls on July 30, 2012, 06:00:46 AM
Hi jls_legalize
You might also want to include the pastebin link in case someone needs to see it.
http://pastebin.ca/2175816 (http://pastebin.ca/2175816)
juanito, thanks I'll try your suggestion
Title: Re: [4.5.6] udev problems
Post by: Juanito on July 30, 2012, 06:06:58 AM
You should see something like:
Code: [Select]
$ udevadm info -q env -n /dev/sda
DEVPATH=/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
MAJOR=8
MINOR=0
DEVNAME=/dev/sda
DEVTYPE=disk
SUBSYSTEM=block
ID_ATA=1
ID_TYPE=disk
ID_BUS=ata
ID_MODEL=ST320LT007-9ZV142
...
Title: Re: [4.5.6] udev problems
Post by: jls on July 30, 2012, 07:20:58 AM
I did what u suggested juanito,
I've installed udev-extra and I've copied all the  60 rules from ftp://ftp.nluug.nl/pub/metalab/distributions/tinycorelinux/4.x/x86/release/src/udev-2a30eaa.tar.xz (http://ftp://ftp.nluug.nl/pub/metalab/distributions/tinycorelinux/4.x/x86/release/src/udev-2a30eaa.tar.xz) to /lib/udev/rules.d and also to /etc/udev/rules.d
but I don't see extra info u reported like
Code: [Select]
ID_ATA=1
ID_TYPE=disk
ID_BUS=ata
ID_MODEL=ST320LT007-9ZV142
Title: Re: [4.5.6] udev problems
Post by: Juanito on July 30, 2012, 07:53:03 AM
did you try:
Code: [Select]
$ sudo udevadm control --reload-rules [shouldn't be required]
$ sudo udevadm trigger

..after copying the rules and loading udev-extra?

Edit:
Code: [Select]
$ udevadm info -q env -n /dev/sda
DEVPATH=/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
MAJOR=8
MINOR=0
DEVNAME=/dev/sda
DEVTYPE=disk
SUBSYSTEM=block
ID_PATH=pci-0000:00:1f.2-scsi-0:0:0:0
ID_PATH_TAG=pci-0000_00_1f_2-scsi-0_0_0_0
DEVLINKS=/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0

cp 60-persistent-storage.rules from udev-173 and load udev-extra:
Code: [Select]
$ sudo udevadm trigger
$ udevadm info -q env -n /dev/sda
DEVPATH=/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
MAJOR=8
MINOR=0
DEVNAME=/dev/sda
DEVTYPE=disk
SUBSYSTEM=block
ID_ATA=1
ID_TYPE=disk
ID_BUS=ata
ID_MODEL=APPLE_SSD_TS256C
Title: Re: [4.5.6] udev problems
Post by: roberts on July 30, 2012, 08:32:31 AM
did you try:
Code: [Select]
$ sudo udevadm control --reload-rules [shouldn't be required]
$ sudo udevadm trigger

..after copying the rules and loading udev-extra?

Perhaps such should be added to udev-extra's info file or even its startup script?
Title: Re: [4.5.6] udev problems
Post by: jls on July 30, 2012, 08:43:37 AM
coping the rules to /etc/udev/rules.d/ and then issuing
Code: [Select]
sudo udevadm trigger works!
Thanks so much juanito

Title: Re: [4.5.6] udev problems
Post by: jls on July 30, 2012, 09:15:22 AM
now I see my cdrom & usb stick on my desktop, but the mount command eeze is using includes also the destination (2nd mount parameter) so it needs to be executed by root.
That's the problem now
Title: Re: [4.5.6] udev problems
Post by: Juanito on July 30, 2012, 09:27:48 AM
you could try set uid root for the command in question?
Title: Re: [4.5.6] udev problems
Post by: jls on July 30, 2012, 09:28:48 AM
the command eeze uses is:
Code: [Select]
/usr/local/bin/mount -o noexec,nodev,nosuid,uid=1000, /dev/sr0 /media/sr0
I created a link from /mnt to media
If I try this command myself I get this error:
mount: only root can do that
Title: Re: [4.5.6] udev problems
Post by: curaga on July 30, 2012, 09:49:45 AM
That's how linux mounts work. Only root can do arbitrary mounts that aren't specified in fstab.

Run eeze as root.
Title: Re: [4.5.6] udev problems
Post by: curaga on July 30, 2012, 09:51:51 AM
Perhaps such should be added to udev-extra's info file or even its startup script?

I don't think it should, because this concerns adding custom rules, outside of the udev-extra extension.

Basically, custom rules will need that command regardless of whether the rule uses extra apps from the udev-extra extension.
Title: Re: [4.5.6] udev problems
Post by: Arslan S. on July 31, 2012, 02:04:50 AM
i have an update for udev see http://code.google.com/p/tc-ext-tools/source/detail?r=822 (http://code.google.com/p/tc-ext-tools/source/detail?r=822)
Title: Re: [4.5.6] udev problems
Post by: curaga on July 31, 2012, 03:46:37 AM
If you want to modify the base rules, please send me a patch. Note that just copying rules from a newer udev will not work, the base rules are modified in many places.
Title: Re: [4.5.6] udev problems
Post by: jls on July 31, 2012, 03:55:32 AM
if u look at this: http://code.google.com/p/tc-ext-tools/source/browse/packages/udev/common?r=822 (http://code.google.com/p/tc-ext-tools/source/browse/packages/udev/common?r=822) you'll see that arslan is using version 173 which is the same in base tc
Title: Re: [4.5.6] udev problems
Post by: Arslan S. on July 31, 2012, 05:11:39 AM
yea i know i checked them actually. the update doesn't overwrite all the rules. i believe most of them is compatible with base except those which set permissions and ownership, and run programs in /lib/udev from udev-extra
Title: Re: [4.5.6] udev problems
Post by: jls on August 04, 2012, 01:13:05 PM
using the udev-extra built with tc-ext-tools results that eeze works and also places (in e-modules-extra) work using udisks.
The problem is that places shows also the loop, is there a way to avoid displaying them?