Hallo Liste,Ich habe hier einen Sarge Server, auf dem ich zu Testzwecken per Debootstrap ein Sid eingerichtet habe. In dem Sid arbeite ich per chroot. Nun will ich aber in dem Sid wiederum ein zwei UML-Systeme austesten. Hab mich an die Anleitung unter http://www.eggdrop.ch/texts/uml/index.htm gehalten. allerdings das create-uml Script geringfügig geändert. (siehe Anhang) Das dürfte aber auf das eigentliche UML keinen einflus haben. Wenn ich nun allerdings das UMl starten will, dann hängt es sich nach Activating swap auf. (ich habe keine Swap-partition). Die vollständige "Bootmeldung" hab ich als Ausgabe ebenfalls angehängt. Wäre schön wen jemand von euch nen Tip hätte wie ich das UML zum laufen bringen kann.
Danke im voraus. Frank
Checking for the skas3 patch in the host...not found Checking for /proc/mm...not found tracing thread pid = 30058 Checking for /dev/anon on the host...Not available (open failed with errno 2) Checking for /dev/anon on the host...Not available (open failed with errno 2) Checking for /dev/anon on the host...Not available (open failed with errno 2) Checking for /dev/anon on the host...Not available (open failed with errno 2) Linux version 2.4.26-3um (root@mizar) (gcc version 3.3.4 (Debian 1:3.3.4-11)) #2 Wed Sep 8 18:07:31 PDT 2004 On node 0 totalpages: 16384 zone(0): 16384 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: mem=64M eth0=tuntap,tap1 root=/dev/ubd0 Calibrating delay loop... 1304.16 BogoMIPS Memory: 60208k available Dentry cache hash table entries: 8192 (order: 4, 65536 bytes) Inode cache hash table entries: 4096 (order: 3, 32768 bytes) Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer cache hash table entries: 1024 (order: 0, 4096 bytes) Page-cache hash table entries: 16384 (order: 4, 65536 bytes) /proc/cpuinfo not available - skipping CPU capability checks Checking that ptrace can change system call numbers...OK Checking that host ptys support output SIGIO...Yes Checking that host ptys support SIGIO on close...No, enabling workaround POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket Starting kswapd VFS: Disk quotas vdquot_6.5.1 Journalled Block Device driver loaded devfs: v1.12c (20020818) Richard Gooch (rgooch@atnf.csiro.au) devfs: boot_options: 0x0 SGI XFS with ACLs, no debug enabled SGI XFS Quota Management subsystem Disabling 2.6 AIO in tt mode pty: 256 Unix98 ptys configured RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) Initializing Cryptographic API Initializing software serial port version 1 mconsole (version 2) initialized on /home/balder/.uml/svzAAm/mconsole Partition check: ubda: unknown partition table Initializing stdio console driver Netdevice 0 : TUN/TAP backend - NET4: Linux TCP/IP 1.0 for NET4.0 IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 4096 bind 8192) Linux IP multicast router 0.06 plus PIM-SM NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. VFS: Mounted root (ext2 filesystem) readonly. INIT: version 2.86 booting Activating swap.
#!/bin/sh ### functions f() { echo "Failed."; exit; } setup_net() { echo "Configuring network" while :; do echo -n "IP address of the UML machine (e.g. 192.168.0.100) > " read nw_ip if [ "x$nw_ip" != "x" ]; then break fi done while :; do echo -n "Network (e.g. 192.168.0.0) > " read nw_network if [ "x$nw_network" != "x" ]; then break fi done while :; do echo -n "Broadcast address (e.g. 192.168.0.255) > " read nw_bcast if [ "x$nw_bcast" != "x" ]; then break fi done while :; do echo -n "Netmask (e.g. 255.255.255.0) > " read nw_netmask if [ "x$nw_netmask" != "x" ]; then break fi done while :; do echo -n "Your internet gateway (e.g. 192.168.0.1) > " read nw_gw if [ "x$nw_gw" != "x" ]; then break fi done while :; do echo -n "Host interface (e.g. tap1) > " read nw_if if [ "x$nw_if" != "x" ]; then break fi done echo "" echo "You entered:" echo " IP address: $nw_ip" echo " Network: $nw_network" echo " Broadcast address: $nw_bcast" echo " Netmask: $nw_netmask" echo " Gateway: $nw_gw" echo " Host interface: $nw_if" while :; do echo -n "Is this correct? [y/n]: " read nw_ok case "$nw_ok" in y | yes) break ;; n | no) setup_net return break ;; *) echo "Please enter 'y' or 'n'" esac done } ### our script begins here if [ "`id -u`" != "0" ]; then echo "I won't run as user. I need root." exit 1 fi if [ "x$1" = "x" ]; then echo "Enter the name of the UML machine or press CTRL+C to abort:" echo -n "> " read name fi if [ "x$name" = "x" ]; then echo "Aborting." exit 1 fi echo echo ============================== echo Creating file system echo ============================== echo if [ "x$1" = "x" ]; then echo "Enter the size of your root partition in MB" echo -n "> " read size fi if [ "x$size" = "x" ]; then echo "Aborting." exit 1 fi # user add abs=$(pwd) home=$abs/$name adduser --shell /bin/false --home $home --ingroup uml-net --disabled-login --gecos "UML-host $name" $name # print this so the user does not think that the script is hanging echo dd if=/dev/zero of=$name/root_fs count=$size bs=1M dd if=/dev/zero of=$name/root_fs count=$size bs=1M || f /sbin/mke2fs -F $name/root_fs || f mkdir $name/mnt || f mount -o loop $name/root_fs $name/mnt || f if [ "x$1" = "x" ]; then echo "Enter the name of the dist or press CTRL+C to abort:" echo -n "> " read dist fi if [ "x$dist" = "x" ]; then echo "Aborting." exit 1 fi echo echo ============================== echo Installing the base system echo ============================== echo debootstrap $dist $name/mnt || f echo echo ============================== echo Configuring the base system echo ============================== echo echo '# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> /dev/ubd0 / ext2 defaults 0 0 proc /proc proc defaults 0 0' \ > $name/mnt/etc/fstab echo '# /etc/inittab: init(8) configuration. # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $ # The default runlevel. id:2:initdefault: # Boot-time system configuration/initialization script. # This is run first except when booting in emergency (-b) mode. si::sysinit:/etc/init.d/rcS # What to do in single-user mode. ~~:S:wait:/sbin/sulogin # /etc/init.d executes the S and K scripts upon change # of runlevel. # # Runlevel 0 is halt. # Runlevel 1 is single-user. # Runlevels 2-5 are multi-user. # Runlevel 6 is reboot. l0:0:wait:/etc/init.d/rc 0 l1:1:wait:/etc/init.d/rc 1 l2:2:wait:/etc/init.d/rc 2 l3:3:wait:/etc/init.d/rc 3 l4:4:wait:/etc/init.d/rc 4 l5:5:wait:/etc/init.d/rc 5 l6:6:wait:/etc/init.d/rc 6 # Normally not reached, but fallthrough in case of emergency. z6:6:respawn:/sbin/sulogin # What to do when CTRL-ALT-DEL is pressed. ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now # Action on special keypress (ALT-UpArrow). #kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work." # What to do when the power fails/returns. pf::powerwait:/etc/init.d/powerfail start pn::powerfailnow:/etc/init.d/powerfail now po::powerokwait:/etc/init.d/powerfail stop # /sbin/getty invocations for the runlevels. # # The "id" field MUST be the same as the last # characters of the device (after "tty"). # # Format: # <id>:<runlevels>:<action>:<process> # # Note that on most Debian systems tty7 is used by the X Window System, # so if you want to add more getty'\''s go ahead but skip tty7 if you run X. # 0:1235:respawn:/sbin/getty 38400 console linux #1:2345:respawn:/sbin/getty 38400 tty1 #2:23:respawn:/sbin/getty 38400 tty2 #3:23:respawn:/sbin/getty 38400 tty3 #4:23:respawn:/sbin/getty 38400 tty4 #5:23:respawn:/sbin/getty 38400 tty5 #6:23:respawn:/sbin/getty 38400 tty6 # Example how to put a getty on a serial line (for a terminal) # #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 # Example how to put a getty on a modem line. # #T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3' > $name/mnt/etc/inittab echo $name > $name/mnt/etc/hostname # set up apt echo " #Offizieller Mirror deb http://ftp.de.debian.org/debian $dist main non-free contrib deb-src http://ftp.de.debian.org/debian $dist main non-free contrib #Wu deb http://ftp.wh2.tu-dresden.de/debian $dist main non-free contrib deb-src http://ftp.wh2.tu-dresden.de/debian $dist main non-free contrib " > $name/mnt/etc/apt/sources.list || f #install locales chroot $name/mnt apt-get -y update || f chroot $name/mnt apt-get -y install locales || f # install SSH while :; do echo -n "Do you want to install SSH? [y/n]: " read nw_config case "$nw_config" in y | yes) chroot $name/mnt apt-get -y install ssh || f break ;; n | no) break ;; *) echo "Please enter 'y' or 'n'" esac done # network while :; do echo -n "Do you want to configure the network? [y/n]: " read nw_config case "$nw_config" in y | yes) nw_config=1 break ;; n | no) nw_config=0 break ;; *) echo "Please enter 'y' or 'n'" esac done if [ "$nw_config" = "1" ]; then setup_net echo '# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo iface lo inet loopback # eth0 auto eth0 iface eth0 inet static address '$nw_ip' netmask '$nw_netmask' network '$nw_network' broadcast '$nw_bcast' gateway '$nw_gw > $name/mnt/etc/network/interfaces fi # clean up umount $name/mnt echo echo ============================== echo Creating start script echo ============================== echo while :; do echo -n "Enter the amount of memory for the UML machine in MB: " read mem test $mem && break done if [ "$nw_config" = "1" ]; then echo '#!/bin/sh MEMORY="'$mem'M" HOST_IFACE="'$nw_if'" linux mem=$MEMORY eth0=tuntap,$HOST_IFACE' > $name/run else echo '#!/bin/sh MEMORY="'$mem'M" linux mem=$MEMORY' > $name/run fi chmod +x $name/run echo echo ============================== echo Finished echo ============================== echo echo To launch UML, type: echo cd $name echo ./run echo echo Have a lot of fun! echo
Attachment:
signature.asc
Description: OpenPGP digital signature