Post Al5GaJCdhc1pacSS9Y by thelastpsion@bitbang.social
 (DIR) More posts by thelastpsion@bitbang.social
 (DIR) Post #Al4VnijBPv3uflZbkG by thelastpsion@bitbang.social
       2024-08-17T22:26:40Z
       
       0 likes, 0 repeats
       
       Think I'm going to build a RPi 3 #Syncthing box tomorrow, just as a proof of concept for myself. I've got a spare SSD and a USB 2.0 caddy.My OS options are actually pretty similar to the VIA Eden box (#NetBSD, #AlpineLinux, #Slackware, #Debian, #VoidLinux), but I can also add #FreeBSD to the mix.FS on the SSD could be #ZFS or (if I use Linux) #btrfs, plus encryption.If it works well, I'll think about upgrades - RAID1 (or equivalent), different machine with SATA or USB 3.0, etc.
       
 (DIR) Post #Al5FZpkN7R9GHORgsy by thelastpsion@bitbang.social
       2024-08-18T06:59:35Z
       
       0 likes, 0 repeats
       
       After a quick bit of research (and as I want this running ASAP), I'm leaning towards #AlpineLinux. The RPi setup defaults to diskless mode, which minimises SD card usage. The only potential issue with this is that it loads the OS into RAM, so I need to make sure I've got enough to run everything.Hey, can't hurt to try, right?
       
 (DIR) Post #Al5GHWxUKqHSkYPuvw by phf@mastodon.sdf.org
       2024-08-18T07:07:28Z
       
       0 likes, 0 repeats
       
       @thelastpsion If all you're running is syncthing, I am pretty sure 1GB will be fine. Mine says 170M of 907M used in htop. So that leaves you 500+M for alpine. Can't imagine all of alpine taking nearly that much?
       
 (DIR) Post #Al5GaJCdhc1pacSS9Y by thelastpsion@bitbang.social
       2024-08-18T07:10:53Z
       
       0 likes, 0 repeats
       
       @phf Yeah, that's what I'm thinking.Hey, if it doesn't work, I'll set up an overlay to the SD card. Or, I'll just try something else!
       
 (DIR) Post #Al5OtolpMHqId7jLnc by thelastpsion@bitbang.social
       2024-08-18T08:44:02Z
       
       0 likes, 0 repeats
       
       Well, here's a fun one.I create a "syncthing" user on #AlpineLinux, which creates /home/syncthing. I then run `lbu commit -d` to save filesystem changes to the SD card.I then reboot... and /home/syncthing is gone.But my main user account's /home folder is fine.
       
 (DIR) Post #Al5RxInoSLt2VJ0ovQ by thelastpsion@bitbang.social
       2024-08-18T09:18:18Z
       
       0 likes, 0 repeats
       
       As things stand with a basic build, I'm liking the resource usage. 132MB RAM usage, including the RAM disk!Next steps are to create an encrypted partition on the SSD. As I *might* try this on a #BSD at a later date, I'm leaning towards #ZFS so that I can simply move the drive to another OS.#AlpineLinux #Syncthing
       
 (DIR) Post #Al5ZD4D9ApvlYuKIK0 by thelastpsion@bitbang.social
       2024-08-18T10:39:34Z
       
       0 likes, 0 repeats
       
       Turns out that diskless #AlpineLinux needs a bit more work to upgrade a kernel that's in the repos but no in the base system image. There's a handy tool for it, but not enough RAM for the RAM disk to hold an entire kernel, let alone build the correct files.I set up a second partition on the SD card and get update-kernel to run there (thanks to this page: https://wiki.alpinelinux.org/wiki/Raspberry_Pi_-_Upgrade_kernel_from_repos). Then copied the generated files to the root of the boot partition.So now to ZFS. But that poses a new problem.
       
 (DIR) Post #Al5aOszaoHf6CIBb8q by thelastpsion@bitbang.social
       2024-08-18T10:52:55Z
       
       0 likes, 0 repeats
       
       Again, diskless #AlpineLinux gets in our way, because the volume with the kernel modules (mounted at /.modloop) is read-only, so apk can't write to it.In fact, the Alpine wiki even says that diskless mode shouldn't be used if you want to use kernel modules, explicitly mentioning #ZFS.But there is a (very hacky) way... Create an overlay for modloop, manually put the module files in that, then get the overlay to mount at boot.https://lists.alpinelinux.org/~alpine/users/%3CCAEhkKgV-OdZ8y406_yynrH7tcxjgXkKzSc6dCSZ_a6CUPUfBiA@mail.gmail.com%3ESo that's what I'm going to try.
       
 (DIR) Post #Al5cTbYbGHEzTjwEbo by thelastpsion@bitbang.social
       2024-08-18T11:16:03Z
       
       0 likes, 0 repeats
       
       Hold on... #AlpineLinux's update-kernel tool actually has an option for adding kernel modules and firmware!```mount /dev/mmcblk0p2 /mnt/mkdir /mnt/tmpmkdir /mnt/bootTMPDIR=/mnt/tmp/ update-kernel -a aarch64 -f rpi -p zfs-rpi -M /mnt/boot```Copy the files in /mnt/boot over to the root of the SD card. Job done! I just need to pay attention at the next Alpine update to make sure I rebuild the kernel at the same time.This should really be in the wiki.#ZFS #diskless
       
 (DIR) Post #Al5nOasjRZxzQrATnk by doerk@nrw.social
       2024-08-18T13:18:31Z
       
       0 likes, 0 repeats
       
       @thelastpsion Definetely FreeBSD. You won’t regret it…
       
 (DIR) Post #Al5raq8YwylS2NfS4m by thelastpsion@bitbang.social
       2024-08-18T14:05:34Z
       
       0 likes, 0 repeats
       
       @doerk I've built it with Alpine for now, but I've gone with ZFS so I can try out FreeBSD in the future.I'm planning on rebuilding my main server soon. That's definitely going to be FreeBSD - I'm looking forward to playing with Jails!
       
 (DIR) Post #Al5sCEGWCkRXaJDXIO by thelastpsion@bitbang.social
       2024-08-18T14:12:19Z
       
       0 likes, 0 repeats
       
       Success! Encrypted dataset created on the USB-connected SATA SSD, #Syncthing setup with Receive Only shares, syncing from my desktop.Next I'll pair it with my other devices. Finally, I'll set up #sanoid for #ZFS snapshots.#RaspberryPi #AlpineLinux
       
 (DIR) Post #Al5sNnogMonf1tiRai by thelastpsion@bitbang.social
       2024-08-18T14:14:25Z
       
       0 likes, 0 repeats
       
       Success! Encrypted dataset created on the USB-connected SATA SSD, #Syncthing setup with Receive Only shares, syncing from my desktop.Next I'll pair it with my other devices. Finally, I'll set up #sanoid for #ZFS snapshots.(BTW: "DeathOfRats" is from my long-held tradition of naming my kit after Discworld characters. My server is Death, and this little box has been created while Death is, uh, "on holiday.")#RaspberryPi #AlpineLinux
       
 (DIR) Post #Al5sZll7qGq27jl53w by humanhorseshoes@mastodon.world
       2024-08-18T14:16:32Z
       
       0 likes, 0 repeats
       
       @thelastpsion Lol I am doing similar projects but more useless with a hacked Nintendo
       
 (DIR) Post #Al5wDFhGleQQ89TOxk by thelastpsion@bitbang.social
       2024-08-18T14:57:19Z
       
       0 likes, 0 repeats
       
       Look, it's adorable!
       
 (DIR) Post #Al5wGmamv4Mn1T7olU by thelastpsion@bitbang.social
       2024-08-18T14:57:58Z
       
       0 likes, 0 repeats
       
       @humanhorseshoes Whaaaa...?! Which Nintendo? Why? I must know!
       
 (DIR) Post #Al5zm9SyDyuWnw7N9k by phf@mastodon.sdf.org
       2024-08-18T15:37:11Z
       
       0 likes, 0 repeats
       
       @thelastpsion Totes adorbs. As we say in Germany. 🤔 😁
       
 (DIR) Post #Al60zhHDvefJNue89I by humanhorseshoes@mastodon.world
       2024-08-18T15:50:53Z
       
       0 likes, 0 repeats
       
       @thelastpsion I have a 2DXL with custom firmware and pretty much any game you could possibly imagine
       
 (DIR) Post #Al619Tkb4eEgKV394C by thelastpsion@bitbang.social
       2024-08-18T15:52:40Z
       
       0 likes, 0 repeats
       
       @phf "Ach, wie Suß, das Kerlchen ist!" 😂
       
 (DIR) Post #Al6AqlfzCZffxrbrdo by humanhorseshoes@mastodon.world
       2024-08-18T17:24:56Z
       
       0 likes, 0 repeats
       
       @thelastpsion Have managed to connect to an emulator on the mac and then through the AppleTV to play on the TV.  Not sure I can get the final piece of the puzzle, an external controller.  Nice to get a second life for something that had been bricked by Nintendo
       
 (DIR) Post #Al6AqmXVzYUOdsec4m by thelastpsion@bitbang.social
       2024-08-18T17:41:17Z
       
       0 likes, 0 repeats
       
       @humanhorseshoes That's such a good idea! I bet the power consumption would be really low, too.
       
 (DIR) Post #Al6Bf8eC4Orxgfn1vc by thelastpsion@bitbang.social
       2024-08-18T17:50:26Z
       
       0 likes, 0 repeats
       
       A few hours in and we're ticking along at about 50% RAM used on the RPi 3. The highest I've seen so far is 485 MB used. The largest app is #Syncthing.I haven't installed #sanoid yet, so that will take up a bit more space.I also need a lightweight but reliable notification system - high RAM usage, low storage space, ZFS issues, unscheduled shutdown, etc. If anyone has any suggestions, please fire away!#homelab #RaspberryPi #AlpineLinux
       
 (DIR) Post #Al6BosohmYADUBLxAW by thelastpsion@bitbang.social
       2024-08-18T17:52:11Z
       
       0 likes, 0 repeats
       
       A few hours in and we're ticking along at about 50% RAM used on the RPi 3. The highest I've seen so far is 485 MB used. The largest app is #Syncthing.I haven't installed #sanoid yet, so that will take up a bit more space.I also need a lightweight but reliable notification system - high RAM usage, low storage space, ZFS issues, unscheduled shutdown, etc. If anyone has any suggestions, please fire away!#homelab #RaspberryPi #AlpineLinux
       
 (DIR) Post #Al6C8WX6LJnSAIU5pY by socksinspace@sueden.social
       2024-08-18T17:55:42Z
       
       0 likes, 0 repeats
       
       @thelastpsion sanoid only gets called as a cronjob so it shouldn't make a difference for your steady-state ram usage :)
       
 (DIR) Post #Al6CAx9EMNQLHzTf5U by thelastpsion@bitbang.social
       2024-08-18T17:56:12Z
       
       0 likes, 0 repeats
       
       @socksinspace Ah, that's good to know!
       
 (DIR) Post #Al6KQM9CUg90niJqZk by humanhorseshoes@mastodon.world
       2024-08-18T19:28:35Z
       
       0 likes, 0 repeats
       
       @thelastpsion low overhead gaming
       
 (DIR) Post #Al8KaVekNqm1VIpu0u by thelastpsion@bitbang.social
       2024-08-19T18:39:51Z
       
       0 likes, 0 repeats
       
       Well, I was going to say that I'm going to spend this evening configuring #sanoid... But it took about 5 minutes, and I hadn't realised I'd done it!I got home from $dayjob today and decided to quickly get sanoid installed before dinner. I ran `apk add sanoid`, set the name of the dataset in the config file, and ran `lbu commit` to sync the ramdisk to the RPi3 SD card.I came back to it a few hours later to find that it had already taken 5 snapshots. Very pleased!#ZFS #AlpineLinux #syncthing
       
 (DIR) Post #Al8LK1a2XNn7XuKzT6 by thelastpsion@bitbang.social
       2024-08-19T18:48:03Z
       
       0 likes, 0 repeats
       
       I've got one more task ahead of me - alerts.I've found two handy blog posts that cover the sort of thing I'd like.1. "Simple Linux server alerts: Know your performance, errors, security, syslog, and security" using postfix, rsyslog, monit, sysstat and logwatch. https://nbailey.ca/post/simple-alerts/2. "How to get notified of newly connected devices on your OpenWRT router" uses @pushover for notifications. https://medium.com/@brandawg93/how-to-get-notified-of-newly-connected-devices-on-your-openwrt-router-e7cc4fcf3ad3
       
 (DIR) Post #Al8XIaaEcmW0ydVj5U by thelastpsion@bitbang.social
       2024-08-19T21:02:07Z
       
       0 likes, 0 repeats
       
       And now I have @pushover working with #rsyslog!I've just got very basic alerts at the moment: anything "err" or worse gets sent to me, with no filtering. I'm guessing the timestamp is wrong because there's no RTC attached to this RPi3, so it probably hasn't sync'd with an NTP server at this point.#homelab
       
 (DIR) Post #Al8XyXXKLKergp9dAG by thelastpsion@bitbang.social
       2024-08-19T21:09:52Z
       
       0 likes, 0 repeats
       
       And now I have @pushover working with #rsyslog!I've just got very basic alerts at the moment: anything "err" or worse gets sent to me, with no filtering. I'm guessing the timestamp is wrong because there's no RTC attached to this RPi3 (a tempting upgrade!), so it probably hasn't sync'd with an NTP server at this point.RAM usage (including ramdisk) is now between 480 and 520 MB.#homelab
       
 (DIR) Post #Al8YNTmhQjYpICEjlQ by thelastpsion@bitbang.social
       2024-08-19T21:13:01Z
       
       0 likes, 0 repeats
       
       And now I have @pushover working with #rsyslog!I've just got very basic alerts at the moment: anything "err" or worse gets sent to me, with no filtering. I'm guessing the timestamp is wrong because there's no RTC attached to this RPi3 (a tempting upgrade!), so it probably hasn't sync'd with an NTP server at this point.RAM usage (including ramdisk) is now between 480 and 520 MB.#homelab
       
 (DIR) Post #AlJjDFa4cWlAZzDOyG by thelastpsion@bitbang.social
       2024-08-25T06:37:36Z
       
       0 likes, 0 repeats
       
       Hmm, that's a worrying alert from my little Raspberry Pi Syncthing node.I switched off noatime on ZFS yesterday and rebooted it shortly after. It's been running for a few days beforehand without any issues.I haven't set up any low memory warnings yet. Trouble is, with a ramdisk, the more I install the less RAM there is.
       
 (DIR) Post #AlJkzuF2qbcoXb8zEu by thelastpsion@bitbang.social
       2024-08-25T06:57:37Z
       
       0 likes, 0 repeats
       
       Well, whatever happened, it's looking absolutely fine now. RAM is at 482 MB, Syncthing is running.I'll keep an eye on it.
       
 (DIR) Post #AlXYU1dHM1RIxYwwwS by mcepl@floss.social
       2024-08-31T22:32:15Z
       
       0 likes, 0 repeats
       
       @thelastpsion Concerning #MicroOS, https://github.com/syncthing/syncthing/blob/main/README-Docker.md works for me just fine.