Kodi Community Forum

Full Version: 32bit distro for old atom netbook (advanced users only)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello everyone.

A couple of years ago, someone abandoned a dell mini 9 netbook (atom n270) at my place. It had a broken 8gb pci-e ssd which was identified by its bios as a 0byte drive. I decided not to buy a new one but revive it by installing a distro on a 8gb flash drive, boot from there and use it only for kodi. Back then, openelec was the obvious choice for the job, so I installed openelec 5.0.8 in it and it works until today. Sadly openelec dropped support for 32bit on version 6, so I am stuck with 5.0.8 and kodi 14.2 since then.

Because kodi advances and so do its addons (twitch stopped working last year, youtube has a backported version for 14.2), I decided to somehow install something else to it so as to have kodi 16 at least. Despite of what many may think, the options are very few, so let me explain why from the point of an advanced linux user and how they compare to a jeos like openelec

1) Size. Kodibuntu, and any major distro, is 3+gb after installation when openelec is the 1/5 of that at best. So, starting with something minimal (command line only or network installation) is mandatory. However, even distros like debian or arch with cli only are ~800-1Gb in size. The smallest one I found is alpine linux, but it has other issues, so I rejected it. One major factor for it is that openelec lacks a package manager and whatever it brings along, eg gcc libs.
2) Ease of connectivity. Openelec has service.openelec.settings which uses connman to connect to wireless, wired etc from within kodi. Geexbox has a similar addon which uses connman too. The rest of the distros have nothing at all. Kodi used to have a similar addon that used network manager, but its development stopped years ago. The only solution to it is to drop to a tty and use nmtui/connman/wicd-curses to connect to the network.

These are the 2 major issues I remember now. Installation and configuration of stuff like ssh and samba, using kodi as a session, autologin etc are also in the list, but I can solve them on my own, I have the required knowledge to do so.

Distros tested and rejected already
- alpine: connectivity issues. The wired and wireless cards are picked neither by network manager, nor connman. In fact, the only way I can make them work is via command line only (iwconfig etc)
- tinycore: does not package kodi for 32bit version Sad
- debian: size
- arch: size and drop of (official) 32bit support as of November 2017
- geexbox: annoying bugs and non persistent installation even when you select to install to disk!

Please share your thoughts Smile
What video card does this box have? If it's the "standard gpu" - I would really not waste my time as you cannot play any nowdays videos. 720p h264 profile 3.0 baseline might work.

You can easily go with a Ubuntu 32 bit version and install kodi ontop of it. Here I'd suggest going with 16.04 - as newer versions already use wayland.

Just try that: Xubuntu 16.04 for 32 bit - add kodi ppa, install it, disable dithering (in settings) and try what you get.
It has an intel 945. I know it maxes out at 720p, which play at ~75+ cpu usage for h264, and I am not interested in anything more than that because I know its capabilities first hand. 
Code:
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GSE Express Integrated Graphics Controller (rev 03)
Btw, where is that dithering option?

An ordinary (x)ubuntu installation contains enough bloat to be twice the size of debian. Even a network installation of ubuntu is like 50% bigger compared to the same one of debian because of that bloat! Xfce, network manager, apps like browsers. messengers, pulseaudio linux-headers, plymouth etc are all bloat for the thing I want to achieve.
That's why I say "advanced users" in the title. Installing ubuntu/debian/arch/whatever from network installation media to get a command line only system and then install only what is needed to an xorg session with kodi is easy for me, solving the 2 major issues above is not. In fact, my os is exactly that: a debian network installation that led to command line only and then I installed xorg, openbox, firefox, chromium, kodi, themes, fonts etc.
There is a guide in this forum that installs a minimal openbox based kodi installation. You can easily use that guide started with a 32 bit image. No bloat what's ever will be installed.
Do you mean this? That is a real minimal installation with only the needed stuff installed, or at least a concept of it. I would not install git (not mentioned anywhere apart from the installation), openbox (kodi can run as a standalone session and it is really pointless to have it if it also starts as a service), avahi (no need for zeroconf stuff here) and some more. 

https://forum.kodi.tv/showthread.php?tid=231955

Anyway, I will try it in a vm and do the same with debian to show the difference in installed size and resource consumption.
Just leave them out.
Any thoughts on problem #2?
Use connman and use it's DBUS API in a kodi addon.
In which kodi addon? I don't think there is one, either official or third party.

