On Wed, Nov 11, 2015, at 14:57, Balaco Baco wrote:
> On Wed, Nov 11, 2015, at 14:29, Richard Weinberger wrote:
> > Am 11.11.2015 um 18:21 schrieb Balaco Baco:
> > > On Wed, Nov 11, 2015, at 14:07, Richard Weinberger wrote:
> > >> On Wed, Nov 11, 2015 at 6:04 PM, Balaco Baco <balacob...@imap.cc> wrote:
> > >>> On Wed, Nov 11, 2015, at 13:39, Richard Weinberger wrote:
> > >>>> On Wed, Nov 11, 2015 at 5:13 PM, Balaco Baco <balacob...@imap.cc> 
> > >>>> wrote:
> > >>>>> There is one details that did not work for me, but it was easy to 
> > >>>>> "fix"
> > >>>>> (quotes because I'm not sure it is the best fix). But someone else may
> > >>>>> find it useful.
> > >>>>>
> > >>>>> Detailed steps so everyone can compare doing it, if needed:
> > >>>>>
> > >>>>>>  1. get one kernel source package from https://cdn.kernel.org/
> > >>>>>>  (I tried these steps with more than one option, searching for the 
> > >>>>>> older and more stable
> > >>>>>>  version; if the results are different for you, try another one; 
> > >>>>>> below I copied my 4.2.6 try; 3.18 does not have this problem)
> > >>>>>
> > >>>>>>  2. extract it.
> > >>>>> $ tar xJf ...
> > >>>>> $ cd lin<TAB>
> > >>>>>
> > >>>>>>  3. first step...
> > >>>>> $ make defconfig ARCH=um #uml1
> > >>>>>
> > >>>>> *** Default configuration is based on 'x86_64_defconfig'
> > >>>>> kernel/time/Kconfig:157:warning: range is invalid
> > >>>>> #
> > >>>>> # configuration written to .config
> > >>>>> #
> > >>>>>
> > >>>>>> That warning is strange. I did not like it. So I just edited that 
> > >>>>>> file, and changed it! :D hehehe
> > >>>>>
> > >>>>> $ vim kernel/time/Kconfig  # if it spitted a diff for line 157:
> > >>>>> -        range 1 NR_CPUS
> > >>>>> +       range 1 1
> > >>>>>
> > >>>>>> So, again...
> > >>>>> # make defconfig ARCH=um #uml1
> > >>>>> *** Default configuration is based on 'x86_64_defconfig'
> > >>>>> #
> > >>>>> # configuration written to .config
> > >>>>> #
> > >>>>>
> > >>>>>> So, assume the next steps have no problem, except that I don't know
> > >>>>>> how to make my UML access the Internet... this is in another
> > >>>>>> discussion, though
> > >>>>>
> > >>>>>> ... ?
> > >>>>> $ make menuconfig ARCH=um #uml2
> > >>>>>
> > >>>>>> Build it
> > >>>>> $ make ARCH=um #uml3 uml4 uml5
> > >>>>>
> > >>>>>> Run it now... but where is my Internet? :( hehehehe
> > >>>>
> > >>>> You did not configure a connection.
> > >>>> tuntap is a common method.
> > >>>>
> > >>>
> > >>> To add something like 'eth0=tuntap,,,192.168.1.100' to the command line
> > >>> is enough? Or I must change some config step that is not the default?
> > >>
> > >> Depends on your setup.
> > >> A common setup is " eth0=tuntap,tap0".
> > >> i.e. create a tap0 in your host and setup routing/ips.
> > >>
> > > 
> > > I (yet) have no clue what a tap is. Searches¹ did not ring many clear
> > > bells for me.
> > > 
> > > ¹https://duckduckgo.com/html/?q=uml+user+mode+linux+tuntap
> > > 
> > > My setup is what I have showed here. I have a AMD64 Debian image
> > > (Debian-Wheezy-AMD64-root_fs). The compile config I have showed here (I
> > > did not change anything besides a few options of the given default, and
> > > most of the tries I did not do these changes).
> > > 
> > > 
> > 
> > http://user-mode-linux.sourceforge.net/old/networking.html
> > https://en.wikipedia.org/wiki/TUN/TAP
> > 
> 
> 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.:
> 
> eth0=slirp,,/home/me/bin/
> 
> 

Compiled slirp from source, installed it locally.

Now I have two SSH sessions with the host. In the first one I run slirp
without arguments. I keep it running, its output is:

=========
$slirp 
Slirp v1.0.16 (BETA)

[...] 

IP address of Slirp host: 127.0.1.1
IP address of your DNS(s): 999.888.7.66, 555.444.3.22 # the real DNS the
host uses
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 ...
=========

In the other session, I boot the UML with:

./linux4.2.6 ubda=Debian-Wheezy-AMD64-root_fs mem=128M
eth0=slirp,,~/root/bin/slirp #uml6

But the network still don't work:

============
$ping 123.122.1.21
connect: Network is unreachable
$route add default dev eth0 #rede1 # taken from
http://user-mode-linux.sourceforge.net/old/networking.html Slirp section
SIOCADDRT: Network is down
$
============

I also tried it without running the slirp before, same result. I don't
know what to do here.


-- 
http://www.fastmail.com - Does exactly what it says on the tin


------------------------------------------------------------------------------
_______________________________________________
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