udev, hotplug and kernel changes

Scott James Remnant scott at canonical.com
Fri Dec 2 09:53:19 GMT 2005

As you've probably all noticed, we've been making major changes to the
way we perform hardware detection and activation in dapper this week.
The quick description of the work is that we've dropped the old
"hotplug" scripts in favour of using udev to do all the lifting.

A lot of this is made possible by new features in the 2.6.15 kernel
we've also upgraded to, in particular the $MODALIAS variable that
modprobe can match against the modules.alias file to load the right
module and the uevent sysfs attribute that allows us to perform
cold-plugging on boot.

The major changes you'll need to be aware of:

	* 2.6.15 is now our minimal required kernel version, before
	  submitting any reports please make sure you have this

	* Firmware has moved to /lib/firmware, place any firmware needed
	  for your devices directly into this directory.  Firmware
	  supplied with our linux-image and linux-restricted-module
	  packages is placed in /lib/firmware/$VERSION -- you shouldn't
	  place your own files in these sub-directories to avoid
	  conflict with kernel packages.

	* hotplug will be removed.  If you had made any custom changes
	  to the agent or rc scripts, these will need to be re-expressed
	  as udev rules[0].

	* The /etc/dev.d and /etc/hotplug.d directories are currently
	  ignored; this is to allow us to ensure we don't ship anything
	  in dapper that uses them.  You can bite the bullet now and
	  convert these to udev rules[0], or we'll re-enable these
	  directories for Beta so your existing custom rules will still

	* The /etc/hotplug/blacklist.d directory
	  and /etc/hotplug/blacklist files are also ignored.  You should
	  convert them to /etc/modprobe.d config files[1].  Again these
	  will be re-enabled before Beta.

There are a few known problems with the new world order, if you
experience any of these problems please contact me (I'm Keybuk on IRC)
and help debug the problem.  If you have a second machine to IRC from
while we fix your other, that would be handy.

	* Some IDE drivers aren't correctly picking up the disk, but
	  leaving it for the generic IDE driver to take.  The primary
	  symptom of this is that DMA is not enabled on the drive.  To
	  test whether this is affecting you, do:

		# hdparm -d /dev/hda
		This should output "using_dma = 1 (on)"

		If not, try:	
		# hdparm -d1 /dev/hda
		If this does not output the above, you could have the

		# readlink /sys/block/hda/device
		This should give you a path ending "ide0/0.0" (or
		similar), e.g:

		(if this is ../../devices/ide0 you probably have the
		 problem, but check below too)

		Then take the end off, and read the driver link there:
		# readlink /sys/devices/pci0000:00/0000:00:10.0/driver

		This should not give "generic"

	* Some SATA and SCSI controllers seem to intermittently fail to
	  detect the root filesytem; you'll know if this affects you
	  because you'll have an "unable to find root filesystem" PANIC
	  when you boot.

	* Some device nodes have the wrong names or permissions, or
	  there are missing symlinks.  Please advise of any you find.

And there are also the following expected problems, which are simply
caused by there only being one of me -- I'm currently fixing these, so
don't need reports.

	* /dev/pts and /dev/shm are not mounted.  You probably won't
	  care much about this, but you can mount them if you like.

	* Most network cards are not brought up on boot.  Simply run
	  "ifup" manually.

	* Network cards are not renamed according to /etc/iftab.

	* /etc/network/options settings not migrated.

	* ntpdate error on boot.

	* OSS sound card drivers are loaded as well as ALSA.

	* Some sound cards are not configured on boot.

	* PCMCIA error during boot (purely cosmetic).

	* Boot process still isn't as fast as it can be; it's not over
	  yet folks, there's more improvements to come.  This first
	  step was just the bit that would break things, so we wanted to
	  do it early.


[0] /etc/dev.d/$SUBSYSTEM/$FOO can be written as:
    after moving the script to /lib/udev.

    /etc/hotplug.d/$SUBSYSTEM/$FOO with a $FOO.usermap can be written:
	PROGRAM="/sbin/grepmap --udev --file=/etc/udev/$FOO.usermap" \
    after moving the usermap to /etc/udev and the script to /lib/udev.

[1] basically move them and add the word "blacklist" to the front of
    each line; see /etc/modprobe.d/blacklist for an example
Scott James Remnant
scott at canonical.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.ubuntu.com/archives/ubuntu-devel-announce/attachments/20051202/5127f662/attachment.pgp

More information about the ubuntu-devel-announce mailing list