One more thing. I HATE network manager and I will only use it if there is no other solution. The reason is it can not keep static ip configurations and this is a known bug that is yet to be fixed. Last time I encoutered it was back in 2010 at a friend's laptop and, after reading arch wiki, I found out that the bug remains unsolved 7 YEARS later.
Reasons for static ip: ssh and kore (the android remote control app)
You have to write the addon. But it's not really hard. The dbus connman API is quite simple. As an expert I think you are done with it in half a day.
Sorry, I do not do programming because I am really bad at it :(
why do you need to control networking via kodi? Is it not enough to configure it once via shell/ssh and by done with it?
No need for network-manager either, just put your static IP in /etc/network/interfaces (on ubuntu/debian)
Good morning and merry christmas.

@wsnipex
Because kodi is the "desktop enviroment" in that case. There will be no gnome/kde/xfce/whatever with a nifty tray app, usually a frontend for network manager, to configure the network. As I said, openelec, libreelec and geexbox have their own kodi addon that uses connman in the background for the job. 
I would put the network configuration in /etc/network/interfaces, if it was not for a wireless connection that I will have to configure again when I move the netbook to a different network. Plus, setting up a wireless connection via cli only is a pain in the...

I completed the 2 "as minimal as possible linux installations plus kodi" of debian and ubuntu and I will post the results later in the day or tomorrow. Both are network/server installation +xorg +kodi +nodm +samba + ssh +some trivial stuff I need (htop, nano, pastebinit etc). There will also be a comparison between the disk space they occupy vs the space openelec and alpine do.
So here are the results by numbers, what df -h and free -m outputs in every distro.

Ubuntu, with 1.5+gb disk udage
Code:
Filesystem      Size  Used Avail Use% Mounted on
udev            482M     0  482M   0% /dev
tmpfs           100M  4.8M   96M   5% /run
/dev/sda1       6.8G  1.6G  4.9G  25% /
tmpfs           500M  4.0K  500M   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           500M     0  500M   0% /sys/fs/cgroup
tmpfs           100M     0  100M   0% /run/user/1000

              total        used        free      shared  buff/cache   available
Mem:            999         169         430           4         398         676
Swap:          1021           0        1021

Debian, a bit smaller
Code:
Filesystem      Size  Used Avail Use% Mounted on
udev            501M     0  501M   0% /dev
tmpfs           101M  3.6M   97M   4% /run
/dev/sda1       6.9G  1.1G  5.4G  17% /
tmpfs           503M     0  503M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           503M     0  503M   0% /sys/fs/cgroup
tmpfs           101M     0  101M   0% /run/user/1000
tmpfs           101M     0  101M   0% /run/user/0

              total        used        free      shared  buff/cache   available
Mem:           1005         224         561           3         219         640
Swap:          1021           0        1021

Alpine, even smaller than the other 2
Code:
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs         10M     0   10M   0% /dev
shm             505M     0  505M   0% /dev/shm
/dev/sda3       5.8G  706M  4.8G  13% /
tmpfs           101M  268K  101M   1% /run
cgroup_root      10M     0   10M   0% /sys/fs/cgroup
/dev/sda1        93M   17M   70M  19% /boot

             total       used       free     shared    buffers     cached
Mem:          1008        216        792          0          8        125
-/+ buffers/cache:         82        925
Swap:         2015          0       2015

And openelec, waaaay smaller than the rest
Code:
Filesystem                Size      Used Available Use% Mounted on
devtmpfs               1001.7M    134.9M    866.8M  13% /dev
/dev/sda1               230.4M    144.3M     82.1M  64% /flash
/dev/sda2                 7.0G    251.6M      6.7G   4% /storage
/dev/loop0              134.9M    134.9M         0 100% /
tmpfs                  1003.0M         0   1003.0M   0% /dev/shm
tmpfs                  1003.0M      5.9M    997.1M   1% /run
tmpfs                  1003.0M         0   1003.0M   0% /sys/fs/cgroup
tmpfs                  1003.0M      8.0K   1002.9M   0% /tmp
tmpfs                  1003.0M    240.0K   1002.7M   0% /var

# free -m
             total         used         free       shared      buffers
Mem:           989          325          664           18           53
-/+ buffers:                272          717
Swap:            0            0            0

Notes for the differences between them
- Openelec, being already installed, preconfigured and running for 2+ years now, is excluded from the below comments, unless noted. That is also the reason it has ~250MB used in its /storage partition.
- All distros were tested on a virtual machine with 8gb of storage space and 1gb of ram. This is the closest I can get to the netbook's hardware. 
- Alpine has kodi installed from its main repo, debian has it from deb-multimedia and ubuntu has it from team-xbmc's ppa.
- Debian and alpine run kodi as root, which is the only user in the system. Ubuntu runs kodi as the regular user jim, which is also the only user in the system, but is sudo capable.
- All distros, run a clean, stock kodi 17.6, with default/first-run configuration and as a session (kodi-standalone). 
- Debian and ubuntu autologin to kodi-standalone via nodm (a display manager that autologins to a predefined session).
- Alpine autologins to tty via inittab and agetty and executes kodi-standalone via .xinitrc when startx is run. It is the same thing as above, but alpine does not have nodm as package, so I had to find a workaround.
- All distros have samba and ssh installed and running. Neither of them is configured though, e.g there are no shares for samba and root is not allowed to login via ssh. Openelec, being preconfigured, has them both enabled and configured properly.
- Because there is no solution to problem #2 as it seems, no easy-network-configuration app was installed (network manager or wicd or connman) to every distro.
- Package manager caches were cleaned on debian and ubuntu so as to save space. Alpine's package manager clean its cache by itself. Old kernels were also removed and apt (on debian and ubuntu) was configured to NOT install recommended and suggested packages to save more space.
- Oddly enough, ram usage was almost the same on all distros. But I could be wrong on that.

To sum up, I think debian might be the solution, provided that I can get it to install in 800MB or less. Please share any thoughts or questions.
I came accross this a few minutes ago. It seems someone "patched" that network manager kodi addon by increasing its xbmc.python version to 2.19 so as to make it installable for newer versions of kodi.

https://github.com/vikjon0/script.linux.nm

It installs as usual, either via git clone inside .kodi/addons/ or via downloading as zip and installing from addon manager, but it also needs the python bindings for dbus to work (package python-dbus for debian and ubuntu and py-dbus for alpine). However, its limitations are discouraging for the (advanced) user
Code:
#    Limitations: 
#    One wifi card only (?)
#    Only wifi for now
#    only ipv4
#    Only dhcp
#    Does not display enterprise/group enncryptions

I know it can a static ip via dhcp binding from my router, but my isp's router is kinda shitty at that task.
Pages: 1 2