Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
LochNessMonster
Feb 3, 2005

I need about three fitty


So I finally found a use for my raspberry pi 1 (first gen with only 256mb). I turned into a docker device which now leaves me with a few questions.

I need ARM docker containers, otherwise they won't run on the rpi. I've got an arm alpine container, created by the makers of the docker rpi image.

Can I use arm containers to run x86 software (say nginx, dnsmasq, openvpn and maybe owncloud) or should I get ARM repositories for installing them in the containers too?

Not really an rpi question I guess, but maybe someone here tried to set stuff like this up before.

I realize I could just install raspbian and run the software on the rpi, but I want to get some hands on practise with docker so I figured this might be fun to do.

Adbot
ADBOT LOVES YOU

LochNessMonster
Feb 3, 2005

I need about three fitty


Hadlock posted:

There's a pirate themed group that does an ARM based docker solution for raspberry pi's. The big problem is that first gen pi is ARM 6 while most everything is built for arm7hf which is the A+ and B2 and higher. The big difference between arm 6 and arm 7 is... Something related to the GPU? I forget.

You can compile pretty much anything for armv6 that's on github though.

Pi 3 really is ideal though, it's 64 bit and arm7hf so drat near anything on x86 will compile for it. Docker technically will run on 32 bit, but only 64 bit is formally supported.

Source: actively converting our product to containers

The pirate group is Hyperiot, that's the image I'm using. It works perfect, even on a Pi 1. Hyperiot also made a few arm versions of popular images.

My question was more about installing software on containers from those arm images. I created an image based on hyperiot/rpi-alpine-scratch. Can I install all alpine packages on this image, or do I need specific arm versions of packages? And if so do you guys know arm repositories which are usefull?

I went ahead a installed nginx which is now up and running. I think the default alpine repo was used so that'd mean I don't need arm packages, right?

LochNessMonster
Feb 3, 2005

I need about three fitty


evil_bunnY posted:

The default arm repo


The default alpine repo might have arm packages. You can't run x86 inside arm containers. Docker is just a container, it doesn't do binary translation.

Ok, thanks for clearing that up, I had some sort of inceptionesque mind freeze here.

Next stop is seeing where to find alpine arm packages then!

LochNessMonster
Feb 3, 2005

I need about three fitty


Does anyone have experience with the USB hub from the pi hut? This one: https://thepihut.com/products/7-port-usb-hub-for-the-raspberry-pi?variant=789554361

I was thinking about getting a pi zero for in my garage. Hook it up to an old monitor/wifi dongle/keyboard/mouse I'm not using, so I have a really low budget internet station for if I need to look things up when working on my bike.

LochNessMonster
Feb 3, 2005

I need about three fitty


wolrah posted:

I'd use a Pi 3 for that. Browsing the web on a Pi zero is painful. The internet expects multi-core at this point. Plus that gains you built-in WiFi and a bluetooth chip which you could connect to a bluetooth OBD-2 dongle, wireless keyboard/mouse, audio system, etc.

As far as the hub goes aside from some supporting higher power charge modes for devices there really shouldn't be any meaningful difference between USB 2.0 hubs.

I figured that a zero might be pushing it. If I end up buying a Pi3 though, I'd probably swap it with my Pi1 which is running the Hypriot image and is serving as my docker host.

The Pi1 lacks bt, but I have a 2 dollar usb bt device somewhere in my spare parts box. I was hoping for a 10-15 dollar garage setup, not a 40-50 dollar one though.

Guess I gotta make up my mind. I'd also love to get a Pi running Kali and hook my awus wifi adapter up on it and do some scans at home.

LochNessMonster
Feb 3, 2005

I need about three fitty


Ok, so no zero or Pi1 for browsing, got it.

Another thing I'd love to give a shot some day is install some security camera's outside of my house and save the feeds on a disk

Would a puu zero be able to do that, or should I look at pi3 for that as well?

LochNessMonster
Feb 3, 2005

I need about three fitty


eschaton posted:

It's the OS that's running on the API that's providing virtual terminals, not the Pi.

Not sure if I understand what you're saying here. Which API do you mean?

LochNessMonster
Feb 3, 2005

I need about three fitty


Pyramid Scheme posted:

I've recently gotten into the Raspberry Pi and am slowly learning how to use them through online projects.

One thing I'd like to do is set up a wifi-less NAS physically separate to the rest of my hardware, then connect that by network cable to my a Pi 3 + USB 5ghz, which in turn would connect my wifi network. I'd like to NAS to show up on the network as if it were connecting directly rather than through the Pi relay.

