Raspbian Images

General Discussion

Raspbian Images

Postby jailbird » Tue Sep 19, 2017 6:52 pm

If NuTech doesn't mind, and if there's still a demand for it, I started building Raspbian Stretch images with Alarm Decoder setup for my own use, and I'd be glad to share them.

My fleet is using Raspberry Pi Zeros, so I'm trying to keep the image as tiny and lightweight as possible, and Docker sadly just doesn't fit into that theme :).
jailbird
newt
newt
 
Posts: 6
Joined: Fri Aug 25, 2017 5:03 pm

Re: Raspbian Images

Postby kevin » Wed Sep 20, 2017 10:37 am

Please send download link to our support email and we will take a look - thanks for your effort.
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Raspbian Images

Postby jeffwu » Wed Oct 04, 2017 12:53 pm

Ii am also very interested in running AD2PI in Pi zero W. I can sign up for testing if you look for a pilot tester.
jeffwu
Senior Nut
Senior Nut
 
Posts: 40
Joined: Fri Mar 17, 2017 6:24 pm

Re: Raspbian Images

Postby jailbird » Wed Oct 11, 2017 12:20 pm

Sorry for the delay guys. I was out of town for the day job, and then had a hell of a time getting caught up when I got back. I'm finally able to get back to work on this.

I just mention that my 2 Zero's (non-W model) are connected via Ethernet, but WiFi on the W should work. I have a spare W laying around I'll double check it on.

I'm sure NuTech will want me to reverse some of the changes I made first. I'll email them and double check. The changes off of the top of my head are:

- Things that make no sense to have installed (dmidecode, video4linux, etc) are removed
- I don't like swapping to MicroSD, so I replaced dphys-swapfile with a port of Ubuntu's zram-config package to enable ZRAM support. The idea is that idle processes get their memory compressed instead of swapped out. While compressed memory is slower then normal memory, it has to be a lot faster than writing/reading back from MicroSD!
- Since alarmdecoder doesn't normally use the system MTA always (unless you tell it to use 127.0.0.1), and since sendmail is kind of heavy, I replaced it with ssmtp, which is lighter and much easier to configure, especially for Gmail. This only affects local system mail and doesn't affect the app at all.
- I replaced OpenSSH by TinySSH as part of my effort to lower RAM usage. Since TinySSH only supports SSH keys, the image comes with TinySSH disabled and Dropbear enabled. You login, add your key, enable TinySSH and remove Dropbear. [This is one thing I'm sure NuTech will want backed out]
- Since I'm a purist, I moved ser2sock to /usr/local/etc/ser2sock and /usr/local/bin/ser2sock. I updated the alarmdecoder-webapp code for this, and I also symlinked /usr/local/etc/ser2sock -> /etc/ser2sock for people used to the old location. [I'm sure they'll want this backed out too]
- Because of the various botnets trying to bruteforce 'pi' accounts, one of the first things I do on a Raspbian install is login, create a new user for me, and remove the 'pi' user. The stock alarmdecoder images, however, have the stack run under 'pi' which makes this harder. In my image I moved the stack to run under a dedicated 'alarmdecoder' user, as to me that is cleaner and makes it more obvious which running processes are part of the stack and which are user-ran. But that's a personal thing [They'll probably want this backed out too]
- config.txt disables all things that aren't normally needed (i2c, i2s, spi, audio, camera), sets GPU RAM to minimal to free up system RAM, and has the settings to swap the UARTs on a Pi3/Zero W ready (but commented-out).
- One rare case where I added something. Under heavy load of HTTPS traffic or encrypted ser2sock traffic, it's possible to run the entropy pool behind /dev/random out, which will cause traffic to block until the pool can be built back up. I installed the 'rng-tools' package and enabled the 'rngd' service. What happens is if the entropy gets too low, rngd will feed data from the HW RNG built into the Broadcom CPU on the Pi into the kernel's PRNG. The PRNG will take that data and 'stir' it into the entropy pool, allowing it to rebuild the pool faster.

That's all off of the top of my head. I'll get with support to see what they want changed.
jailbird
newt
newt
 
Posts: 6
Joined: Fri Aug 25, 2017 5:03 pm

Re: Raspbian Images

Postby jeffwu » Mon Oct 16, 2017 4:18 pm

many cases people run zero W headless. presumbably adding a pre-config wpa_supplicant.conf and ssh files to /boot partition would allow WIFI and SSH, correct? if not, can you include that in your image test case. out of box Raspbian supports these files.

I have a spare Zero W too (no pin soldered yet). I can make it ready and test your image once it is available to d/l it.

thanks again for this work

Jeff
jeffwu
Senior Nut
Senior Nut
 
Posts: 40
Joined: Fri Mar 17, 2017 6:24 pm

Re: Raspbian Images

Postby jailbird » Mon Oct 16, 2017 4:26 pm

jeffwu wrote:many cases people run zero W headless. presumbably adding a pre-config wpa_supplicant.conf and ssh files to /boot partition would allow WIFI and SSH, correct? if not, can you include that in your image test case. out of box Raspbian supports these files.

I have a spare Zero W too (no pin soldered yet). I can make it ready and test your image once it is available to d/l it.

thanks again for this work


It's based off of Raspbian, so those files should work as-is. I'll verify it though.
jailbird
newt
newt
 
Posts: 6
Joined: Fri Aug 25, 2017 5:03 pm

Re: Raspbian Images

Postby jensen18 » Mon Feb 05, 2018 5:53 pm

Any update on this? I'm trying to build a device with a R Pi Zero W but keep getting errors trying to install the docker image. If there is a image I can load that has everything pretty much configured, I'd love to skip all the frustration.
jensen18
newt
newt
 
Posts: 6
Joined: Sun Feb 04, 2018 4:06 pm


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests

cron