site  contact  subhomenews

NetworkManager 1.14.4 and container bug fixed

November 17, 2018 — BarryK

EasyOS testers have reported that after running an application in a container, say SeaMonkey, the Internet disconnects. Yes, exiting from the containerized-SeaMonkey (the "www" icon in top-middle of the screen), closes-down the container, and this terminates the instance of the 'dhcpcd' daemon that serviced that container, which empties file /etc/resolv.conf ...which kills the Internet.

/usr/local/easy_containers/ec-chroot is the container startup script, and it had this line in it:

       ip netns exec ${IFcont}ns dhcpcd -b ${IFcont} #-b background immediately

Where IFcont="www1" in the case of the www container. In a nutshell, what this does is run 'dhcpcd -b www1' in the network-namespace (www1ns) of the container, where "www1" is the name of the network interface.

What I did not think about, is dhcpcd also executes scripts in /lib/dhcpcd/dhcpcd-hooks, one of which writes to /etc/resolv.conf. When that instance of dhcpcd is killed, it again writes to /etc/resolv.conf, emptying it -- which removes the nameserver information. Hence, the Internet is now dead.

It probably doesn't need to run any of those hooks. The original 'dhcpcd' instance is the one responsible for managing /etc/resolv.conf, etc. But unsure, so changed the script so only disables two of the hooks:

       ip netns exec ${IFcont}ns dhcpcd -C resolv.conf -C wpa_supplicant -b ${IFcont}

...that now works, can kill a container, and still have Internet.

Easy 0.9.8 has NetworkManager 1.4.4, as this was the version in my fork of OpenEmbedded. That is about 1.5 years ago, though, and NM is a very active project. The latest stable is 1.14.4. So, I got NM 1.14.4 from OpenEmbedded upstream, put it into my 'oe-qky-src' fork:

https://github.com/bkauler/oe-qky-src/tree/master/sumo/meta-openembedded/meta-networking

NM 1.4.4 is configured to use the external 'wpa_supplicant' and 'dhcpcd' daemons. It could also have been configured to use 'dhclient'. However, it can be configured to use its own internal DHCP client.

For 1.14.4, I decided to go for the internal DHCP client. The configure options can be seen here:

https://github.com/bkauler/oe-qky-src/blob/master/quirky/meta-quirky/recipes-connectivity/networkmanager/networkmanager_1.14.4.bbappend

Working OK. 'dhcpcd' is still being used for the containers. 

Tags: easy

Xenialpup 7.5 running in EasyOS

November 15, 2018 — BarryK

Yay, have added another Puppy to the SFS repository! Racy Puppy 5.5 was already there. Now, if you click on the "sfsget" icon on the desktop, Xenialpup will be offered to download and run in a container.

Xenialpup is created by Puppy Forum member 666philb, see discussion here:

http://murga-linux.com/puppy/viewtopic.php?t=106479

To convert it into an SFS suitable to run in EasyOS, I opened up the ISO file and extracted the SFS file. Then extracted the contents of the SFS file to a folder, then ran the 'dir2sfs' script, as explained in this earlier blog post:

http://bkhome.org/news/201811/racy-puppy-running-in-container-in-easyos.html

Note however, the 'dir2sfs' in Easy 0.9.8 was not quite adequate. Some fixes were required, due to changes in woofCE. I will upload the latest 'dir2sfs' soon. I also want to apply the 'dir2sfs' script to a very recent pup (Xenialpup 7.5 is the latest official release on distrowatch.com, but was released in November 2017) -- the script might need some more tweaks.

It's online, so click the "sfsget" icon on the desktop, and Xenialpup is offered to download:

image1

Download, install, and there is a new icon on the desktop:

image2

...click on "xenialpup" icon, and desktop launches;

image3

...everything works!

One thing though, clicking the "install" icon runs the Puppy Package Manager, but first time it reported "already running" and quit, clicked the icon a second time, and the PPM launched. Dunno why.

Anyway, I installed 'gedit' from the Ubuntu DEB repository. Oh, had to update the package database first.

There are two great reasons for running Xenialpup in a container. Firstly, it is very locked-down, very secure. No access to the the hard drives, only '/shared-folder' is the means of reading/writing with the "outside world".

The second reason is binary compatibility with the Ubuntu Xenial Xerus (16.04) DEB repositories. So, if you want to run something that is not available in the very limited EasyOS package and SFS repositories, just run Xenialpup and browse the Ubuntu repos.

I also tested the Palemoon browser, the default in Xenialpup, and played a video at 720p at youtube.com. No problem there, and sound works.

Great fun! 

Tags: easy

EasyOS 0.9.8 released

November 14, 2018 — BarryK

This is a very exciting release, for a couple of reasons. Firstly, the move away from the traditional package manager to a manager based on SFS files and containers. Secondly, the new network manager.

For reference, you might like to browse the release notes for version 0.9.7, on October 14:

http://bkhome.org/news/201810/easyos-097-released.html

Version 0.9.8 is available courtesy of ibiblio.org:

http://distro.ibiblio.org/easyos/amd64/releases/pyro/0.9.8/