I've Googled for this type of project, but haven't had much luck (likely because I'm not getting the right keywords). Has anyone seen a step by step for this sort of project? I'm only just learning Linux very, very slowly now, so would need a step by step guide.

That's certainly possible although I'm not sure why you would want NAS connectivity go through your Pi and WiFi. I'd connect the NAS to your router (over ethernet) if I were you. If you want your NAS in a seperate part of your network you can create it's own vlan.

LochNessMonster
Feb 3, 2005

I need about three fitty


Pyramid Scheme posted:

A quick Amazon search with the magic missing word "bridge" has unveiled a realm of handy products I always suspected existed, but didn't have the magic word for, nor the good sense to look harder. I've ordered as simple 5GHz bridge that sits in a socket and has a cable network point. I will now curl up in a ball of shame and embarrassment. Thanks all!

The only ways to find out are either asking for these things or accidenty running into them.

Both are usually "how the gently caress did I not know this existed" moments.

LochNessMonster
Feb 3, 2005

I need about three fitty


xtal posted:

You may need to specify the full path to the executable; cron runs in a more minimal context without loading bash_profile or anything like that. If that doesn't fix it then look at the output for the cronjob, which I believe is in /var/mail/yourname.

The cronjob is in /var/spool/cron/yourname and you are correct about specifying full path.

Log file can be found in /var/log/cron

LochNessMonster fucked around with this message at 21:48 on Mar 12, 2017

LochNessMonster
Feb 3, 2005

I need about three fitty


hooah posted:

In Raspbian it's in /var/spool/cron/crontabs/yourname (although I couldn't cd to /crontabs - not even with sudo, I could still sudo less the crontab).


