Udev

From gr0x0rd
Jump to navigation Jump to search

Configuring hardware - migrating from hal to 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

Sync portage before getting started with emerging packages.

$ sudo emerge --sync

Next you will want to perform the following emerge.

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

While the emerge is being performed, we will need to made a few modifications to the kernel.

$ cd /usr/src/linux
$ sudo make menuconfig

Ensure the following settings are enabled or disabled:

-> General setup
 -> Auditing support 
   [*] Enable system-call auditing support

-> Power management and ACPI options
  [*] Run-time PM core functionality  

-> Device Drivers
  [ ] ATA/ATAPI/MFM/RLL support (DEPRECATED)
  -> USB support 
     -> Support for Host-side USB 
            [*]    USB runtime power management

When done, save your kernel config and build the new kernel.

$ sudo make && sudo make modules_install

While your new kernel is being built, you'll need to update your system with the new USE flags.

$ sudo emerge -avuDNt world

Once your new kernel is ready, copy it to your boot partition.

$ sudo cp /usr/src/linux/arch/x86/boot/bzImage /boot/kernel

After your world update has completed, re-emerge your video drivers and driver packages for xorg. Substitute nvidia-drivers with your video driver. If you are using virtualbox, you will also need to reinstall the virtualbox-modules package.

$ sudo emerge $(qlist -IC x11-drivers) nvidia-drivers virtualbox-moules