The download file is an image for writing to a USB flash stick. If uncertain how to do this, here is some guidance:

http://bkhome.org/easy/how-to-write-easyos-to-a-flash-drive.html

It is great for me that Linux development has become exciting again, as Easy evolves into something unique, powerful, and ...well, exciting. The special features with this release:

SFSget

The new preferred package manager is SFSget, introduced in a blog post a few days ago:

http://bkhome.org/news/201811/racy-puppy-running-in-container-in-easyos.html

After booting 0.9.8, click on the "sfsget" icon at top of screen, and have fun. You can download Racy Puppy and run it as a complete desktop, in its own container. There's more, such as Chromium and Firefox.

Currently, it is easy to create SFS packages for Puppy distros based on JWM and ROX-Filer. So, I intend to create some more... maybe XenialPup.

NetworkManager

I posted yesterday about ongoing issues with all of the network-connection managers in Easy, Quirky and the Puppy distros:

http://bkhome.org/news/201811/considering-networkmanager-for-easyos.html

When you boot 0.9.8, if an ethernet cable is plugged in, which gets to the Internet, then everything should be automatic. That is, nothing to do.

In the case of wifi, some configuration is required. Click the "connect" icon on the desktop, and a simple text-mode GUI, named 'nmtui', will display. This should do the trick, then connection should be automatic after that.

Note, if you want to see what wifi networks are available, in case the nmtui GUI doesn't show it, run this in a terminal:

# nmcli device wifi list

If no joy, try again:

# nmcli device wifi rescan
# nmcli device wifi list

You can also bring a wifi connection up and down:

# nmcli connection up id ssid 

...you have to substitute the appropriate ssid.

Bug fixes and warnings

0.9.8 is still considered beta-quality, even alpha-quality in a few places. As there are many changes under-the-hood, do not attempt to upgrade from an earlier version, treat this as a new installation.

At least one tester reported being unable to install Easy to the hard drive in a laptop, even though followed my instructions. I have not yet reviewed this, plan to do so soon.

Internet connection in a container, for wifi, was broken in 0.9.7. Fixed with a temporary workaround.

Note, if /etc/init.d/rc.networkmanager is changed to not-executable, then reboot, the old network managers are restored. Just in case you prefer them!

Feedback

EasyOS has a forum, I will start a 0.9.8 feedback thread here:

https://easyos.org/forum/

I am also still monitoring this thread in the Puppy Forum:

http://murga-linux.com/puppy/viewtopic.php?p=1009723#1009723

Further reading

For a quick overview of how and why EasyOS is different from other Linux distributions:

https://easyos.org/about/how-and-why-easyos-is-different.html

Documentation is here (will migrate to easyos.org one day):

http://bkhome.org/easy/

Have fun! 

Tags: easy

Considering NetworkManager for EasyOS

November 13, 2018 — BarryK

There are ongoing issues with Internet connection in EasyOS and Quirky. The pups also. We have lots of network and Internet connections apps -- in Easy there is Simple Network Setup, Frisbee, and the old Network Wizard. Puppy developers have created more, such as PeasyWiFi.

They all have problems. In Easy, there are ethernet and wifi issues -- the ethernet cable seeming to be not connected, wifi refusing sometimes to connect to my phone hotspot. Some of them have confusing UIs.

So, we get a situation where we think Internet is configured, then at next bootup it doesn't connect, and have to go through the setup again.

Darn, my baby laptop with Win10 connects and reconnects to the phone hotspot flawlessly.

I am playing with NetworkManager, and it is a very pleasant experience. This is the utility used in most of the mainline distros. It has a daemon, 'NetworkManager', and a cli app 'nmcli'. The daemon pretty much "just works" without any configuration, for ethernet anyway. Just start the daemon, that's it.

There is a tray applet, a different package, 'network-manager-applet', which does work, although I am uncomfortable with the number of dependencies.

The 'nmcli' utility could be used as the basis for our own custom GUI. For wireless, real easy:

# nmcli device wifi list
# nmcli device wifi connect <ssid> password <password>
Very keen to release Easy 0.9.8, to show off the new SFSget, however, might delay for a couple more days, throw out all the network connection apps, replace with NetworkManager. 

Tags: easy

Kernel 4.14.79 with ipvlan support

November 09, 2018 — BarryK

I posted earlier this year about configuring the kernel for veth and macvlan support:

http://bkhome.org/news/201701/kernel-4445-compiled.html

...though, I think that should have been the "4.14.45" kernel.

I posted earlier today about macvlan bridging into containers not working for wifi:

http://bkhome.org/news/201811/macvlan-bridge-does-not-work-for-wifi.html

So, started to experiment, but found that the Linux kernel is not configured to support ipvlan. CONFIG_IPVLAN is supposed to be enabled, but I had overlooked it, as it is not even listed as disabled in the .config file. How can I enable it, if it isn't even offered?

After a bit of research, discovered that something else has to be enabled, then CONFIG_IPVLAN appears and can be enabled. So, compiled the 4.14.79 kernel, with these changes:

