Icaros Desktop on Linux Hosted but what to make for internet connection ?

yogib33r · 1806

yogib33r

  • Junior Member
  • **
    • Posts: 85
    • Karma: +1/-0
  • amigaaaaaaaaaa
    • la bonne anime
Hello all !

So then i have severals and enought computers in my tiny appartment :) Aros in Linux Hosted works fine, except for internet connection ?
I think i did what to do, first choose the correct place in my linux /home, secondly choose the enp3s0 card and finnaly done right with scripts.

So then no ping from this emulation, perhaps have i to make something to make it work ?

Thanx a lot for futur replies and stay amigaaaaaaaaa

amiga 4  ever


Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
The procedure is right may be that you were wrong to select Device



yogib33r

  • Junior Member
  • **
    • Posts: 85
    • Karma: +1/-0
  • amigaaaaaaaaaa
    • la bonne anime
hello hello and thanx :)

ok i go see tomorrow on the good computer, with ifconfig telling me what to choose.

Have a wonderfull evening !

amiga 4  ever


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
...
Aros in Linux Hosted works fine, except for internet connection ?
I think i did what to do, first choose the correct place in my linux /home, secondly choose the enp3s0 card and finnaly done right with scripts.

So then no ping from this emulation, perhaps have i to make something to make it work ?

Use the first script from this wikibook link and then select tap.device from AROS network settings.

If you need to know more about how to configure the AROS part then have a look at the Icaros desktop PDF  manual (link available in my signature).

The difficult part is to figure out from where to obtain tunctl as it depends on your Linux distribution (e.g. the package name that contain the tunctl utility may vary).

Good luck !


yogib33r

  • Junior Member
  • **
    • Posts: 85
    • Karma: +1/-0
  • amigaaaaaaaaaa
    • la bonne anime
Hello hello !

Ok thanx Magorium ! i go test it tomorrow afternoon when back at home (i'm on my laptop actually) so then i will try what you are saying :)

regards !

amiga 4  ever


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
I just noticed another addition to the wikibook that is/seem specific for Icaros. If oyu used my wikibook link then scroll a bit down to this link.


Perhaps Paolone already included that script in the Linux hosted installation of Icaros Desktop (I have no idea as i have a custom configured Linux hosted AROS running myself).


The general idea however (for both solutions) is to run this script before invoking the AROS bootstrap executable. I use a custom script for that myself (and that includes the network configuration parts that are listed in the first link to the wikibook that i posted).


No matter which solution you prefer they should both work, so in case you run into trouble then let us know so we can try to fix it.


No hurries  :)


yogib33r

  • Junior Member
  • **
    • Posts: 85
    • Karma: +1/-0
  • amigaaaaaaaaaa
    • la bonne anime
Hello my dear Paolone and thanx for your answer.

Ok i go see this afternoon, ready to try icaros hosted.
The fact is i am on wlan here, i will be on ethernet at home so then perhaps more simple to get the net on the amiga system.

i keep you in touch :)

Regards.

amiga 4  ever


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
The fact is i am on wlan here, i will be on ethernet at home so then perhaps more simple to get the net on the amiga system.
The first script should work for both wireless and wired.

you use the name of the Linux network interface (command: ifconfig) which by default are usually named wlan0 for wireless and eth0 for a wired connection.

The script creates a new(virtual) networkinterface whic is aros0 for the first script. The script that paolone used uses some commands to construct a interface name "$iface").

The script then uses the name of the Linux interface in order to route the AROS network traffic to that interface. That is done in the lines that read:
sudo iptables -t nat -A POSTROUTING -o <name_of_linux_network_interface> -s 192.168.166.0/2 -j MASQUERADE

The last step that needs to be done is to actually activate (forward) the traffic using the earlier declared route(s).

Of course you do "share" the Linux host network interface bandwidth so if you have a slow wlan connection then it might perhaps be a better idea to use a wired connection/interface.

fwiw Paolone's script is a bit more sophisticated in that it tries to avoid as much hard-coded values as possible. It is neat but it might make it a bit more difficult for you to adjust in case you are not that familiar with Linux shell scripting.


paolone

  • Moderator
  • Legendary Member
  • *****
    • Posts: 568
    • Karma: +90/-0
Icaros Desktop already provides all necessary instructions to handle networking during both installation and runtime. You'd notice that if you followed the on-screen prompts and questions.


