References are threads starting at:
http://www.linuxfromscratch.org/pipermail/lfs-dev/2011-August/064960.html
http://linuxfromscratch.org/pipermail/lfs-dev/2011-September/065130.html

We are in a Catch-22 situation with udev_retry.  Here's a rundown:

We need to start udev (S10udev) before mounting filesystems (S40mountfs) 
so that the device entries are available in order to mount partitions.

udev will create some devices and may run some programs before all file 
systems are mounted (setclock) that need directories that are 
potentially not mounted (/usr, /var).

The same issues come up for BLFS in alsa.

Currently we are addressing these types of problems with the command:

   /sbin/udevadm trigger --type=failed --action=add

in udev_retry.  The problem is that '--type=failed' has been deprecated 
upstream and we need to plan for that.  We also get a nasty warning 
message on every boot about the deprecation.

In the infrequent case of a changed network card, we also need to be 
able to copy udev generated files from the tmpfs /run directory to /etc 
after / is remounted r/w, but that can be moved to the mountfs script 
from the udev_retry script.

There are options about what to do right now:

1.  Leave in the warning message and optionally write something about it 
in the book.

2.  Add 2>/dev/null to the udevadm command above.

3.  Modify the source to remove the warning (delete 1 line).

When the --type=failed option is removed, we need to consider some other 
options:

1.  Delete the affected udev rules that run the problem commands (in 
udev/rules.d/55-lfs.rules) and run them explicitly when we want them to 
run.  This could create a potential, but unlikely, race condition.

2.  Declare that separate /usr and /var partitions are not supported. 
They could be supported with an initrd that mounts the partitions before 
the kernel starts, but that would need to be in a hint like the one 
Bryan wrote in 2005.

3.  Declare that we do not support hwclock settings that are not GMT.

4.  Reinsert the deleted retry code into udev with a patch.

5.  Since (I think) udev commands are run asynchronously, change the 
affected scripts (e.g. setclock) to wait in a loop for the appropriate 
partitions to be mounted.  For example:

   for i in {1..10}; do
     if [ -d /usr/share ] && [ -d /var/lib ]; then break; fi
     sleep 1
   done

   if [ $i -eq 10 ]; then error(); fi
   ...

6.  ???

I'd like to see some more discussion about this.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to