Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Got udev working, now what?!
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, ... 28, 29, 30  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Wed Dec 17, 2003 11:19 am    Post subject: Reply with quote

Not quite sure if you just here to make a snide remark or what.

Face it devfs is leaving, that means going gone. This is also an
experiment to see how far udev is developed and what it takes
to use it and try to learn from that.
Anyone running the 2.6 kernel and udev, is testing, trying to learn.
If you read the kernel notes in 2.6, devfs has been stripped down and
is rudimentary. Udev is replacing it. So what purpose will it serve to put it
in the kernel? Never mind.
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
dreambox
Tux's lil' helper
Tux's lil' helper


Joined: 09 Mar 2003
Posts: 137

PostPosted: Wed Dec 17, 2003 2:13 pm    Post subject: Reply with quote

I solved my problem :lol:

https://forums.gentoo.org/viewtopic.php?t=115626

cheers
_________________
Toshiba Tecra 8200
PIII 750Mhz 512Mb 20Gb Hdd
Trident CyberBladeXP 16Mb

Windows Where do you want to go today? MacOS Where do you want to be tomorrow? Linux Are you coming...
Back to top
View user's profile Send private message
charlieg
Advocate
Advocate


Joined: 30 Jul 2002
Posts: 2149
Location: Manchester UK

PostPosted: Thu Dec 18, 2003 1:11 am    Post subject: Reply with quote

One of you should probably put this together as a 'udev HOWTO' in docs/tips/tricks.
_________________
Want Free games?
Free Gamer - open source games list & commentary

Open source web-enabled rich UI platform: Vexi
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Thu Dec 18, 2003 1:38 am    Post subject: Reply with quote

Started one on my webpage: UDEV Primer for 2.6 Kernel.

Also posted it and this thread to Documentation, Tips & Tricks for UDEV

8)
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
funkmankey
Guru
Guru


Joined: 06 Mar 2003
Posts: 304
Location: CH

PostPosted: Thu Dec 18, 2003 3:43 am    Post subject: Reply with quote

ah, thanks for that Decibels. udev working fine now (well, on my little magnia switchie-box anyway, will do my desktop later...)

the one thing that kept it from working for me previously? hadn't installed the masked baselayout. I think I (temporarily) gave up on udev on the 14th, then you guys mentioned 'bout baselayout on the 15th. guh!
_________________
I've got the brain, I'm insane, you can't stop the power
Back to top
View user's profile Send private message
derk
Guru
Guru


Joined: 10 Mar 2003
Posts: 347
Location: St Thomas Ontario

PostPosted: Sat Dec 20, 2003 10:57 am    Post subject: Reply with quote

a couple of bugs filed for simple fixes to make hpoj 36139 and apcupsd 36162 (USB type) work for those interested.

Also CDROM's are accessible by the /dev/hdX call if using ide-cd or by the /dev/scd[0-9] if using ide-scsi (on it's way out but currently still used for DVD burning by some apps)

FYI I've got 3 machines running 2.6.0 or 2.6.0-test11 different versions all using udev and devfs removed from the kernels. Two machines have nvidia cards .. one with a win4lin patched kernel all of it works. The only real trouble was the two items above and finding where the device nodes for the cdrw/dvd/dvdrw were hiding.

even my usb-storage card just works .. better than under 2.4.



Derk
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2527
Location: Denmark

PostPosted: Sat Dec 20, 2003 11:13 pm    Post subject: Reply with quote

ok ive replaced devfs with udev and everything gets mounted on boot, no errors.

however, i get this:

aterm: can't open pseudo-tty

and when i try to play music on xmms i get :

alsa: permission denied

I've already tried to set the permissions to 755 insted of the 600 you wrote in the script that makes the devices.. but still no go.

anyone have some tips ?
_________________
linux: #232767
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2527
Location: Denmark

PostPosted: Sat Dec 20, 2003 11:27 pm    Post subject: Reply with quote

and just on a side note :
Code:

