FlightAware Discussions

Anyone working with the new x86 Raspbian


#205
root# dpkg -i --ignore-depends=init-system-helpers,adduser,lighttpd dump1090-fa_3.6.3_i386.deb

(Reading database ... 673 files and directories currently installed.)
Preparing to unpack dump1090-fa_3.6.3_i386.deb ...
Unpacking dump1090-fa (3.6.3) over (3.6.3) ...
Setting up dump1090-fa (3.6.3) ...
adduser: `/usr/sbin/useradd -d /usr/share/dump1090-fa -g nobody -s /bin/false -u 100 dump1090' returned error code 1. Exiting.
dpkg: error processing package dump1090-fa (--install):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dump1090-fa
root# 


#206

Ok you can do the following:
Execute:

usr/sbin/useradd -d /usr/share/dump1090-fa -g nobody -s /bin/false -u 100 dump1090

And check what exactly the problem is.

Maybe the binary is just at the wrong location then you might be able to create a symlink.
Anyway it seems that this system was made to be used as a livesystem only and not really made to be comaptible with a package install system :frowning:


#207

While adapting/stripping Ubuntu Xanial to create Xenialpup, they have:

  1. Replaced Ubuntu’s “Synaptic Manager” by puppuy’s “Pet Package Manager”

  2. Removed apt and dpkg alongwith all their support infrastructure. I installed apt and dpkg and debhelper. I had to manually create and populate repository list /etc/apt/sources.list, but still neither apt-get install works, nor dpkg --install works unless workarounds are done.

Puppy-linux can be installed on USB flash or HD if a DVD is burned first and a PC is booted from DVD. The installed image has option to “change kernel”. I dont know what that means.

When I get time, I will burn a DVD, boot PC from DVD, then install xenialpup on a usb, then see if this gives any benefit in making & installing dump1090-fa. I will also explore what “change kernel” can do.


#208

Xenialpup update Jan 14, 2019

  • Succeeded to install & run dump1090-fa
  • Succeeded to install lighttpd
  • Failed to configure and start lighttpd

Reason:
In “puppyizing” the Ubuntu Xenial, they have severely damaged infrastructure for following. Even though I installed all the stripped-out packages & dependencies, following faild to work:

  1. apt-get
  2. dpkg and dpkg-buildpackage
  3. systemd - command starting with systemctl returned command not found
  4. Commands starting with service give service not found
  5. adduser - failed miserably, gives error.

PREPARATIONS

  1. Clicked “Install” Icon on Desktop, clicked tab “Install apllications” then:

    • Clicked “Choose an SFS file from official repo” and downloaded module devx_xenialpup_7.5.sfs

    • Chose “Load and unload sfs packages using SFS load” and loaded module devx_xenialpup_7.5.sfs

  2. Updated PPM repository

  3. Installed following packages

MAKE BINARY

root# git clone https://github.com/flightaware/dump1090.git
Cloning into 'dump1090'...
... .... ....
Resolving deltas: 100% (5573/5573), done.
Checking connectivity... done.

root# cd dump1090
root# make BLADERF=no

cc -DMODES_DUMP1090_VERSION=\"\" -DMODES_DUMP1090_VARIANT=\"dump1090-fa\" -DENABLE_RTLSDR -std=c11 -O2 -g -Wall -Werror -W -D_DEFAULT_SOURCE -I/usr/include/ -c dump1090.c -o dump1090.o
... ... ....
... ... ....
cc -g -o view1090 view1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o  -lpthread -lm -lrt -lncurses

TEST

root# cd dump1090
root# ./dump1090

Sun Jan 13 20:50:29 2019 +08  dump1090-fa  starting up.
rtlsdr: using device #0: Generic RTL2832U (Realtek, RTL2832UFA, SN 00000001)
Found Rafael Micro R820T tuner
rtlsdr: tuner gain set to 49.6 dB

CONFIGURE

configuration settings
Copied configuration settings from folder cloned from GitHub to xenialpup’s folder /etc/default/

cp ~/dump1090/debian/dump1090-fa.default /etc/default/dump1090-fa

Startup by init.d
Created a blank file
root# nano /etc/init.d/dump1090-fa

copy-pasted following code in it:

#!/bin/sh

# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh
set -e

# Must be a valid filename
NAME=dump1090-fa
PIDFILE=/var/run/$NAME.pid
#This is the command to be run, give the full pathname
DAEMON=/usr/bin/$NAME
DAEMON_OPTS=""

export PATH="${PATH:+$PATH:}/usr/sbin:/sbin:/user/bin:/bin"

# Read configuration variables file
[ -r /etc/default/$NAME ] && . /etc/default/$NAME

DAEMON_OPTS=" \
    $RECEIVER_OPTIONS \
    $DECODER_OPTIONS \
    $NET_OPTIONS \
    $JSON_OPTIONS \
    $PIAWARE_DUMP1090_LOCATION_OPTIONS \
    --write-json /run/dump1090-fa \
    --quiet " 


case "$1" in
  start)
        echo -n "Starting daemon: "$NAME
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON  -- $DAEMON_OPTS
        echo "."
	;;
  stop)
        echo -n "Stopping daemon: "$NAME
	start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
        echo "."
	;;
  restart)
        echo -n "Restarting daemon: "$NAME
	start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
	echo "."
	;;

  *)
	echo "Usage: "$1" {start|stop|restart}"
	exit 1
esac

exit 0

.
.

Made file dump1090-fa executeable and updated rc.d

chmod +x /etc/init.d/dump1090-fa

sudo update-rc.d dump1090-fa defaults

.
.
CLICK ON SCREENSHOT TO SEE LARGER SIZE
CLICK AGAIN TO SEE FULL SIZE

.

LIGHTTPD NOT WORKING

Installed from PPM
lighttpd_1.4.35

Added to startup
lighttpd -f /etc/lighttpd/lighttpd.conf

Fails, user www-data and group www-data dont exist
Tried to add manually using adduser and addgroup, gives error messages

Manually made entries in files /etc/passwd and /etc/group no success.
Xenialpup has its own Webserver “Hiawatha”, but I could not figure-out how to configure it for dump1090-fa.


#209

Details of Xenialpup’s Provided Web Server “Hiawatha”

https://en.wikipedia.org/wiki/Hiawatha_(web_server)

https://www.hiawatha-webserver.org/howto

Config file

root# cat /etc/hiawatha/hiawatha.conf

ServerId = webuser
ConnectionsTotal = 150
ConnectionsPerIP = 10
SystemLogfile = /var/log/hiawatha/system.log
GarbageLogfile = /var/log/hiawatha/garbage.log

Binding {
	Port = 80
	Interface = 127.0.0.1
}

Hostname = 127.0.0.1
WebsiteRoot = /root/Web-Server
StartFile = index.html
AccessLogfile = /var/log/hiawatha/access.log
ErrorLogfile = /var/log/hiawatha/error.log

#add this stuff to get a perl script working (pplog)...
#QUISP has a binary executable CGI named 'quisp.bin'...
MimetypeConfig = /etc/mime.types
#CGIhandler = /usr/bin/perl:pl
CGIextension = pl,bin
ExecuteCGI = yes
#QUISP puts %0D, %0A (carriage-return, line-feed) chars in the url
#(v128), to allow chars below ascii 32 need this...
SecureURL = no

.

List of files in folder /root/.packages/builtin_files/hiawatha

/etc/hiawatha/cgi-wrapper.conf
/etc/hiawatha/hiawatha.conf
/etc/hiawatha/httpd.confORIG
/etc/hiawatha/mimetype.conf
/etc/hiawatha/php-fcgi.conf
/root/Web-Server/hiawatha.htm
/root/Web-Server/index.html
/usr/bin/ssi-cgi
/usr/sbin/cgi-wrapper
/usr/sbin/hiawatha
/usr/sbin/hiawatha.run
/usr/sbin/newroot
/usr/sbin/php-fcgi
/usr/sbin/wigwam
/usr/share/doc/hiawatha.htm

#210

Any progress on integration of dump1090-fa/SkyView Map with Xenialpup’s webserver “Hiawatha”?


#211

@TomNJerry

This is the progress: :frowning_face: :rage:

spinny

.
.

UPDATE XENIALPUP - Jan 15

(1) Copied over folder public_html from cloned source to /usr/share/

root# mkdir  /usr/share/dump1090-fa
root# cp -r dump1090/public_html  /usr/share/dump1090-fa/html

.

(2) Downloaded rtl-sdr.rules from github/osmocom/rtl-sdr

root# wget -O  /etc/udev/rules.d/rtl-sdr.rules "https://raw.githubusercontent.com/osmocom/rtl-sdr/master/rtl-sdr.rules"

.

(3) Created missing directory /run/dump1090-fa

root# ls /run/dump1090-fa
ls: cannot access '/run/dump1090-fa': No such file or directory

root# mkdir /run/dump1090-fa

#After one minute:
root# ls /run/dump1090-fa
aircraft.json  history_91.json  receiver.json

.

(4) Modified /etc/hiawatha/hiawatha.conf. as shown in red rectangle in screenshot below:

CLICK ON SCREENSHOT TO SEE LARGER SIZE

.

(5) Opened Browser and loaded page localhost .
SkyView is there, but with perpetual spinning wheel :angry: :rage:

.
CLICK ON SCREENSHOT TO SEE LARGER SIZE
CLICK AGAIN TO SEE FULL SIZE


#212

You need the /data in the webserver root directory via an alias.
After short google i believe you need this line:
Alias = /data:/run/dump1090-fa

Also note that the run folder will need to be created again after restart.
I would recommend just using the dump1090-fa systemd service file, that creates a run directory i believe and takes care of starting.

The path to the service file is:

/lib/systemd/system/dump1090-fa.service

You just need to change the path in the ExecStart line. (or you copy the executable to where it normally is)
The rest should be good to go.
Basically you just create the file or copy it over from the git directory, it’s located in debian/dump1090-fa.service

then you run systemctl enable dump1090-fa so it is started automatically.

edit: why did the forum turn :angry: :rage: into :rage: :rage: when i quoted you? :slight_smile: curious.


#213

Yes I created a symlink for dump1090-fa/data by command ln -s /run/dump1090-fa /dump1090-fa/data, but did it not help. Thanks for alternate solution, I will now add Alias = /data:/run/dump1090-fa in the file /etc/hiawatha/hiawatha.conf and see.

.

Yes I know that, and will finally add command mkdir /run/dump1090-fa in the init file of dump1090-fa, so that this folder will be created at every boot.

I have already tried using systemd and file dump1090-fa.service by copying over dump1090-fa.service file from cloned source-code to /lib/systemd/system/dump1090-fa.service, but this did NOT work in Xenialpup as it lacks systemd, and any returns “systemctl: command not found” . For that reason I have created an init file `/etc/init.d/dump1090-fa (see post #204 ). Now the dump1090-fa is atarted at boot by this init script.


#214

Webservers will generally not follow symlinks for security reasons.

Oh right no systemd.
Loads of fun.


#215

THANK YOU.
That did the trick :smile:

CLICK ON SCREENSHOT TO SEE LARGER SIZE

.
.
.
CLICK ON SCREENSHOT TO SEE LARGER SIZE


#217

Such good work done by all in this thread and forum and enjoy your continuous contributions @abcd567. Was given two old HP laptops. Thinking they would be great vehicle for dedicated x86 Raspbian box running dmp1090 and piaware. Problem: can’t boot from USB on laptop so my x86 Raspbian stick is useless. Tried removing my laptop drive and cloning my PC drive…like you do when adding a new SSD to a pc. Won’t boot and error is as described on the web. Anyone know what kind of image can i put on laptop hardrive that will boot on laptop?


#218

To rephrase, anyone know how to get my x86 Raspbian bootable off the laptop drive.


#219

Xenialpup update Jan 17:

(1) Following funtion was added to file /etc/init.d/dump1090-fa

dir="/run/dump1090-fa"
if [[ ! -e $dir ]]; then
    mkdir $dir
fi

.

CLICK ON SCREENSHOT TO SEE LARGER SIZE


.

(2) In file /etc/hiawatha/hiawatha.conf :

following chunck of code:

#WebsiteRoot = /root/Web-Server
WebsiteRoot = /usr/share/dump1090-fa/html
Alias = /data:/run/dump1090-fa

was changed to:

WebsiteRoot = /root/Web-Server
Alias = /dump1090-fa:/usr/share/dump1090-fa/html

and a symlink named data was created in folder /usr/share/dump1090-fa/html

root# ln -s  /usr/share/dump1090-fa/data/ /run/dump1090-fa/

Reason for Symlink:
After restoring Website root to original, the Alias = /data:/run/dump1090-fa stopped working. Tried following Alias, but Hiawatha wont accept an Alias with path or trailing slash in left part:
Alias = /dump1090-fa/data: /run/dump1090-fa/
Creation of Symlink in folder /usr/share/dump1090-fa/html to /run/dump1090-fa solved the problem

.
CLICK ON SCREENSHOT TO SEE LARGER SIZE

.

(3) Made webserver automatically start at boot.

The webserver “Hiawatha” by default does not start at boot, and is to be started manually. To start it at boot, creating its init script file in folder /etc/init.d failed to start it at boot, although the init file was made executable, and updated rc.d defaults.

Finally succeeded by creating a Symlink to the hiawatha’s executable file in folder /root/Startup.

ln -s /usr/sbin/hiawatha /root/Startup

.
.
CLICK ON SCREENSHOT TO SEE LARGER SIZE

.
.

CLICK ON SCREENSHOT TO SEE LARGER SIZE