block 484366 by 493865
tag 484366 + patch
thanks
(Moving the discussion to #484366)
On Sat, Aug 09, 2008 at 06:19:09PM +0200, Frans Pop wrote:
> On Wednesday 06 August 2008, Jérémy Bobbio wrote:
> > Bad news is that we probably have to modify
> > /lib/debian-installer/init-udev-devices to create a file for every
> > misc. serial line device.
>
> I think someone should look into the option of starting udevd _before_ we
> run init (as also suggested by Marco in a recent discussion on IRC).
>
> A good time to do this would be after the first boot debug shell, but
> before the second one.
Attached is a patch the implements this. Details inside.
Attached is also a patch against udev that simple moves
/lib/debian-installer-startup.d/S02udev to
/lib/debian-installer/start-udev so the script can be called from the
init script.
I have tested that script on an amd64 build using KVM and also with the
same qemu setup described in #484366 and all worked fine.
Cheers,
--
Jérémy Bobbio .''`.
lunar@debian.org : :Ⓐ : # apt-get install anarchism
`. `'`
`-
diff -u udev-0.125/debian/udev-udeb.dirs udev-0.125/debian/udev-udeb.dirs --- udev-0.125/debian/udev-udeb.dirs +++ udev-0.125/debian/udev-udeb.dirs @@ -2,5 +2,5 @@ /etc/udev/ /etc/udev/rules.d/ -/lib/debian-installer-startup.d/ +/lib/debian-installer/ /lib/udev/ /sbin/ diff -u udev-0.125/debian/changelog udev-0.125/debian/changelog --- udev-0.125/debian/changelog +++ udev-0.125/debian/changelog @@ -1,3 +1,12 @@ +udev (0.125-6~~lunar1) UNRELEASED; urgency=low + + [ Jérémy Bobbio ] + * Move /lib/debian-installer-startup.d/S02udev to + /lib/debian-installer/start-udev in udev-udeb as udev will now be started + before busybox init in the debian-installer. + + -- Jérémy Bobbio <lunar@debian.org> Fri, 15 Aug 2008 20:44:35 +0200 + udev (0.125-5) unstable; urgency=medium * Modified debian/rules to work with the etch version of findutils. diff -u udev-0.125/debian/rules udev-0.125/debian/rules --- udev-0.125/debian/rules +++ udev-0.125/debian/rules @@ -126,7 +126,7 @@ $(DU)/lib/udev/hotplug.functions install --mode=644 hotplug/modprobe.d/* $(DU)/etc/modprobe.d/ install --mode=755 extra/udev.startup \ - $(DU)/lib/debian-installer-startup.d/S02udev + $(DU)/lib/debian-installer/start-udev mkdir -p $(DU)/usr/lib/base-installer.d/ install --mode=755 extra/udev.base-installer \ $(DU)/usr/lib/base-installer.d/05udev
commit 0b0adaa5365c498d50f3b5d2d288da81ab2adc92
Author: Jérémy Bobbio <lunar@debian.org>
Date: Fri Aug 15 14:28:44 2008 +0200
Start udev before running init
In order to solve the #484366, udev needs to be started before we start
busybox init as we don't want to create every /dev/ttyXXXX devices
manually.
udev-udeb (>= 1.125-6) moved the startup script from
/lib/debian-installer-startup.d/S02udev to
/lib/debian-installer/start-udev. The later is called directly in
the initial init script.
Starting udev requires /sys to be available, and we now mount it
as we do for /proc.
udev already needed be available in order to make the installer boot, so
rootskel now depends on udev-udeb. We can thus avoid testing for the
presence of udevd on the initrd.
As rootskel depends on udev-udeb, there is no further need to
explicitely udev-udeb to pkg-lists/base.
diff --git a/installer/build/pkg-lists/base b/installer/build/pkg-lists/base
index 3b93216..cd060d5 100644
--- a/installer/build/pkg-lists/base
+++ b/installer/build/pkg-lists/base
@@ -19,7 +19,5 @@ rescue-check
env-preseed
pciutils-udeb
-#include "udev"
-
# busybox modutils is gone
module-init-tools-udeb
diff --git a/installer/build/pkg-lists/udev b/installer/build/pkg-lists/udev
deleted file mode 100644
index f6f9800..0000000
--- a/installer/build/pkg-lists/udev
+++ /dev/null
@@ -1 +0,0 @@
-udev-udeb
diff --git a/installer/debian/changelog b/installer/debian/changelog
index 17c5abf..1bb362b 100644
--- a/installer/debian/changelog
+++ b/installer/debian/changelog
@@ -65,6 +65,8 @@ debian-installer (2008xxxx) UNRELEASED; urgency=low
[ Jérémy Bobbio ]
* Add cdebconf-gtk-terminal to graphical images.
+ * As udev-udeb is now a dependency of rootskel, remove its explicit
+ inclusion.
-- Frans Pop <fjp@debian.org> Tue, 15 Jul 2008 08:18:36 +0200
diff --git a/packages/rootskel/debian/changelog b/packages/rootskel/debian/changelog
index 7b2d0a1..5f75f83 100644
--- a/packages/rootskel/debian/changelog
+++ b/packages/rootskel/debian/changelog
@@ -1,8 +1,13 @@
rootskel (1.65) UNRELEASED; urgency=low
+ [ Colin Watson ]
* Add debian-installer/exit/poweroff to run poweroff rather than reboot or
halt at the end of the installation. Requested by Crispin Flowerday.
+ [ Jérémy Bobbio ]
+ * Start udev before running init. (Closes: #484366)
+ Depends: udev-udeb (>= 0.125-6)
+
-- Colin Watson <cjwatson@debian.org> Tue, 29 Jul 2008 17:24:58 +0100
rootskel (1.64) unstable; urgency=low
diff --git a/packages/rootskel/debian/control b/packages/rootskel/debian/control
index 3a347f6..f6cbc44 100644
--- a/packages/rootskel/debian/control
+++ b/packages/rootskel/debian/control
@@ -9,7 +9,7 @@ Vcs-Svn: svn://svn.debian.org/d-i/trunk/packages/rootskel
Package: rootskel
XC-Package-Type: udeb
Architecture: any
-Depends: di-utils (>= 1.43), ${misc:Depends}
+Depends: di-utils (>= 1.43), udev-udeb (>= 0.125-6), ${misc:Depends}
Description: Skeleton root filesystem used by debian-installer
Package: rootskel-bootfloppy
diff --git a/packages/rootskel/src/init b/packages/rootskel/src/init
index 3dc1a6e..0a05b25 100755
--- a/packages/rootskel/src/init
+++ b/packages/rootskel/src/init
@@ -5,13 +5,9 @@ export PATH
debugshell "just booted"
mount /proc
-if [ -x /sbin/udevd ]; then
- /lib/debian-installer/init-udev-devices
-else
- echo "udev is missing. Giving up!" >&2
- sleep 5000
- exit
-fi
+mount /sys
+/lib/debian-installer/start-udev
+
init='busybox init'
for i in $(cat /proc/cmdline); do
case $i in
diff --git a/packages/rootskel/src/lib/debian-installer-startup.d/S01mount b/packages/rootskel/src/lib/debian-installer-startup.d/S01mount
index 6428451..ebecf2f 100644
--- a/packages/rootskel/src/lib/debian-installer-startup.d/S01mount
+++ b/packages/rootskel/src/lib/debian-installer-startup.d/S01mount
@@ -1,11 +1,3 @@
-# Make sure proc and devfs are mounted when we continue.
-if [ ! -d /proc/self ] ; then
- mount -t proc proc /proc
-fi
-if grep -q '[[:space:]]sysfs' /proc/filesystems; then
- mount -t sysfs sysfs /sys
-fi
-
# Cleanup after the first init, which leaves the initrd mounted
# on /initrd (if we're not using initramfs)
umount /initrd/dev 2>/dev/null
diff --git a/packages/rootskel/src/lib/debian-installer/Makefile b/packages/rootskel/src/lib/debian-installer/Makefile
index 6624f32..d0af3a4 100644
--- a/packages/rootskel/src/lib/debian-installer/Makefile
+++ b/packages/rootskel/src/lib/debian-installer/Makefile
@@ -20,7 +20,6 @@ files = \
files_exec = \
exit \
exit-command \
- init-udev-devices \
menu
ifeq ($(DEB_HOST_ARCH_OS),linux)
diff --git a/packages/rootskel/src/lib/debian-installer/init-udev-devices b/packages/rootskel/src/lib/debian-installer/init-udev-devices
deleted file mode 100644
index 42b0881..0000000
--- a/packages/rootskel/src/lib/debian-installer/init-udev-devices
+++ /dev/null
@@ -1,18 +0,0 @@
-#! /bin/sh
-
-makedev () {
- [ -e "$2" ] || mknod -m "$1" "$2" "$3" "$4" "$5"
-}
-
-mount -t tmpfs tmpfs /dev
-
-# Create just enough devices to cope until udev starts.
-makedev 600 /dev/console c 5 1
-makedev 666 /dev/null c 1 3
-makedev 660 /dev/ram0 b 1 0
-for i in 0 1 2 3 4; do
- makedev 600 /dev/tty"$i" c 4 "$i"
-done
-for i in 0 1 2 3; do
- makedev 600 /dev/ttyS"$i" c 4 "$(($i + 64))"
-done
Attachment:
signature.asc
Description: Digital signature