Package: udev Version: 154-1 Severity: important Tags: patch
Hi, Just recently i switched to initramfs-tools, so the bug i'm reporting might be rather old. But i didnt find any references. As i understand the $udev_root option it helps keeping udev out of /dev. since /etc/init.d/udev and udevd itself respect this option, i conclude that it makes sense to fix the initramfs-tools part as well. Currently, changing $udev_root in udev.conf somewhat messes up the initrd made by update-initramfs: - udev resides (half way?) in $udev_root, while devices are looked for in /dev. depending on how the root device is adressed, this ends in a debug shell. - before chroot, $rootmnt/dev is messed up regeardless of the setting of $udev_root. this is unfortunate when a static /dev is in use The attached patch forces udev to live in /dev before chroot regardless of the $udev_root setting (init-top/udev). but then it is moved to where the user specified, to $rootmnt$udev_root (init-bottom/udev). i'd be happy if this could be merged. regards felix -- System Information: Debian Release: squeeze APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.32-4-686 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/bash Versions of packages udev depends on: ii debconf [debconf-2.0] 1.5.32 Debian configuration management sy ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib ii libselinux1 2.0.94-1 SELinux runtime shared libraries ii libusb-0.1-4 2:0.1.12-14 userspace USB programming library ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip ii util-linux 2.16.2-0 Miscellaneous system utilities Versions of packages udev recommends: ii pciutils 1:3.1.7-3 Linux PCI Utilities ii usbutils 0.87-1 Linux USB utilities udev suggests no packages. -- Configuration Files: /etc/udev/udev.conf changed: udev_log="err" tmpfs_size="10M" udev_root="/etc/udev/.dev" -- debconf information excluded
diff -rupN itramfs-tools.orig/scripts/init-bottom/udev initramfs-tools/scripts/init-bottom/udev --- initramfs-tools.orig/scripts/init-bottom/udev 2010-05-13 16:28:24.000000000 +0200 +++ initramfs-tools/scripts/init-bottom/udev 2010-05-14 01:09:38.000000000 +0200 @@ -21,10 +21,15 @@ for proc in /proc/[0-9]*; do fi done +udev_root="/dev" +if [ -e /etc/udev/udev.conf ]; then + . /etc/udev/udev.conf +fi + # move the /dev tmpfs to the rootfs -mount -n -o move /dev $rootmnt/dev +mount -n -o move /dev $rootmnt$udev_root # create a temporary symlink to the final /dev for other initramfs scripts nuke /dev -ln -s $rootmnt/dev /dev +ln -s $rootmnt/$udev_root /dev diff -rupN initramfs-tools.orig/scripts/init-top/udev initramfs-tools/scripts/init-top/udev --- initramfs-tools.orig/scripts/init-top/udev 2010-05-13 16:28:24.000000000 +0200 +++ initramfs-tools/scripts/init-top/udev 2010-05-14 01:06:01.000000000 +0200 @@ -13,7 +13,7 @@ esac echo > /sys/kernel/uevent_helper -udevd --daemon --resolve-names=never +UDEV_ROOT=/dev udevd --daemon --resolve-names=never mkdir -p /dev/.udev/queue/ udevadm trigger --action=add