none /dev/pts devpts defaults 0 0

isnt needed.
actually that was the error fstab was complaing about.
since ive removed that line from fstab and rebooted, no more errors and /dev/pts gets mounted anyway.

so i recomend that you edit your guide, so it doesnt confuse anyone else :)


http://perworm.dk/fluxmod/images/log.png

http://perworm.dk/fluxmod/images/dev.png

http://perworm.dk/fluxmod/images/sound.png
_________________
linux: #232767
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Sun Dec 21, 2003 12:39 am    Post subject: Reply with quote

Which kernel are you running? Right now I have devpts mounted and don't see any of the errors you mention. There have been several others that also couldn't start at terminal. Is yours compiled in the kernel, I assume so.

I still think this might have to do with udev not being enabled during your bootup, you are using devfs by looking at your boot log.

Well, will compile the stable 2.6 kernel tonight and see if just needs enabled, but not mounted. Right now with test11, I have both and works like a charm. I will test it out though and if so, change the tutorial. That is why I like responses so can modify things when they do. :)


Later:
Under menuconfig for the stable 2.6:
Quote:
CONFIG_DEVFS_FS: Note that devfs no longer manages /dev/pts! If you are using UNIX98 ptys, you will also need to enable (and mount) the /dev/pts filesystem (CONFIG_DEVPTS_FS).
Note that devfs has been obsoleted by udev, <http://www.kernel.org/pub/linux/utils/kernel/hotplug/>. It has been stripped down to a bare minimum and is only provided for legacy installations that use its naming scheme which is unfortunately different from the names normal Linux installations use.


It would seem to be saying here that 'you' need to mount /dev/pts, but the script seems to be doing it for you, so if have in fstab also will probably get an error. That is if you have devfs mounted which you do.

Quote:
CONFIG_DEVPTS_FS: You should say Y here if you said Y to "Unix98 PTY support" above. You'll then get a virtual file system which can be mounted on /dev/pts with "mount -t devpts". This, together with the pseudo terminal master multiplexer /dev/ptmx, is used for pseudo terminal support as described in The Open Group's Unix98 standard: in order to acquire a pseudo terminal, a process opens /dev/ptmx; the number of the pseudo terminal is then made available to the process and the
pseudo terminal slave can be accessed as /dev/pts/<number>. What was /dev/ttyp2 will then be /dev/pts/2, for example.


/sbin/rc
Code:
   # From linux-2.5.68 we need to mount /dev/pts again ...
   if [ "$(get_KV)" -ge "$(KV_to_int '2.5.68')" ]
   then
      have_devpts="$(awk '($2 == "devpts") { print "yes"; exit 0 }' /proc/filesystems)"
      mymounts="$(awk '($3 == "devfs") { print "yes"; exit 0 }' /proc/mounts)"

      if [ "${have_devpts}" = "yes" ]
      then
         # Only try to create /dev/pts if we have /dev mounted as devfs,
         # else it might fail as / might be still mounted readonly.
         if [ ! -d /dev/pts -a -e "/dev/.devfsd" -a "${mymounts}" = "yes" ]
         then
            # Make sure we have /dev/pts
            mkdir -p /dev/pts &>/dev/null || \
               ewarn "Could not create /dev/pts!"

         fi

         if [ -d /dev/pts ]
         then
            ebegin "Mounting devpts at /dev/pts"
            try mount -n -t devpts none /dev/pts
            eend $?
         fi
      fi
   fi


Maybe that was your problem. You are mounting devfs, then you also had devpts it in your fstab. So was trying to mount it twice, thus producing your error. That is what I get from the script in /sbin/rc .
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2527
Location: Denmark

PostPosted: Sun Dec 21, 2003 1:42 am    Post subject: Reply with quote

Hi again.
Ive tried with disabling devfs and pty98 and mount /dev/pts but stil cant open any terminal on the desktop ( cant open tty ( null ))

