|
From: Ben W. <ben...@gm...> - 2006-09-19 02:06:54
|
i'm trying to get uml working with modules. i downloaded the latest kernel 2.6.17.13, compiled using the `defconfig', obtained the root fs from http://uml.nagafix.co.uk/Debian-3.1/ (which claims to have been updated sept 13 2006), and ran ./linux. note, my host machine is running 2.6.10.5, ubuntu 5.04 "hoary hedgehog". i can log in ok. but: [a] modules don't seem to work. lsmod gives (none):~# lsmod Module Size Used by Not tainted lsmod: QM_MODULES: Function not implemented also, it appears from the startup output (see below) that no insmod/modprobe whatever is getting called, since otherwise you'd get an error like above ... (right? sorry, i don't understand very well how modules are supposed to work) i also notice that when the iso9660 file system is compiled as a module, you get an error like "mount: unknown filesystem type 'iso9660'" when trying to mount a cdrom. (when compiled statically you get a different error, but it's at least clear that it knows what the filesystem is.) on the other hand /dev/random works whether it's a module or not. (perhaps the kernel simulates this?) google pages like this: http://www.linuxquestions.org/questions/showthread.php?postid=1140501 suggest that this is due to an outdated module-init-tools, and talks about downloading it, compiling it, etc. but there's no `make' or any such thing inside of the above root_fs despite its monstrous size. and there's no obvious way to install it, since i can't get networking working (see below). it's true that i can do `sudo mount root_fs mnt -o loop' on the host machine (damn convenient to have root access even though UML "theoretically" works without), but it's not obvious that trying to compile with --prefix set to `pwd`/mnt is going to work. maybe i could download and copy in all the relevant package files, but i don't really know how to do that or what files need to be copied etc. [b] networking doesn't work. i've tried everything: [1] use slirp, i.e. ./linux eth0=slirp,,/usr/bin/slirp i set resolv.conf like this: ---------------- nameserver 128.83.185.41 nameserver 128.83.185.40 ---------------- and /etc/network/interfaces like this: ---------------- auto eth0 iface eth0 inet static address 10.0.2.15 netmask 255.0.0.0 gateway 10.0.2.15 ---------------- it can translate DNS ok but can't ping anything, even its nameserver or the host machine itself. [2] install uml-utilities and follow the instructions exactly as given in /usr/share/doc/README.Debian (see below). ./linux eth0=daemon this time it doesn't even do DNS conversion. the relevant startup text: Running 0dns-down to make sure resolv.conf is ok...done. Setting up networking...done. Setting hostname to '(none)'...hostname: the specified hostname is invalid done. * /etc/network/options is deprecated. Setting up IP spoofing protection...done (rp_filter). Configuring network interfaces...SIOCSIFFLAGS: No such file or directory SIOCSIFFLAGS: No such file or directory Failed to bring up eth0. done. [3] use Ethertap, as in the UML network docs: ./linux eth0=ethertap,tap0,fe:fd:0:0:0:1,192.168.0.254 this time it doesn't even boot. unning 0dns-down to make sure resolv.conf is ok...done. Setting up networking...done. Setting hostname to '(none)'...hostname: the specified hostname is invalid done. * /etc/network/options is deprecated. Setting up IP spoofing protection...done (rp_filter). Configuring network interfaces...etap_tramp : uml_net failed any help??? ben beginning of /usr/share/doc/README.Debian: ---------------- The easiest way to use virtual networking is to use the "daemon" transport with the uml_switch instance which is configured and running by default. 1. Add an entry to /etc/network/interfaces to configure a persistent tap interface on the host: auto tap0 iface tap0 inet static address 192.168.1.1 netmask 255.255.255.0 tunctl_user uml-net 2. Configure uml_switch to connect to this interface by editing /etc/default/uml-utilities: UML_SWITCH_OPTIONS="-tap tap0" 3. Activate the tap interface: # ifup tap0 4. Restart the daemon # /etc/init.d/uml-utilities restart 5. Use the "daemon" transport with UML: $ linux eth0=daemon You should then be able to pass traffic between UML and the host over the tap interface. You may also set up forwarding, masquerading, etc. in order to communicate beyond the host. It is convenient to run dhcpd on the host, configured to listen on the tap0 interface and provide configuration information for UMLs as needed. ---------------- startup output from ./linux eth0=slirp,,/usr/bin/slirp: Checking that ptrace can change system call numbers...OK Checking syscall emulation patch for ptrace...missing Checking for tmpfs mount on /dev/shm...OK Checking PROT_EXEC mmap in /dev/shm/...OK Checking for the skas3 patch in the host: - /proc/mm...not found - PTRACE_FAULTINFO...not found - PTRACE_LDT...not found UML running in SKAS0 mode Checking that ptrace can change system call numbers...OK Checking syscall emulation patch for ptrace...missing Linux version 2.6.17.13 (benwing@quiche) (gcc version 3.3.5 (Debian 1: 3.3.5-8ubuntu2.1)) #3 Mon Sep 18 19:20:04 CDT 2006 Built 1 zonelists Kernel command line: eth0=slirp,,/usr/bin/slirp root=98:0 PID hash table entries: 256 (order: 8, 1024 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) Memory: 29980k available Mount-cache hash table entries: 512 Checking for host processor cmov support...Yes Checking for host processor xmm support...No Checking that host ptys support output SIGIO...Yes Checking that host ptys support SIGIO on close...No, enabling workaround Using 2.6 host AIO NET: Registered protocol family 16 NET: Registered protocol family 2 IP route cache hash table entries: 256 (order: -2, 1024 bytes) TCP established hash table entries: 1024 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 1024 bind 512) TCP reno registered Netdevice 0 : SLIRP backend - command line: '/usr/bin/slirp' Checking host MADV_REMOVE support...MADV_REMOVE failed, err = -22 Can't release memory to the host - memory hotplug won't be supported mconsole (version 2) initialized on /home/benwing/.uml/8Uo8Df/mconsole Host TLS support detected Detected host type: i386 VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered PPP generic driver version 2.4.2 NET: Registered protocol family 24 SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256). tun: Universal TUN/TAP device driver, 1.6 tun: (C) 1999-2004 Max Krasnyansky <ma...@qu...> TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 17 Initialized stdio console driver Console initialized on /dev/tty0 Initializing software serial port version 1 ubda: unknown partition table EXT2-fs warning (device ubda): ext2_fill_super: mounting ext3 filesystem as ext2 VFS: Mounted root (ext2 filesystem) readonly. line_ioctl: tty0: ioctl KDSIGACCEPT called INIT: version 2.86 booting line_ioctl: tty0: unknown ioctl: 0x541e line_ioctl: tty0: unknown ioctl: 0x5603 Will now activate swap. Done activating swap. Will now check root file system. fsck 1.39 (29-May-2006) [/sbin/fsck.ext3 (1) -- /dev/shm/root] fsck.ext3 -a -C0 /dev/shm/root /dev/shm/root: clean, 14769/131072 files, 90938/262144 blocks Done checking root file system. A log will be saved in /var/log/fsck/checkroot if that location is writable. Setting the system clock.. hwclock is unable to get I/O port access: the iopl(3) call failed. hwclock is unable to get I/O port access: the iopl(3) call failed. System Clock set. Local time: Tue Sep 19 00:55:35 UTC 2006. Cleaning up ifupdown...done. Setting the system clock again.. hwclock is unable to get I/O port access: the iopl(3) call failed. System Clock set. Local time: Tue Sep 19 00:55:36 UTC 2006. Loading device-mapper supportNote: /etc/modules.conf is more recent than /lib/modules/2.6.17.13/modules.dep Note: /etc/modules.conf is more recent than /lib/modules/2.6.17.13/modules.dep Note: /etc/modules.conf is more recent than /lib/modules/2.6.17.13/modules.dep . Will now check all file systems. fsck 1.39 (29-May-2006) Checking all file systems. Done checking file systems. A log is being saved in /var/log/fsck/checkfs if that location is writable. Start setting kernel variables via /proc... Done setting kernel variables via /proc. Will now mount local filesystems. * Mounting proc filesystems failed with error code 32. mount: none already mounted or /dev/pts busy mount: according to mtab, devpts is already mounted on /dev/pts tmpfs on /tmp type tmpfs (rw,size=768M) * Mounting local filesystems failed with error code 96. Will now activate swapfile swap. Done activating swapfile swap. Cleaning /tmp...done. Cleaning /var/run...done. Cleaning /var/lock...done. Running 0dns-down to make sure resolv.conf is ok...done. Setting up networking...done. Setting hostname to '(none)'...hostname: the specified hostname is invalid done. * /etc/network/options is deprecated. Setting up IP spoofing protection...done (rp_filter). Configuring network interfaces...Slirp v1.0.14pre1 (BETA) Copyright (c) 1995,1996 Danny Gasparovski and others. All rights reserved. This program is copyrighted, free software. Please read the file COPYRIGHT that came with the Slirp package for the terms and conditions of the copyright. IP address of Slirp host: 127.0.0.1 IP address of your DNS(s): 128.83.185.41, 128.83.185.40 Your address is 10.0.2.15 (or anything else you want) Type five zeroes (0) to exit. [autodetect SLIP/CSLIP, MTU 1500, MRU 1500, 115200 baud] SLiRP Ready ... done. line_ioctl: tty0: unknown ioctl: 0x541e line_ioctl: tty0: unknown ioctl: 0x5603 Initializing random number generator...done. Recovering nvi editor sessions...none found. INIT: Entering runlevel: 2 Starting system log daemon: syslogd. Starting kernel log daemon: klogd. Starting MTA: exim4. Starting internet superserver: inetd. Starting deferred execution scheduler: atd. Starting periodic command scheduler.... Debian GNU/Linux testing/unstable (none) tty0 (none) login: root Last login: Tue Sep 19 00:34:34 2006 on tty0 Linux (none) 2.6.17.13 #3 Mon Sep 18 19:20:04 CDT 2006 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. (none):~# |