Networking support
Networking options
[*] L3 master device support (CONFIG_NET_L3_MASTER_DEV)
Device drivers
Network device support
<*> IP-VLAN support (CONFIG_IPVLAN)

The kernel source, patches and build scripts, are here:

http://distro.ibiblio.org/easyos/source/kernel/4.14.79/

Tomorrow morning, planning to play with ipvlan! 

Tags: easy

Macvlan bridge does not work for wifi

November 09, 2018 — BarryK

I posted how EasyOS is using Macvlan bridge for Internet access in containers:

http://bkhome.org/news/201810/macvlan-bridge-in-easy-containers.html

However, testers have reported in the EasyOS Forum, that it does not work for wifi, only for ethernet. Yes, this page spells it out:

https://hicu.be/macvlan-vs-ipvlan

...it states that for wifi, Macvlan does not work, use Ipvlan. They recommend to definitely use Macvlan for ethernet.

Right, "back to the drawing board"!

For those who are using EasyOS right now, there is a fix. For the example of the "desk" container, open /mnt/wkg/containers/desk/configuration in a text editor, and change this line to "false":

EC_NS_UNSHARE_NETWORK='false'

This is theoretically slightly less secure, however, wifi should then work in the container. Do this before starting the container.

What I intend to look into this afternoon, is detect if interface is wifi then implement Ipvlan instead of Macvlan. That's the intention anyway...



Tags: easy

Racy Puppy running in container in EasyOS

November 03, 2018 — BarryK

This is very exciting. I have been working toward this for the last few weeks, and now it works. However, there are a lot of "loose ends" so probably several days away from the next release.

However, basically the concept works, hence this preliminary post to show it off. What we can do is run any Linux distribution in a container, and flip in and out of it, though it is easier to do with the Puppy distros.

Right, so choosing Racy Puppy 5.5 for the demonstration. This was a very popular pup, and still is. It is the big brother of Wary Puppy -- Wary uses the old kdrive Xvesa server, whereas Racy uses Xorg. Apart from the difference in X and xlibs, the rest is built from the same binary packages compiled in T2.

I grabbed the Racy 5.5 ISO and extracted the SFS file, then opened up the SFS file and copied all of it's contents to a folder, named 'racy_5.5-r0_i686' -- not sure if I remember correctly, but I think Racy requires a i686 CPU, whereas Wary a i486 CPU -- but not 100% certain on that. Then ran 'dir2sfs':

# dir2sfs racy_5.5-r0_i686

A snapshot of the main GUI window:

images

File 'racy_5.5-r0_i686.sfs', 'racy_5.5-r0_i686.specs' and 'racy.png' was created, that I uploaded to the new SFS repository:

http://distro.ibiblio.org/easyos/amd64/packages/sfs/puppy/t2/racy/

Next, click on the "sfsget" icon on the desktop (or run 'sfsget' in a terminal to see any errors), and the first window:

image

Next window:

images

...click the "INSTALL" button. Note, this is a very early version of 'sfsget', and is missing some functionality -- for example, doesn't yet have detection of already-installed SFS packages.

The SFS is downloaded, and a menu-entry and an icon created on the desktop:

image

...click on the "racy" icon, and hey-presto, Racy Puppy is running...

image

Well, that "hey presto" is a lie. I had to do a lot of manual fixes to get the desktop running nicely like you see in the above snapshot. The intention is to get all of those fixes automated over the next few days.

Racy runs very fast, can flip back and forth between the main desktop and the Racy desktop. Notice that the background wallpaper is now working -- that was a problem in the containerized desktop in easy 0.9.7 and earlier.

A comment: why would you want to run Racy inside EasyOS, instead of standalone? The answer is: security. Racy is very locked-down inside a container, very much mitigating any security weaknesses of the old software.

This is great fun. Unfortunately, I now have to eat and do other things, will continue developing it, well, what I am now calling EasyPak, tomorrow. 

Tags: easy

dir2sfs take-2

November 02, 2018 — BarryK

I posted recently about the new 'dir2sfs' utility for EasyOS:

http://bkhome.org/news/201810/dir2sfs-utility-for-sfs-package-manager.html

Much "water under the bridge" since then!

The "Puppy database format" is now abandoned, for SFS files anyway. The 'dir2sfs' utility is for anyone who wants to create and SFS file from a folder, and invocation would be in a terminal:

# dir2sfs <name of folder>

Which will bring up this window:

image1

...the Help button explains each of these modes. The "terminal" mode will create an icon on the desktop that will launch the container as a terminal window. The next window:

image2

...lots of fields, but pretty straight-forward and plenty of Help buttons. Note that the online URL is not specified, decided it is unwise to hard-code it. But, the folder-path at the URL is specified. Next Window:

image3

...actually, for 'devx' this is too locked-down. Haven't got into considering compiling inside a container yet. These snapshots are just illustrative of what the dir2sfs GUIs look like.

Finally, a SFS file is created. In the above example, it would be 'devx_0.9.7.1_amd64.sfs'. Container security and other settings are in the folder /.control inside the SFS file. The SFS file can be placed into the online repo, stay tuned!

Tags: easy