Newer Linux distributions, though, deprecated ifconfig and use the more modern 'ip' command to get the same results, so I'd have to update these scripts to reflect the change. Latest builds of Icaros Desktop, which mean the current 'WIP' ones install ifconfig to work the issue around.


yogib33r

  • Junior Member
  • **
    • Posts: 85
    • Karma: +1/-0
  • amigaaaaaaaaaa
    • la bonne anime
OK hello both of you ^^

Ok i mistaked, not any network even if i gave to the script the eth0 network
so then i go test with the last build.

I go back soon to say you if i succed or not :)

Thanx a lot !

edit: so then icaros is ok to be lauch under kms qemu but no succes to format the disk even if sata or else ? I remember  having done it ? I remember of a vmdl already done to download ? perhaps someone have it ? thanx a lot !
« Last Edit: September 12, 2022, 02:40:34 PM by yogib33r »

amiga 4  ever


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Ok i mistaked, not any network even if i gave to the script the eth0 network
Which script did you use ? the default one that is distributed with Icaros Desktop, or the first script at the wikibook that i linked to ?

In case you are not sure which script you used then please paste the scrip there (use code tags)

How did you configure AROS ? e.g. what values did you use for IP-address, Mask and Gateway in AROS' network preferences ? Did you use the tap.device network card ? Did you actually save your settings (not use) and (cold) rebooted AROS ?

Quote
so then i go test with the last build.
It doesn't really matter which build you use. If the network on your Linux machine works then AROS hosted can make use of it.

The only difference (as written by Paolone) is that the ifconfig command is replaced by the ip command on recent Linux distributions. You can check that by typing (sudo) ifconfig inside a linux shell and see if that returns your network interfaces (or an error). In case the Linux shell returns something like "ifconfig: command not found" then try (sudo) ip.

If the former does work then the script should use the ifconfig command and in case the latter works for you then the script should use the ip command.

Have you installed the "uml-utilities" package on your Linux host ? That package contains the required tunctl command-line utility.

Quote
edit: so then icaros is ok to be lauch under kms qemu but no succes to format the disk even if sata or else ? I remember  having done it ? I remember of a vmdl already done to download ? perhaps someone have it ? thanx a lot !
I do not know the answer to that but since you seem to ask this question in the same thread as the networking question that you asked i do wonder if you realize that running Icaros hosted on Linux and running Icaros using qemu are two separate things. As such they use different settings (for both host and AROS).

Just trying to make sure there is no misunderstanding there....  :)
« Last Edit: September 12, 2022, 06:23:45 PM by magorium »



paolone

  • Moderator
  • Legendary Member
  • *****
    • Posts: 568
    • Karma: +90/-0
Exactly.


Hosted is totally different from qemu/kms/vmware virtual machines


yogib33r

  • Junior Member
  • **
    • Posts: 85
    • Karma: +1/-0
  • amigaaaaaaaaaa
    • la bonne anime
Hello both and thanx for your help !

So then i used the script of the iso when choicing eth0, /home directory with folders and didn't touched to the network even if i tried the dhcp one.
Ok Paolone i will try YOUR script this evening, to see if any difference.

For the ip adress, all my lan net work is something as 192.168.1.12 for my raspberry, 192.168.1.49 for my nas.
So then i will put the router as gateway and try to get a static ip as 192.168.1.50 or else.

I will be back to you this evening for it !

Thanx yet.



edit: ok i'm back :) sorry i mistaked magorium and paolone i'm a noob in aros hosted ^^
So then i run the script and after i run the normal one ?
excuse me it is new to me, i'm use to make vms on qemu but as new linux ones and sometimes win$

Have a wonderfull time :)

Regards
« Last Edit: September 13, 2022, 04:45:19 PM by yogib33r »

amiga 4  ever


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Hi Yogib33r,

I'm going to quote you in a different order in the hope it make things more clear for you.

Quote
excuse me it is new to me, i'm use to make vms on qemu but as new linux ones and sometimes win$
You can forget everything related to running AROS in qemu as the procedure for running AROS hosted is different.

Having said that, running AROS hosted on Windows or Linux is pretty much the same except for the fact that running AROS hosted on Windows is currently missing a few features (such as windows hosted does not support audio and networking).

Quote
So then i used the script of the iso when choicing eth0, /home directory with folders and didn't touched to the network even if i tried the dhcp one.
I am not familiar with the Icaros Desktop hosted installation script so i can not really comment on that.