Not in Raspbian :(

Ah, I'm not running Raspbian, guess Debian does it slightly different.

Check /var/log/syslog, apperently Debian logs cron mesaages to syslog by default.

LochNessMonster
Feb 3, 2005

I need about three fitty


I've noticed Raspbian does not have python3.6 in their stable repository. Does anyone know how the raspbian repository list works? I'm running the Jessie release (on an rpi1 model b), is there something like an unstable/experimental respository I can add to my apt sources.list?

LochNessMonster
Feb 3, 2005

I need about three fitty


Daztek posted:

You'll have to compile it yourself, dunno how well it'll work on a Pi1 though.

https://gist.github.com/dschep/24aa61672a2092246eaca2824400d37f

I'll stick with 3.4 then, cheers.

As for webservers, is nginx still the go to lightweight http server or is it as bloated as apache httpd these days?

LochNessMonster
Feb 3, 2005

I need about three fitty


I might in the future, so I'll keep that in mind, thanks!

edit: I noticed the raspbian repo currently uses nginx 1.6 which is a 3-4 year old release. I never really ran into problems of wanting to run more recent releases than my repos provided. What do I do, run a complete different distro with more up to date repositories? Are there distro's for the raspi that are more up to date, or should I just start compiling stuff I want myself (been ages since I did any of that and I vaguely remember lots of issues with make, make install and ./configure...)

LochNessMonster fucked around with this message at 18:31 on Jun 26, 2017

LochNessMonster
Feb 3, 2005

I need about three fitty


I was under the impression that normal repositories won't work on the raspi due to it having the armhf architecture instead of x86.

But that might be me mixing up docker container requirements for raspberry pi.

LochNessMonster
Feb 3, 2005

I need about three fitty


xtal posted:

Debian/Ubuntu repositories aren't tied to a specific architecture​, they can have x86 and ARM and MIPS etc

drat, I was making it way to complicated for myself. I already looked into software specific repos but couldn't find any architecture references. Problem solved.

LochNessMonster
Feb 3, 2005

I need about three fitty


Fuzz1111 posted:

This post is from a while back but the original Pi is definitely capable of this, because in my home I've used one to simultaneously record from 3 camera's without problems (I currently use a Beagle Bone Black for it but a Pi1 worked too).

Here's how you set up the Pi/BBB to do it:
  • Run something minimal as OS, raspbian booting to shell worked ok for Pi, and I use arch linux on the BBB.
  • Use OpenRTSP for dumping camera footage and just dump raw streams. Obviously you won't be re-encoding footage on the device but don't use OpenRTSP's options to put stuff into avi, mov or other containers either if you want to have usable footage when stream is ended unexpectedly (eg: someone rips the camera down). I use ffmpeg to convert footage to something usable and I do it on PC, but it can feasibly be done on Pi/BBB because it's not re-encoding anything, just putting the streams into a container. If anyone is interested I can post both windows and linux scripts for converting footage as well as the linux script I use to run OpenRTSP (it records in 4 hour blocks and loops, deleting old footage as it goes).
  • Don't record to same device that the OS is on - on Pi I used a USB drive, on BBB I use microSD because OS is on MMC.
  • If you are recording from multiple cameras onto one flash device you should record to separate partitions otherwise stuff will get horribly fragmented. This happens because OpenRTSP writes in 1 second blocks and the streams from different cameras end up interleaved, it starts off bad enough, and it will just get worse and worse after old footage is deleted and new footage is squeezed into the slots of space left (which the flash memory won't care about but seeing a 800mb file in thousands of fragments made me wonder if I might find the limits of what fat32 will put up with).
  • Be mindful of what else you use the Pi for because you can potentially lose footage if you tax its I/O at all (this is why I used a BBB - the ethernet and MMC do not share the USB2 bus, so I don't need to worry about ssh'ing in remotely to monitor cameras, review footage, etc).

For anyone wondering why the hell I used such a low powered device for this - it was so I could run camera's, Pi/BBB and switch from a very modest battery backup setup - a 12v 9ah SLA battery connected in parallel with a 3amp 13.4v power supply (the voltage needs to be between 13.4v and 13.8v to keep battery float charged, but 13.4v is still low enough that the 12v camera's and switch don't mind being connected directly, and the BBB is connected via the stepdown from a cheap USB car charger). The battery is capable of keeping things going without power for 8 hours - which is enough for my purposes - I just want to deter smartarses who switch the mains off before breaking in with cameras that are visibly still on and being accessed (I'm in australia and our electrical panels are outside).

Awesome post, thanks for that! Time to start looking into it again, I did some side projects in the meanwhile. What kinda cams did you use for your project?

LochNessMonster
Feb 3, 2005

I need about three fitty


Not sure if I should post this on the Linux thread but figured it might be something more people have run into.

I installed fail2ban with: sudo apt-get install fail2ban and tried to see if the rules were created properly and got this error:

code:
 
sudo iptables -L
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.9.28+/modules.dep.bin'
iptables v1.4.21: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Service seemed to be running, but you already see an authentication error.

code:
● fail2ban.service - LSB: Start/stop fail2ban
   Loaded: loaded (/etc/init.d/fail2ban)
   Active: active (running) since Mon 2017-08-21 12:03:46 UTC; 3s ago
  Process: 21947 ExecStop=/etc/init.d/fail2ban stop (code=exited, status=0/SUCCESS)
  Process: 21971 ExecStart=/etc/init.d/fail2ban start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/fail2ban.service
           └─21982 /usr/bin/python /usr/bin/fail2ban-server -b -s /var/run/fail2ban/fail2ban.sock -p /var/run/fail2ban/fail2ban.pid
This is the fail2ban log.

code:
2017-08-21 11:46:00,330 fail2ban.server [21773]: INFO    Changed logging target to /var/log/fail2ban.log for Fail2ban v0.8.13
2017-08-21 11:46:00,344 fail2ban.jail   [21773]: INFO    Creating new jail 'ssh'
2017-08-21 11:46:01,158 fail2ban.jail   [21773]: INFO    Jail 'ssh' uses pyinotify
2017-08-21 11:46:01,774 fail2ban.jail   [21773]: INFO    Initiated 'pyinotify' backend
2017-08-21 11:46:01,802 fail2ban.filter [21773]: INFO    Added logfile = /var/log/auth.log
2017-08-21 11:46:01,825 fail2ban.filter [21773]: INFO    Set maxRetry = 6
2017-08-21 11:46:01,858 fail2ban.filter [21773]: INFO    Set findtime = 600
2017-08-21 11:46:01,870 fail2ban.actions[21773]: INFO    Set banTime = 600
2017-08-21 11:46:03,334 fail2ban.jail   [21773]: INFO    Jail 'ssh' started
2017-08-21 11:46:03,946 fail2ban.actions.action[21773]: ERROR   iptables -N fail2ban-ssh
iptables -A fail2ban-ssh -j RETURN
iptables -I INPUT -p tcp -m multiport --dports ssh -j fail2ban-ssh returned 300
All packages are up to date; I'm running the lastest Raspbian version on an RPi (1) model b. Any ideas on how to troubleshoot this? I'm not sure what's exactly going wrong here.


edit: fixed it by upgrading the firmware with rpi-update.

LochNessMonster fucked around with this message at 14:20 on Aug 21, 2017

LochNessMonster
Feb 3, 2005

I need about three fitty


eightysixed posted:

:laugh:

Sometime's the easiest solution is the one that is stating you in the face. rpi-update also updates the kernel. Glad you got it fixed :cheers:

Before starting I already did a apt-get update/upgrade so I expected everything would already be up to date. I specifically checked the iptables package after that message and that was up to date.

I had no clue I needed to run rpi-update to update the kernel. I expected apt would've done that for me. :downs:

LochNessMonster
Feb 3, 2005

I need about three fitty


I was looking to introduce my 11 years old to a raspberry and python so we can make xmas lights that change colours and maybe create some images on a tft or led.

Any suggestions on tutorials?

LochNessMonster
Feb 3, 2005

I need about three fitty


evil_bunnY posted:

Use a micro controller instead?

Any suggestions on how to start a project like that without any experience on the subject?

LochNessMonster
Feb 3, 2005

I need about three fitty


I'll have a look at the NeoPixels and see if my 8 years old arduino still works. And start looking at some arduino tutorials since I've never used mine before. Good to have an excuse to start working with it after all those years.

Do we have an Arduino thread by any chance?

LochNessMonster
Feb 3, 2005

I need about three fitty


eddiewalker posted:

Just keep digging on the Adafruit site. They've got great tutorials starting from simple blinking lights up to more complex projects.

Once you understand the groundwork, it's very easy to copy and paste bits of code like Legos. I have no real coding knowledge and I get by.

I'm not too worried about the coding part, it's the complete lack of electronics background that's bothering me.

I've been going through some of the tutorials on adafruit and they seem to assume basic knowledge on working with an Arduino I still lack. So I started with the getting started guides on arduino.cc and I'm wondering if I didn't fry mine already.

LochNessMonster
Feb 3, 2005

I need about three fitty


what would be a good place to start reading on how to get an (ancient) arduino (mega 1280) working?

I ordered one 7-8 years ago and never used it. I tried to hook it up to my laptop this but I can't push any stuff to it. Getting some error messages that are occuring often according to google but the solutions for other folks don't seem to do the trick for me.

LochNessMonster
Feb 3, 2005

I need about three fitty


peepsalot posted:

cool error messages bro

also there's an arduino thread, since microcontrollers are pretty different from pi-likes.
https://forums.somethingawful.com/showthread.php?threadid=3505424

I was looking for an Arduino thread but couldn't find. I see it's in a different subforum, thanks!

LochNessMonster
Feb 3, 2005

I need about three fitty


KKKLIP ART posted:

This might be more of a linux general question, but I am trying to get my Pi 3 to auto mount to my FreeNAS box. I can get it to mount manually using the mount command in terminal, but everything I see to get it to automatically mount says to use fstab. I have no issue with that password being plaintext, because it is only internal, but can someone show me on what the fstab is supposed to look like because I've tried formatting it to how I see online and I keep getting errors.

Something like this:

code:
192.168.0.10:/fs/on/freenas    /media/freenas/    nfs    defaults    0 0 

LochNessMonster
Feb 3, 2005

I need about three fitty


I recieved the new model 3 and want to use it for Kodi. Do I need to get heatsinks for it or is that not really necessary? It's not in a case yet, but I'm looking to get one for it. Which cases are goon recommended, or should I just grab one from china?


edit: I'm seeing some aluminium cases with integrated heatsinks. Will that interfere with the wifi signal?

LochNessMonster fucked around with this message at 10:33 on Mar 28, 2018

LochNessMonster
Feb 3, 2005

I need about three fitty


22 Eargesplitten posted:

What are the pros and cons of Pi Hole on Docker vs straight through bash on Raspbian? Does the added layer of abstraction in the container help at all for security? I know I don’t want to advertise it externally, I want to try to keep it as secure as possible since it will be on my wired network.

Has anyone installed the Kodi 18 beta? It seems like it has better support for DRM-enabled media, so I’m going to run it and hope the stable version comes out soon. I also see it has a game emulator, anyone know how well it works?

Do any of those console-looking cases have power switches that plug into the GPIO header and give an actual shutdown / reset command? I know just hitting the power button on the cable can gently caress your SD card.

Did you order a new on or did you go for the original model B?

A little late to the party but my original model b did not run the pihole well. Each dns request took 2-3 seconds longer than without it so that killed the WAF (wife acceptence factor) so I disabled it and use that pi for other things now.

LochNessMonster
Feb 3, 2005

I need about three fitty


Skarsnik posted:

I've not had a corrupt card in years and years across the 4 pi I have running, all of them different models and all getting the power yanked regularly

Just don't cheap out on memory cards

Same. And my pi b (original) has been running 24/7 since I got it. That’s what, 5 years already? I should really replace it before it actually dies I guess.

LochNessMonster
Feb 3, 2005

I need about three fitty


Thanks Ants posted:

What an absolutely boneheaded move considering the makeup of the whole hacker/maker community. The state of Liz Upton's completely disingenuous responses as well, jfc.

I recall she has made some incredibly tone deaf statements in the past as well but can’t remember what that was about anymore.

Adbot
ADBOT LOVES YOU

LochNessMonster
Feb 3, 2005

I need about three fitty


Managed to get my hands on a Zero 2W. Apparently I once registered for an email notification from a vendor that's not listed on rpilocator (anymore, not sure how else I found out about this one?). I've been eying one for ages and ordered immediately when I saw the mail, but now I can't remember what I wanted to use it for...

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply