Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Google's self-driving cars run a modified Ubuntu. Or did, last time they talked about it.

https://www.youtube.com/watch?v=7Yd9Ij0INX0



I'm sure anything embedded is almost nothing like the pre-modified stock. The few paper I've read from embedded people is that they know how and will strip everything down until things are like they need.


"strip everything down" consists in removing packages, especially daemons, you don't need.

You don't (want to) make huge changes to the kernel and libraries codebase tho, even if the changes are meant to remove code you don't need, because testing a heavily modified OS gets prohibitively expensive.

Especially on "modern" embedded from the last 10 years were RAM and storage are not that limited.


Ubuntu and Centos come pretty naked; what would you strip and why?

Im asking because I run few instances with very heavy traffic and have no issues whatsoever. Just added nano and fail2ban and it runs with no issues for about 2 years now.


Any kernel module that's not required (wifi, graphics, sound, USB, etc depending on application), any security system like selinux, any unnecessary libraries, helper utilities, etc etc.

Basically you rip out anything not strictly required for the task at hand.

Running on embedded hardware is quite different from running on server hardware, disk space and memory are measured in megabytes, not gigabytes...


I once ran an "embedded" Linux on a $10 marvel SOC. It was a pretty vanilla kernel running a basic Debian install. 10MB out of 128MB RAM used most of the time.

Obviously you can go much slimmer, but a $10 board is surprisingly capable.


Not necessarily. I'm working with B&R's range of industrial controllers at the moment, which are Atom processors with a few hundred Mb of RAM and CF cards up to 32Gb, but still running a traditional RTOS with hard timing guarantees. They have built-in web servers and (basic) web browsers...!


Those two, particularly Ubuntu, are the opposite of naked. Try something like Arch.


Arch? Arch ships packages with debug symbols and docs included, and takes over a hundred MB for just a base install! Alpine is way smaller; base image under 10MB, packages broken apart so you only get binaries unless you ask for more, linked with musl to make it even smaller.

EDIT: This is meant to be a bit tongue-in-cheek, but I seriously do prefer Alpine over literally every other Linux distro I've yet seen for minimalism. Also geared towards embedded-type work.


Fair enough, and you're quite right about Alpine being geared more for embedded. For general use I find Alpine a bit of a pain due to lack of systemd (bring on the hate ;)), and of course lack of docs hurts usability a bit. With regard to debug symbols, I like what Redhat and Debian are doing with an embedded build id linking binaries to separate debug packages.


yeah come on, don't bring Alpine in the mix, we were talking about Ubuntu, not DamnSmallLinux. Alpine is great, no doubt, but it's in a class of its own.


Ubuntu is certainly not known as a lightweight distro.


That's because "lightweight" to Linux nerds is more like "weight of light" than "light of weight".


The Ubuntu message of the day when you log in on a shell runs curl to feed in advertisements. Pretty big attack surface.


? I’ve never seen that. Since what version?





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: