On Mon, Nov 23, 2015, at 13:35, Richard Weinberger wrote:
> Am 22.11.2015 um 16:39 schrieb Balaco Baco:
> >>>>>>> Since I have no root access in the host machine, I must use 'slirp'.
> >>>>>>> Right? Now I'll install it (https://en.wikipedia.org/wiki/Slirp) from
> >>>>>>> source and pass the full path to UML in the command line, e.g.:
> >>>>>>
> >>>>>> Yes.
> >>>>>>
> >>>>>>> eth0=slirp,,/home/me/bin/
> >>>>>>
> >>>>>> Documentation says: ethn=slirp,ethernet address,slirp path
> >>>>>>
> >>>>>> That said, the slirp tool is old and AFIAK unmaintained.
> >>>>>> qemu forked it a long time ago and has it integrated into its
> >>>>>> source.
> >>>>>>
> >>>>>
> >>>>> Documentation of UML also said that ethernet address is optional. I did
> >>>>> both ways, none worked (and it took me a few minutes and tries to find
> >>>>> out that not all MAC addresses are possible to use for a virtual machine
> >>>>> like UML; is this at least mentioned in some UML doc? It shouls, IMHO).
> >>>>>
> >>>>> So, is it possible that I run an UML with full Internet access, and
> >>>>> without having root access in the host machine? Or am I trying something
> >>>>> that from the start was not possible?
> >>>>>
> >>>>> If it is not possible, is it easy to set up some form of file sharing
> >>>>> between the host and UML machine? (again, this must *not* depend on host
> >>>>> root access!)
> >>>>
> >>>> As I said, if you don't have root on the host, you have to use slirp.
> >>>>
> >>>
> >>> And I am using slirp. But it do not work yet. I'm not sure what is
> >>> wrong. May you help me?
> >>
> >> Just gave it a try. Works here.
> >>
> >> ./linux ubda=../Downloads/Debian-Squeeze-AMD64-root_fs mem=1G
> >> eth0=slirp,FE:FD:01:02:03:04,/home/rw/work/slirp/slirp-1.0.17/src/slirp
> >>
> >> root@uml:~# ifconfig eth0 10.0.2.15 up
> >> root@uml:~# route add default gw 10.0.2.15
> > 
> > Do not work for me. And to point directly to the slirp program instead
> > of its folder (which is understood by many as the *path* for anything,
> > not the things themselves, with full path) is news for me, and something
> > that should be pointed in the docs. I think many others will understand
> > it as I did before you said this.
> 
> "Does not work" is not a valid error description.
> Please find out what exactly does not work.

There is no clear error. In this paragraph I just pointed to something
in the instructions that mislead me to give the path to the folder
*where* slirp was, instead of the slip program itself, its file. The
most I could see that did not work I said right after, below in the
previous message. Please assume and try to see that I'm trying my best
to follow your directions, but I still could not do it although you just
said you did.

You may also ask me to directly do things or steps that you do (maybe
it's something I don't know or do that make it don't work).


> > Now there is a few lines about slirt and ETH0:
> > 
> > =======================
> > [autodetect SLIP/CSLIP, MTU 1500, MRU 1500, 115200 baud]
> > 
> > SLiRP Ready ...
> > Unsupported device type 256 for "eth0"
> > Failed to bring up eth0.
> > done.
> > 
> > ========================
> 
> DHCP cannot work on SLIRP.
> That's why you have to configure the interface manually.
> 
> > What can I do?
> > 

If configure the interface manually is to type the commands (inside UML)
 below, that I did before:

root@uml:~# ifconfig eth0 10.0.2.15 up
root@uml:~# route add default gw 10.0.2.15

It did not work.

What information is useful for you? I don't know. So, since you seem to
have thought I did not try enough before, now I'm sending the whole boot
log, and each step I did before and repeated right now, after I read
your message.


> >> Then you can use networking. Please not that slirp does not have a
> >> performance.
> >> Depending on your slirp package you can tweak it.
> > 
> > I have compiled it from source. Do you know exactly where and how I can
> > tweak it? If so, please say how, so I don't have to search and find what
> > is already known.
> 
> AFAIK Debian folks have some patches in their package.

I choose the best distro I know for the intended uses (RedHat and sister
is usually not that good, but I don't discard using them to start). I
did not use Fedora or RedHat that even the blog shows because I don't
want and don't need graphical interface. Just CLI is perfect, just fine.

If you can point which patch or which feature Debian patched I can work
around it. Right now I know that it may have some problem, but I can
even look for help my self or anywhere else because I don't know what it
is - not much clues I can tell.

> Thanks,
> //richard

Ironically, doing the same steps I did before it seemed to work today.
:-/ I hate when this happens... hopefully it won't stop tomorrow, with
another ironic happening.

Now, with a close to work situaton, I guessed that it just needed to
find the DNS the host uses (easy, fine), and then I repeat the route add
command. But this is not true. Before I update UML's /etc/resolv.conf
the only IP I can ping from UML is 127.0.0.1. What else do I need to do
to have network in UML?

Thank you,

-- 
  Balaco


-- 
http://www.fastmail.com - Choose from over 50 domains or use your own

# at the host machine, the command line used to call UML:

$./linux4.2.6 ubda=Debian-Wheezy-AMD64-root_fs mem=128M 
eth0=slirp,fe:fd:01:02:03:04,/home/me/path/slirp

Core dump limits :
        soft - 0
        hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation patch for ptrace...OK
Checking advanced syscall emulation patch for ptrace...OK
Checking environment variables for a tempdir...none found
Checking if /dev/shm is on tmpfs...OK
Checking PROT_EXEC mmap in /dev/shm...OK
Adding 28102656 bytes to physical memory to account for exec-shield gap
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.2.6 (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) ) #1 Wed 
Nov 11 15:14:29 BRST 2015
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 39087
Kernel command line: ubda=Debian-Wheezy-AMD64-root_fs mem=128M 
eth0=slirp,fe:fd:01:02:03:04,/home/me/pth/slirp root=98:0
PID hash table entries: 1024 (order: 1, 8192 bytes)
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
Memory: 124164K/158516K available (2555K kernel code, 627K rwdata, 788K rodata, 
108K init, 157K bss, 34352K reserved, 0K cma-reserved)
NR_IRQS:15
clocksource: itimer: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, 
max_idle_ns: 3526361616960 ns
Calibrating delay loop... 2131.55 BogoMIPS (lpj=10657792)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
Initializing cgroup subsys blkio
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Checking that host ptys support output SIGIO...tty_output : read failed, err = 
-1
Checking that host ptys support SIGIO on close...No, enabling workaround
devtmpfs: initialized
Using 2.6 host AIO
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 
19112604462750000 ns
NET: Registered protocol family 16
clocksource: Switched to clocksource itimer
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
console [stderr0] disabled
mconsole (version 2) initialized on /home/me/.uml/OKR7xY/mconsole
Checking host MADV_REMOVE support...OK
futex hash table entries: 256 (order: 0, 6144 bytes)
VFS: Disk quotas dquot_6.6.0
VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
io scheduler noop registered
io scheduler deadline registered (default)
NET: Registered protocol family 17
Initialized stdio console driver
Console initialized on /dev/tty0
console [tty0] enabled
Initializing software serial port version 1
Netdevice 0 (fe:fd:01:02:03:04) : SLIRP backend - command line: 
'/home/me/path/slirp'
console [mc-1] enabled
EXT4-fs (ubda): mounting ext3 file system using the ext4 subsystem
EXT4-fs (ubda): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext3 filesystem) readonly on device 98:0.
devtmpfs: mounted
random: nonblocking pool is initialized
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
findfs: unable to resolve 'LABEL=ROOT'
[....] Starting the hotplug events dispatcher: udevdudevd[350]: starting 
version 175
. ok 
[ ok ] Synthesizing the initial hotplug events...done.
[ ok ] Waiting for /dev to be fully populated...done.
[ ok ] Activating swap...done.
EXT4-fs (ubda): re-mounted. Opts: (null)
[....] Checking root file system...fsck from util-linux 2.20.1
ROOT: clean, 19392/65536 files, 103494/262144 blocks
done.
EXT4-fs (ubda): re-mounted. Opts: (null)
[ ok ] Cleaning up temporary files... /tmp /lib/init/rw.
[ ok ] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.20.1
done.
[FAIL] Mounting local filesystems...failed.
[ ok ] Activating swapfile swap...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables ...done.
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 
4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Slirp v1.0.16 (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.1.1
IP address of your DNS(s): 150.164.0.80
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 ...
Unsupported device type 256 for "eth0"
Failed to bring up eth0.
done.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[ ok ] Starting enhanced syslogd: rsyslogd.
[ ok ] Starting periodic command scheduler: cron.

Debian GNU/Linux 7 coiso tty0

coiso login: Serial line 0 assigned device '/dev/pts/3'


Debian GNU/Linux 7 coiso tty0

$
$ifconfig eth0 10.0.2.15 up
$route add default gw 10.0.2.15
$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.382 ms
64 bytes from 127.0.0.1: icmp_req=2 ttl=64 time=0.071 ms
64 bytes from 127.0.0.1: icmp_req=3 ttl=64 time=0.075 ms
^C
--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2008ms
rtt min/avg/max/mdev = 0.071/0.176/0.382/0.145 ms
$
$ wget ftp://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz
wget     wgetie   wgetie5  
$ wgetie 'ftp://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz'
--2015-11-23 18:46:24--  ftp://ftp.gnu.org/gnu/bison/bison-3.0.4.tar.gz
           => `bison-3.0.4.tar.gz'
Resolving ftp.gnu.org (ftp.gnu.org)... failed: Name or service not known.
wget: unable to resolve host address `ftp.gnu.org'
$
$  ping 150.164.0.1
PING 150.164.0.1 (150.164.0.1) 56(84) bytes of data.
^C
--- 150.164.0.1 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6028ms

$ ping 150.164.0.80
PING 150.164.0.80 (150.164.0.80) 56(84) bytes of data.
^C
--- 150.164.0.80 ping statistics ---
86 packets transmitted, 0 received, 100% packet loss, time 85411ms

root@coiso: ~
$

------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to