This udev looks like its still very rought, and not suitable enought.
Atm, ive just enabled devfs again and compiled the pty98 so i can use the computer.
I guess I will wait until this gets more stable and usable...
:roll:

But thanks for the replies, and the help, you have done well.
_________________
linux: #232767
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Sun Dec 21, 2003 1:53 am    Post subject: Reply with quote

Quote:
Ive tried with disabling devfs and pty98 and mount /dev/pts

You don't need to disable CONFIG_UNIX98_PTYS, I have that enabled and
CONFIG_DEVPTS_FS enabled. Then added the mount point in fstab.
But I do have CONFIG_DEVFS_FS disabled.

Have you 'rc-update add hotplug boot' ? Updated the baselayout to latest one? Then 'etc-update' and put the new scripts in place.

Then you should see:
Code:
'mounting sysfs at /sys'
'mounting ramfs at /dev'
'configuring system to use udev'
'using /sbin/hotplug for udev management'

during boot.

I don't have any stability problems. Problem with alsa and nvidia devices not being in the tarball for the mounted /dev and having to create them. Problems trying to figure where the permissions are being set, cause it doesn't appear that udev.permissions is doing it. But everything is still running and stable.
Also make sure your in the 'tty' group. I was troubleshooting a few weeks ago and took myself out. Then forgot. Had problem with terminals also till remember that.
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2527
Location: Denmark

PostPosted: Sun Dec 21, 2003 4:58 am    Post subject: Reply with quote

Well iam going to try again ..
I have hotplug running yes and the new baselayout too and, I guess when you say " put the new scripts in place" you mean run etc-update and update the files ....

I will try and post here how it goes...
Thanks.
_________________
linux: #232767
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Sun Dec 21, 2003 5:06 am    Post subject: Reply with quote

ikaro wrote:
I guess when you say " put the new scripts in place" you mean run etc-update and update the files ....
Thanks.


Yes, that's what I mean. If the new baselayout scripts like /etc/init.d/halt.sh and /sbin/rc are not in place, then udev will not work. You will see stuff change in /sys,.... but the system won't really use any of that info and it won't mount /lib/udev-state/devices.tar.bz2 on /dev , it won't use hotplug to manage the udev,....
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
ikaro
Advocate
Advocate


Joined: 14 Jul 2003
Posts: 2527
Location: Denmark

PostPosted: Sun Dec 21, 2003 5:13 am    Post subject: Reply with quote

HI.
This time went better, i can again use terminals on the desktop.

see login snapshot: http://ikaro.homepage.dk/login.png

However i still have that "permission denied on the Alsa"

Code:

snd_mixer_attach: Permission denied

error opening alsa device: Permission denied



Later:

Code:

[root@Genbox:dev]$la snd
total 0
drwx------    2 root     root            0 Dec 20 23:42 .
drwxr-xr-x   10 root     root            0 Dec 21 06:01 ..
crw-------    1 ikaro    audio    116,   0 Dec 20 23:42 controlC0
crw-------    1 ikaro    audio    116,   4 Dec 20 23:42 hwC0D0
crw-------    1 ikaro    audio    116,   5 Dec 20 23:42 hwC0D1
crw-------    1 ikaro    audio    116,   6 Dec 20 23:42 hwC0D2
crw-------    1 ikaro    audio    116,   7 Dec 20 23:42 hwC0D3
crw-------    1 ikaro    audio    116,   8 Dec 20 23:42 midiC0D0
crw-------    1 ikaro    audio    116,   9 Dec 20 23:42 midiC0D1
crw-------    1 ikaro    audio    116,  10 Dec 20 23:42 midiC0D2
crw-------    1 ikaro    audio    116,  11 Dec 20 23:42 midiC0D3
...

thats inside /dev/snd
iam in the audio group ( off course ) .. but permission denied .....
iam looking in the wrong place ??

even later:

Fixed!!

Yes indeed the devices had the right permissions, but the directory /dev/snd didn't.
So i just chmoded it 755 and now its ok :)