What i can do for you is make some generic remarks that will hopefully be able to make things more clear for you. If not then please feel free to comment/ask.


Running AROS hosted (either on Linux or Windows) let you run AROS as a normal windows/Linux process as you would run any other program on these OS-es.

The only difference with a normal program is that AROS is actually a complete operating system (that in itself wil be able to run AROS programs).

In order to accomplish that, it is required that you copy all files from the .iso to a specific directory from where you wish to run AROS (hosted).

I am assuming that the Icaros Desktop script is doing that automatically for you. In my case (becuase i do things in a custom way) i copied all necessary AROS files to a directory of my choice.

When all necessary files are in place you can then start AROS hosted by invoking the AROSbootstrap executable. For example on my raspberry pi I do that by typing the command "/home/apps/AROS/AROS-20190318-linux-armhf-system/Arch/linux/AROSBootstrap -m 200". Note that the actual location of the AROSBootstrap executable may vary and might be at a different location on your AROS hosted installation.

If you know where exactly your AROSbootstrap executable is located you can then incorporate that into your network startup script.

Again please note that i am using the script as is shown here on the wikibook.

That script contains two network routes: one for wired (eth0) and one for wirelesws (wan0) and i only wanted to use the wired one (so i removed the wan0 routing). Whn the hosting part of the network is setup correctly i wanted the script to start AROS, so that my script looks like:

Code: [Select]
#!/bin/sh

# store current directory
CWD="$(pwd)"

NETON=`ifconfig | grep aros0`

if [ "$NETON" = "" ]; then
    echo "Installing bridge network... (sudo access required)"
    sudo tunctl -b -u "$USER" -t aros0
    sudo ifconfig aros0 192.168.166.1
    sudo iptables -t nat -A POSTROUTING -o eth0 -s 192.168.166.0/2 -j MASQUERADE
    sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
fi
echo "Set your AROS config to:"
echo "  device        : tap.device"
echo "  IP            : 192.168.166.2"
echo "  Mask          : 255.255.255.0"
echo "  Gateway       : 192.168.166.1"
echo "  Primary DNS   : 8.8.4.4"
echo "  Secondary DNS : 208.67.222.222"

# change directory to AROS' SYS:
cd /home/apps/AROS/AROS-20190318-linux-armhf-system

# invoke AROS bootstrap
./Arch/linux/AROSBootstrap

# return to starting directory
cd $CWD


Then i have the following response to your remark:
Quote
.... even if i tried the dhcp one.
You should not use dhcp but use hard coded IP addresses in your AROS hosted setup.

The network addresses used in AROS hosted do not have anything to do with your local network or any other machines in your network.

The tap.device creates something that you could compare to a virtual internal network that is only used by AROS. If you have the routing setup correctly then all AROS network traffic is routed to your host machine and as such AROS uses you existing network infrastructure. You can access AROS by using the aros0 network interface (but that is only of concern when you are diving deep into the internals, e.g. as a normal user you usually do no use that directly and simply use existing network software).

So, when i use my script the network settings for AROS are actually echoe'd to the shell but because the script also  directly invoke AROSBootstrap executable these lines might not be visible long enough for you to read.

Bottom line is that the network settings and IP values that you should use in your AROS hosted network settings can be determined pretty easy from the script.
Code: [Select]
device        : tap.device"
IP            : 192.168.166.2"
Mask          : 255.255.255.0"
Gateway       : 192.168.166.1"
Primary DNS   : 8.8.4.4"
Secondary DNS : 208.67.222.222"

And thus those are the settings you should use in AROS network settings when using the script as shown.


As said before, Paolone's script uses a more sophisticated approach and Paolone statements let me believe that when you install Icaros Desktop hosted that all the network settings are configured automatically for you.

If that is not the case then you must change the settings manually and Paolone's script would then use other IP/Mask/gateway settings that do not correspond to what i have posted here (just now).

In the hope it helps and good luck !


paolone

  • Moderator
  • Legendary Member
  • *****
    • Posts: 568
    • Karma: +90/-0
Please


1. download Icaros manual if you can 't fin id in your icaros installation
http://www.icarosdesktop.com/icarosfiles/IcarosDesktop_manual.pdf

2. read chapter 1.2


3. read chapter 2.4

4. read chapter 10.1 and 10.2

have a nice day