Difference between revisions of "Udev"

From gr0x0rd
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Configuring hardware - migrating from hal to udev ==
+
== Configuring hardware - udev ==
  
 
After trying on a few occasions to do this myself, I was forced to finally commit with the release of xfce 4.8. The steps here are based on the instructions outlined by ssuominen on the gentoo forums and with contributions from others in the gentoo community. First, make the necessary modifications to your ''/etc/make.conf''.
 
After trying on a few occasions to do this myself, I was forced to finally commit with the release of xfce 4.8. The steps here are based on the instructions outlined by ssuominen on the gentoo forums and with contributions from others in the gentoo community. First, make the necessary modifications to your ''/etc/make.conf''.
Line 13: Line 13:
 
  '''$''' sudo nano -w /etc/portage/package.mask
 
  '''$''' sudo nano -w /etc/portage/package.mask
 
Add the line  
 
Add the line  
   
+
  sys-apps/hal
Sync portage before getting started with emerging packages.
 
'''$''' sudo emerge --sync
 
 
Next you will want to perform the following emerge.
 
Next you will want to perform the following emerge.
  '''$''' sudo emerge -av gnome-base/gvfs sys-fs/udisks sys-power/upower sys-auth/polkit
+
  '''$''' sudo emerge -av gnome-base/gvfs sys-fs/udisks sys-power/upower sys-auth/polkit polkit-gnome
While the emerge is being performed, we will need to made a few modifications to the kernel.
+
Next, start the daemons needed to complete the migration and add them to startup.
  '''$''' cd /usr/src/linux
+
  '''$''' sudo rc-update add dbus default
  '''$''' sudo make menuconfig
+
'''$''' sudo rc-update add consolekit default
Ensure the following settings are enabled or disabled:
+
'''$''' sudo /etc/init.d/consolekit start
-> General setup
+
This should be sufficient for now.
  -> Auditing support
+
 
    [*] Enable system-call auditing support
+
=== Troubleshooting ===
+
 
-> Power management and ACPI options
+
If later on your devices aren't mounting properly, issue the command
  [*] Run-time PM core functionality 
+
  '''$''' ck-list-sessions
+
If you have configured your kernel correctly, you should see something like this:
-> Device Drivers
+
<pre>
  [ ] ATA/ATAPI/MFM/RLL support (DEPRECATED)
+
Session2:
  -> USB support
+
unix-user = '1000'
      -> Support for Host-side USB
+
realname = '(null)'
            [*]    USB runtime power management
+
seat = 'Seat1'
When done, save your kernel config and build the new kernel.
+
session-type = ''
'''$''' sudo make && sudo make modules_install
+
active = TRUE
While your new kernel is being built, you'll need to update your system with the new USE flags.
+
x11-display = ':0.0'
 +
x11-display-device = '/dev/tty7'
 +
display-device = ''
 +
remote-host-name = ''
 +
is-local = TRUE
 +
on-since = '2011-03-14T05:50:56.403353Z'
 +
login-session-id = '1'
 +
Session1:
 +
unix-user = '1000'
 +
realname = '(null)'
 +
seat = 'Seat2'
 +
session-type = ''
 +
active = FALSE
 +
x11-display = ':0.0'
 +
x11-display-device = ''
 +
display-device = ''
 +
remote-host-name = ''
 +
is-local = TRUE
 +
on-since = '2011-03-14T05:50:56.177323Z'
 +
login-session-id = '1'
 +
</pre>
 +
If you see something similar to the above, you're in business. The key item is the '''active''' line.

Latest revision as of 08:47, 10 May 2011

Configuring hardware - udev

After trying on a few occasions to do this myself, I was forced to finally commit with the release of xfce 4.8. The steps here are based on the instructions outlined by ssuominen on the gentoo forums and with contributions from others in the gentoo community. First, make the necessary modifications to your /etc/make.conf.

$ sudo nano -w /etc/make.conf

Ensure the following USE flags are set:

USE="-hal consolekit dbus pam policykit udev" 

Next we will make some modifications to /etc/portage/package.use .

$ sudo nano -w /etc/portage/package.use

Ensure the following directives are set. You may also want to ensure the hal USE flag is removed if you've added it to any package in the file.

gnome-base/gvfs gdu
sys-block/parted device-mapper 

Next we will mask hal so it doesn't get pulled in by other packages.

$ sudo nano -w /etc/portage/package.mask

Add the line

sys-apps/hal

Next you will want to perform the following emerge.

$ sudo emerge -av gnome-base/gvfs sys-fs/udisks sys-power/upower sys-auth/polkit polkit-gnome 

Next, start the daemons needed to complete the migration and add them to startup.

$ sudo rc-update add dbus default
$ sudo rc-update add consolekit default
$ sudo /etc/init.d/consolekit start 

This should be sufficient for now.

Troubleshooting

If later on your devices aren't mounting properly, issue the command

$ ck-list-sessions

If you have configured your kernel correctly, you should see something like this:

Session2:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat1'
	session-type = ''
	active = TRUE
	x11-display = ':0.0'
	x11-display-device = '/dev/tty7'
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2011-03-14T05:50:56.403353Z'
	login-session-id = '1'
Session1:
	unix-user = '1000'
	realname = '(null)'
	seat = 'Seat2'
	session-type = ''
	active = FALSE
	x11-display = ':0.0'
	x11-display-device = ''
	display-device = ''
	remote-host-name = ''
	is-local = TRUE
	on-since = '2011-03-14T05:50:56.177323Z'
	login-session-id = '1'

If you see something similar to the above, you're in business. The key item is the active line.