[Pkg-uml-commit] r80 - trunk/src/rootstrap/modules

Stefano Melchior stex-guest at costa.debian.org
Sun May 21 20:49:14 UTC 2006


Author: stex-guest
Date: 2006-05-21 20:49:14 +0000 (Sun, 21 May 2006)
New Revision: 80

Modified:
   trunk/src/rootstrap/modules/debian
   trunk/src/rootstrap/modules/mkfs
   trunk/src/rootstrap/modules/mount
   trunk/src/rootstrap/modules/uml
Log:


Modified: trunk/src/rootstrap/modules/debian
===================================================================
--- trunk/src/rootstrap/modules/debian	2006-05-21 17:58:18 UTC (rev 79)
+++ trunk/src/rootstrap/modules/debian	2006-05-21 20:49:14 UTC (rev 80)
@@ -33,7 +33,8 @@
     opts="$opts --unpack-tarball $basedebs"
 fi
 
-debootstrap $opts $dist $TARGET $mirror $script
+echo "debootstrapping with the following opt: '$opts' for '$dist' on target '$TARGET' using mirror '$mirror' $script"
+debootstrap $dist $TARGET $mirror # $script $opts
 
 echo "deb $mirror $dist main" > $TARGET/etc/apt/sources.list
 
@@ -80,7 +81,8 @@
 iface $interface inet static
     address $address
     netmask $netmask
-    gateway $gateway
+	up route add -net 0.0.0.0 dev $interface
+	up route add -net 0.0.0.0 gw $gateway
 EOF
     fi
     if [ ! -e $TARGET/etc/resolv.conf ]; then

Modified: trunk/src/rootstrap/modules/mkfs
===================================================================
--- trunk/src/rootstrap/modules/mkfs	2006-05-21 17:58:18 UTC (rev 79)
+++ trunk/src/rootstrap/modules/mkfs	2006-05-21 20:49:14 UTC (rev 80)
@@ -3,6 +3,8 @@
 # which others support -q?
 if [ $fstype = "ext2" -o $fstype = "ext3" ]; then
     options="-q"
+elif [ $fstype = "reiserfs"]; then
+	option="-fq"
 fi
 
-mkfs.$fstype $options /dev/ubd/1
+mkfs.$fstype $options /dev/ubd1 | yes

Modified: trunk/src/rootstrap/modules/mount
===================================================================
--- trunk/src/rootstrap/modules/mount	2006-05-21 17:58:18 UTC (rev 79)
+++ trunk/src/rootstrap/modules/mount	2006-05-21 20:49:14 UTC (rev 80)
@@ -1,3 +1,3 @@
 #!/bin/sh -e
 
-mount -n -t $fstype /dev/ubd/1 $TARGET
+mount -n -t $fstype /dev/ubd1 $TARGET

Modified: trunk/src/rootstrap/modules/uml
===================================================================
--- trunk/src/rootstrap/modules/uml	2006-05-21 17:58:18 UTC (rev 79)
+++ trunk/src/rootstrap/modules/uml	2006-05-21 20:49:14 UTC (rev 80)
@@ -1,13 +1,23 @@
 #!/bin/sh -e
 
-# Make bootable without DevFS
-mknod $TARGET/dev/ubd0 b 98 0
+# Add ubd devices on host (if not present)
 
+if [ ! -d /dev/ubd || -e /dev/ubd$i ]; then
+	for i in 0 1 2 3 4 5 6 7; do
+		mknod $TARGET/dev/ubd$i b 98 $[$i * 16]; 
+	done
+fi
+
+# Make bootable without DevFS on guest
+# mknod $TARGET/dev/ubd0 b 98 0 instead of /dev/ubd/0
+for i in 0 1 2 3 4 5 6 7; do mknod $TARGET/dev/ubd$i b 98 $[$i * 16]; done
+
 chroot $TARGET /bin/sh -c 'cd /dev && ./MAKEDEV ubd'
 
 cat <<EOF > $TARGET/etc/fstab
-/dev/ubd0 / $fstype defaults 0 1
-proc /proc proc defaults 0 0
+/dev/ubd0 / 	$fstype defaults 			0 1
+proc 	/proc 	proc 	defaults 			0 0
+tmpfs  	/tmp    tmpfs   defaults,size=768M 	0 0
 EOF
 
 if [ "$install_modules" = "yes" -a -d /usr/lib/uml/modules ]; then




More information about the Pkg-uml-commit mailing list