Thx for the nice guide and one more thing.
I didnt need to mount /dev/pts in fstab .

it gets mounted automatically ( see the snapshot )

:)
_________________
linux: #232767
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Sun Dec 21, 2003 2:36 pm    Post subject: Reply with quote

ikaro wrote:
I didnt need to mount /dev/pts in fstab .
it gets mounted automatically ( see the snapshot )
:)


Thanks ikaro, I never seen a warning,.. or anything about the entry being in fstab, but if it isn't need, let's get it out of there. I confirm on my system that you don't need it also. Have corrected the guide to show that, but left the option in there if someone feels it is still a problem in their particular case. Plus, never know if the script mounting it will change and you have to start including the devpts in fstab again.

On the /dev/snd folder. Strange. All I did in the script was mkdir and mine is:
drwxr-xr-x 2 root root 0 Dec 16 21:58 snd
and mine was already 755, so don't know why yours did that. If a lot of people are having to chmod on /dev/snd I can change the script, so it doesn't catch others unaware. But worked on mine off the bat. Glad you got it working.
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
Mystilleef
Guru
Guru


Joined: 27 Apr 2003
Posts: 561
Location: Earth

PostPosted: Sun Dec 21, 2003 3:30 pm    Post subject: Reply with quote

Ah, remind me again why I love gentoo and these forums?
_________________
simple, sleek and sexy text editor for gnome

"My logic is undeniable."
Back to top
View user's profile Send private message
takev
n00b
n00b


Joined: 20 Dec 2003
Posts: 11
Location: Amsterdam

PostPosted: Sun Dec 21, 2003 5:13 pm    Post subject: Reply with quote

Ok, I have udev installed,
but it does not actually work, and from the post I have seen so far, it hasn't worked for anyone.

If I look at the /sbin/rc it just installes all the devices from /lib/udev-state/devices.tar.bz2, which has pretty much every device in there.

udev should be able to make the devices himself, actualy there is an atemt made in /sbin/rc, where it calls udev for all block and tty devices.

Now I changed /etc/udev/udev.conf and set udev_root="/udev/" and created the directory /udev. And I rebooted, and no devices where created in /udev.
I tried running udev by hand, like this:
DEVPATH="/hda" /sbin/udev block
But not devices where created.
I also tried adding and removing the mouse, and no devices where created.

I've found that /sbin/hotplug is actually called and it runs scripts from /sbin/hotplug.d, it is just that udev doesn't seem to do anything.

Anyone have a simular experiance?
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Sun Dec 21, 2003 5:29 pm    Post subject: Reply with quote

correct, afaics udev doesnt actually do anything so far, unless its a config problem...
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
takev
n00b
n00b


Joined: 20 Dec 2003
Posts: 11
Location: Amsterdam

PostPosted: Sun Dec 21, 2003 6:02 pm    Post subject: Reply with quote

I compiled udev with debuging on.

I changed /sbin/rc to mount ramfs on /udev, as root is still mounted read only.
And the populate_udev function in /sbin/rc does work correctly when I execute it by hand.

However during boot it doen't do anything.

Also I changed the udev.conf to use the udev.rules.devfs, but that didn't work either.

udev doesn't handle most devices anyway I've seen. I guess we have to wait an other year until udev does the same thing as devfs did.
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Sun Dec 21, 2003 8:01 pm    Post subject: Reply with quote

I think they are taking it in steps. Your right I haven't seen anything in the /etc/udev/files work yet. That is partly why the subject of this post "Got udev working, now what?!" Guess it should have been "Got udev installed, now what?!" Before the new baselayout, you would see stuff in /sys changing, but system didn't do anything with the information. Now it still don't really, but with the new /sbin/rc and /etc/init.d/halt.sh it at least uses the /lib/udev-state/devices.tar.bz2 file to populate/save /dev. Not that it is really doing anything though, except mounting it.

