[arch-projects] [RFC3][PATCH] [mkinitcpio] Cleanly stop udev >= 168 as recommended by upstream.
N0: device-mapper/LVM udev rules must be parsed for initramfs creation to add OPTIONS+="db_persist"
From udev NEWS: The running udev daemon can now cleanly shut down with: udevadm control --exit
Udev in initramfs should clean the state of the udev database with: udevadm info --cleanup-db which will remove all state left behind from events/rules in initramfs. If initramfs uses --cleanup-db and device-mapper/LVM, the rules in initramfs need to add OPTIONS+="db_persist" for all dm devices. This will prevent removal of the udev database for these devices. Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> --- init | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/init b/init index 7b81a1a..1173998 100644 --- a/init +++ b/init @@ -118,15 +118,10 @@ elif [ ! -x "/new_root${init}" ]; then launch_interactive_shell --exec fi -#Special handling if udev is running -udevpid=$(/bin/pidof udevd) -if [ -n "${udevpid}" ]; then - # Settle pending uevents, then kill udev - /sbin/udevadm settle - /bin/kill ${udevpid} > /dev/null 2>&1 - while /bin/pidof udevd >/dev/null; do - sleep 0.1 - done +# Stop udevd if is running +if [ "${udevd_running}" -eq 1 ]; then + /sbin/udevadm control --exit + /sbin/udevadm info --cleanup-db fi for d in proc sys dev run; do -- 1.7.5
Am 02.05.2011 16:00, schrieb Gerardo Exequiel Pozzi:
N0: device-mapper/LVM udev rules must be parsed for initramfs creation to add OPTIONS+="db_persist"
Patch looks good now. I am unsure and confused why we would need this db_persist option. In the past, we killed udev and the db completely and everything worked out fine. What kind of state would need to be persistent? Is upstream adding this option?
On 05/02/2011 11:23 AM, Thomas Bächler wrote:
N0: device-mapper/LVM udev rules must be parsed for initramfs creation to add OPTIONS+="db_persist" Patch looks good now. Great! I am unsure and confused why we would need this db_persist option. In
Am 02.05.2011 16:00, schrieb Gerardo Exequiel Pozzi: the past, we killed udev and the db completely and everything worked out fine. What kind of state would need to be persistent? Is upstream adding this option? Yes, that is what I not understand, If I am not wrong this was before devtmpfs times.
Maybe this is needed in case if rules on initramfs differs from real root. Dave can you ask to Kay on IRC about this? (I am going to my work now) Thanks. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
participants (2)
-
Gerardo Exequiel Pozzi
-
Thomas Bächler