Bug#581615: supplied initramfs-tools scripts dont work if $udev_root != /dev

2010-05-15 Thread Felix Salfelder
Hi Marco.

On Fri, May 14, 2010 at 01:19:53PM +0200, Marco d'Itri wrote:
 Changing $udev_root has never been properly tested or documented,
 considering the recent focus on devtmpfs I do not believe that it will
 continue to work for a long time no matter how many hacks I could add.

i respect Your expertise and Your efforts to keep udev running.
anyway what you claim here is plain wrong. let me explain:

- the testing of a non-default value for $udev_root has taken place.
  i can at least speak for myself, having changed this setting shortly
  after i encountered udev. as i wansn't involved in fixing the
  /etc/init.d/udev{,-mtab} scripts i conclude that theres somebody else
  caring about $udev_root.

- in fact $udev_root is documented. don't You ship the manpage?
  i confirm that it is working as described in this manpage.

- the move from /dev to $rootmnt$udev_root does hardly change when
  switching from tmpfs to devtmpfs. this will continue to work whatever
  filesystem will be used for udev in furure releases.

- You mistook my work as a 'hack'. this is the cleanest possible way to
  get the initramfs-tool make its job and leave behind a system as the
  user wishes -- just like yaird does (did with kernels = 2.6.30)
  to fix this later on (after chroot) would be a serious hack.

- udev_root does not occur in init-top/udev or init-bottom/udev scripts.
  so obviously this is not about how many hacks are involved here.

could You explain why You are opposed to allow the user to choose for
himself? If there's already a discussion on this, please redirect me.

Your strategy about removing every trace of $udev_root doesnt sound
amusing.
I'd really hope You take some time and rethink this point.

regards
felix



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#581615: supplied initramfs-tools scripts dont work if $udev_root != /dev

2010-05-14 Thread Felix Salfelder
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  libc62.10.2-6Embedded GNU C Library: Shared lib
ii  libselinux1  2.0.94-1SELinux runtime shared libraries
ii  libusb-0.1-4 2:0.1.12-14 userspace USB programming library
ii  lsb-base 3.2-23.1Linux Standard Base 3.2 init scrip
ii  util-linux   2.16.2-0Miscellaneous 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.0 +0200
+++ initramfs-tools/scripts/init-bottom/udev	2010-05-14 01:09:38.0 +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.0 +0200
+++ initramfs-tools/scripts/init-top/udev	2010-05-14 01:06:01.0 +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


Bug#581615: supplied initramfs-tools scripts dont work if $udev_root != /dev

2010-05-14 Thread Marco d'Itri
retitle 581615 remove every trace of $udev_root
thanks

On May 14, Felix Salfelder salfel...@em.cs.uni-frankfurt.de wrote:

 As i understand the $udev_root option it helps keeping udev out of /dev.
Changing $udev_root has never been properly tested or documented,
considering the recent focus on devtmpfs I do not believe that it will
continue to work for a long time no matter how many hacks I could add.

-- 
ciao,
Marco


signature.asc
Description: Digital signature