[Pkg-uml-commit] r191 - in trunk/src/rootstrap: . modules

Mattia Dongili malattia at costa.debian.org
Sat Sep 2 15:17:26 UTC 2006


Author: malattia
Date: 2006-09-02 15:17:26 +0000 (Sat, 02 Sep 2006)
New Revision: 191

Modified:
   trunk/src/rootstrap/modules/base-config
   trunk/src/rootstrap/modules/uml
   trunk/src/rootstrap/rootstrap.sgml
Log:
Unbreak base-config:
- create more device nodes in order to make /usr/bin/script happy
- mount /proc before running base-config, some packages need it, 
  it was broken by the debian script umounting it
- divert start-stop-daemon to avoid leaving running processes behind
- better documentation for modules ordering


Modified: trunk/src/rootstrap/modules/base-config
===================================================================
--- trunk/src/rootstrap/modules/base-config	2006-08-31 21:35:43 UTC (rev 190)
+++ trunk/src/rootstrap/modules/base-config	2006-09-02 15:17:26 UTC (rev 191)
@@ -1,5 +1,22 @@
 #!/bin/sh -e
 
+divert() {
+  prog="$1"
+  mv $prog $prog.real
+  cat > $prog <<EOF
+#!/bin/sh
+
+echo "Fake $prog called, doing nothing"
+EOF
+  chmod 755 $prog
+}
+
+undivert() {
+  prog="$1"
+  mv $prog.real $prog
+}
+
+
 DEBIAN_FRONTEND=noninteractive
 export DEBIAN_FRONTEND
 
@@ -30,13 +47,17 @@
 # The module name is misleading 
 if [ -x "$TARGET/usr/sbin/base-config" ] ; then
 
-	chroot $TARGET debconf-set-selections <<"EOF"
+	chroot $TARGET debconf-set-selections <<EOF
 passwd passwd/make-user boolean false
 base-config apt-setup/uri_type text edit sources list by hand
 base-config base-config/menu/pkgsel select nothing - you may manually run apt-get or any of the above later
 EOF
 
+	chroot $TARGET mount -t proc proc /proc
+	divert $TARGET/sbin/start-stop-daemon
 	chroot $TARGET base-config
+	chroot $TARGET umount /proc
+	undivert $TARGET/sbin/start-stop-daemon
 else
 	echo "'base-config' not found, skipping."
 fi

Modified: trunk/src/rootstrap/modules/uml
===================================================================
--- trunk/src/rootstrap/modules/uml	2006-08-31 21:35:43 UTC (rev 190)
+++ trunk/src/rootstrap/modules/uml	2006-09-02 15:17:26 UTC (rev 191)
@@ -5,7 +5,7 @@
 for i in 1 2 3 4 5 6 7 8; do
 	NEW_TTY="$NEW_TTY tty$i"
 done
-chroot $TARGET /bin/sh -c "cd /dev && ./MAKEDEV ubd std $NEW_TTY"
+chroot $TARGET /bin/sh -c "cd /dev && ./MAKEDEV ubd std pty $NEW_TTY"
 chroot $TARGET umount /proc
 
 # generate a new fstab

Modified: trunk/src/rootstrap/rootstrap.sgml
===================================================================
--- trunk/src/rootstrap/rootstrap.sgml	2006-08-31 21:35:43 UTC (rev 190)
+++ trunk/src/rootstrap/rootstrap.sgml	2006-09-02 15:17:26 UTC (rev 191)
@@ -165,9 +165,15 @@
 	  <para>mount target filesystem in the guest Linux</para>
 	</listitem>
         <listitem>
-	  <para>OS installation and tweaking</para>
+	  <para>OS installation</para>
 	</listitem>
         <listitem>
+	  <para>UML basic setup (device nodes, kernel modules, etc.)</para>
+	</listitem>
+        <listitem>
+	  <para>Tweaking (here you should have a fully working OS to play with)</para>
+	</listitem>
+        <listitem>
 	  <para>unmount the target filesystem</para>
 	</listitem>
       </orderedlist>
@@ -639,6 +645,11 @@
       </para>
 
       <para>
+	Be careful about modules ordering (see CONFIGURATION above), you'll 
+	mostly want to plug into the tweaking step to perform custom configurations.
+      </para>
+
+      <para>
         To debug modules enable the <parameter>debug</parameter> global 
 	parameter, see its description fro more hints.
       </para>




More information about the Pkg-uml-commit mailing list