5 ms·
They say it right in the header: "For a long time, we were unhappy with having to care about security issues and Linux distribution maintenance on our various
by leaveyou 9y ago
They say it right in the header:
"For a long time, we were unhappy with having to care about security issues and Linux distribution maintenance on our various Raspberry Pis."
- kiallmacinnes 9y agoYep - for home automation style stuff (which the author seems to have built it for - see the showcase section), having a full Linux distro is actually a real pain. I've taken to building my own stuff with the ESP series of microcontrollers, home made PCBs, etc - once it's built - it just keeps chugging along, unlike my original stuff I built atop RaspberryPis with Linux.
- alexose 9y agoI've done a lot of this sort of this as well. The ESP8266 is so great for simple on/off switches and sensors. But-- there are so many applications for having a full IoT Linux distribution that I can't believe this isn't already a solved problem. I'm imagining an ultra-stable distro that is easy to deploy to a headless machine, handles security updates, handles flaky wi-fi issues, tests the SD card (I've had more than a few burn out on me), and automatically logs to the cloud for easy debugging. In other words: Why am I still maintaining my RasPis as if they are apache servers from the 1990s?
- petra 9y agoAndroid-things solves this problem at the scale of embedded linux, and mbed solves this problem at the microcontroller level.
- alexose 9y agoI'm a wary of Android only in that I'm so used to the Raspian ecosystem, but I will check it out. Thanks for the recommend!
- halbritt 9y agoResinOS does all that and more. It's container-based. Works super-well on a Pi3.
- alexose 9y agoOh, this is awesome. Can't wait to try it. Thank you!
- justincormack 9y agoLinuxkit is another option, slightly different approach.
- boromi 9y agoThanks. Where would alpine linux fit into this all. It seems like a good candidate for embedded setups.
- halbritt 9y agoYou could run whatever you like in an alpine container on ResinOS
- nickpsecurity 9y agoPeople have been building stuff like this. Often for firewall appliances (eg SCC Sidewinder, Immunix Linux, genua w/ OpenBSD). They usually do one of these: (a) get big under new management that doesnt care about either security or the little people (enterprise focus); (b) sell out to company like that; (c) go bankrupt cuz market values assurance of security the least. Sad but true. There's still a few companies selling microkernel-based solutions in defense and mobile with Linux user-lands. They'd OEM license their stacks for a new set of products aimed to do this. They cost a fortune. Whoever pays it wont get it back, though, cuz folks dont usually pay for security in that volume. So, nobody is doing it for small players for now.
- dom96 9y agoWhat is it about Linux that doesn't keep your stuff chugging along?
- IshKebab 9y agoYou have to keep it up to date because of all the security issues in other apps that are installed. If the system only contains the Linux kernel and your software you only have to worry about your security issues (unavoidable) and Linux security issues (also difficult to avoid - too much work to write a new kernel too, plus remote Linux vulnerabilities are quite rare).
- dom96 9y agoSo why not just create a stripped down Linux distribution instead of reinventing the wheel and creating a new userland from scratch (with probably a few brand new and undiscovered security issues already)?
- secure 9y agoI tried: I have used debootstrap to create minimal Debian images in the past. A big part of the motivation for gokrazy is to use a safe, high-level programming language. This allows us to re-implement the userland with small amounts of code, see e.g. the NTP client at https://github.com/gokrazy/gokrazy/blob/master/cmd/ntp/ntp.go https://github.com/gokrazy/gokrazy/blob/master/cmd/ntp/ntp.g... Replacing the implementation language eliminates whole classes of attacks, while stripping down an existing Linux distribution can only go so far. Plus, it’s not clear to me how one would maintain such a stripped-down distribution in a way that isn’t a lot of effort.
- dom96 9y agoI still find this effort odd. You already have a well tested and widely used userland, even if it is written in a non memory safe language. The easiest solution to me seems to be to grab the tools you need from the existing userland, instead of reimplementing them in Go. Currently you have reimplemented some of the userland, and packaged it up into a distro. So you have to maintain a stripped down distribution and the tools that you reimplemented. If you just took existing tools you would only have to do the latter. Am I missing something here?
- elliotec 9y agoSo it’s like it’s own OS almost? What’s a userland?
- yoavm 9y agoYes, it's pretty much the OS except for the kernel.
- mulmen 9y agoUserland is the part of the OS that is not the kernel. It is the part you actually interact with. https://en.wikipedia.org/wiki/User_space https://en.wikipedia.org/wiki/User_space
- AYBABTME 9y agoIt's everything the kernel doesn't do. In general, that means the surface with which you interact as a user. So if you're used to using a terminal, your SSH connection, your Bash session, are all userland programs (that use kernel features to do things). You can think of it as kernel is a framework like Rails and userland stuff is developers using and expending the interfaces... sort of. When your computer runs headless, the init/process tree system is userland. Background (cron) jobs are userland, daemons are userland. Etc.
- candiodari 9y agoSo it's a distribution ? ... that will have security issues, require updates, distribution maintenance, and all that stuff they claim is unacceptable ?
- secure 9y agoIt’s not a full-blown distribution; it doesn’t distribute third-party software. Instead, it allows application authors to build their own distribution (at which point “appliance” is a more fitting word than “distribution”). Updates are easy to fully automate with gokrazy (and I’ve been using that mechanism for a year at this point) because assembling a new image and installing it over the network is just one simple command. New kernel and firmware versions are provided automatically once they are verified to boot on real hardware. There is no maintenance aspect in the actual installations (i.e. you don’t need to SSH into them, ran commands to update, etc.) — the root file system is read-only, and an update overwrites it completely. Unless the applications you want to use with gokrazy introduce state, gokrazy defaults to being stateless. Hope that clarifies things, let me know if you have further questions.