If anyone finds a new baselayout or anything in portage 'masked' that will start creating the devices dynamically, starts using the /etc/udev/files,.. let us know, so we can play with it.
:!:

Another nice thing will be when Alsa, Nvidia drivers,... are able to start creating the devices in /dev mounted in ramfs, so I can do away with the script in the tutorial.
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
takev
n00b
n00b


Joined: 20 Dec 2003
Posts: 11
Location: Amsterdam

PostPosted: Sun Dec 21, 2003 9:52 pm    Post subject: Reply with quote

What I find interesting is that block devices should have been created at boottime with the /sbin/rc script.

There is a function called populate_udev(),
which is called inside the /sbin/rc scripts. And I checked it is indeed called.

However it looks like /sbin/udev doesn't work yet, so early in the boot processes. You would almost say that it needs something else.

I'm trying to find out what, as syslog doesn't work yet this early in the boot processes I can't see what is wrong. I'll try and let it write to stderr.
Back to top
View user's profile Send private message
dreambox
Tux's lil' helper
Tux's lil' helper


Joined: 09 Mar 2003
Posts: 137

PostPosted: Sun Dec 21, 2003 10:13 pm    Post subject: Reply with quote

I have devpts mounted, but cannot have gnome-terminal when running gnome as normal user, with root it works fine. Should I add something to /etc/udev/udev.permissions to solve it?

Thanks for any help
_________________
Toshiba Tecra 8200
PIII 750Mhz 512Mb 20Gb Hdd
Trident CyberBladeXP 16Mb

Windows Where do you want to go today? MacOS Where do you want to be tomorrow? Linux Are you coming...
Back to top
View user's profile Send private message
at_chaos
Tux's lil' helper
Tux's lil' helper


Joined: 09 Nov 2003
Posts: 149
Location: EU|Austria

PostPosted: Sun Dec 21, 2003 10:59 pm    Post subject: Reply with quote

dreambox wrote:
I have devpts mounted, but cannot have gnome-terminal when running gnome as normal user, with root it works fine. Should I add something to /etc/udev/udev.permissions to solve it?

Thanks for any help


hi dreambox,

I had the same problem and it was solved when I added my user account beside users, audio, wheel to the tty group

later: maybe this thread will help you https://forums.gentoo.org/viewtopic.php?t=116783
Back to top
View user's profile Send private message
takev
n00b
n00b


Joined: 20 Dec 2003
Posts: 11
Location: Amsterdam

PostPosted: Sun Dec 21, 2003 11:04 pm    Post subject: Reply with quote

OK, that really worked.

so to recap:
I created /udev, so that I leave /dev alone, which is normaly populated from the /lib/udev-state/devices.tar.bz2

I added "try mount -n -t ramfs none /udev" to /sbin/rc so that we have a read-write filesystem on /udev at a early boot-stage

I changed udev_root="/udev/" and udev_db="/udev/.udev.tdb" in /etc/udev/udev.conf.
The /udev/.udev.tdb is there so it can write the database on a read-write filesystem.

Now when you reboot /udev will actually be sparsely populated with block devices and ttys. And only the block devices you actually have connected.

I also hotplugged my USB digital camera and the block device appeared in /udev.

Yeaa, Yippie, merry christmas and things.

now, the whole /lib/udev-state/devices.tar.bz2 should not be needed when udev is completely finished, as it defeats the whole purpose of udev. Now with udev in /udev we can better see progress with udev, with more and more devices apearing there, should be really interesting.

[/code]
Back to top
View user's profile Send private message
Decibels
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1623
Location: U.S.A.

PostPosted: Sun Dec 21, 2003 11:34 pm    Post subject: Reply with quote

takev wrote:
I added "try mount -n -t ramfs none /udev" to /sbin/rc so that we have a read-write filesystem on /udev at a early boot-stage


Added or replaced?
_________________
Support bacteria – they’re the only culture some people have.”

– Steven Wright
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2, 3, ... 28, 29, 30  Next
Page 2 of 30

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum