Hacker News new | comments | show | ask | jobs | submit login
Booting a Modern Linux Desktop in Just ~200MB (phoronix.com)
44 points by Tsiolkovsky 1372 days ago | hide | past | web | 26 comments | favorite



Most modern distributions use initramfs. It usually contains a minimal shell and set of command-line tools (often Busybox-based).

In most distributions, initramfs's main responsibility is to figure out where the OS the user wants to run is installed, mount it, and hand off PID #1 to the init binary in the mounted FS.

The reason initramfs exists is to allow the logic to do this to be part of the distribution, not the kernel. That way, distributions can have arbitrarily complicated procedures for accomplishing the above tasks. Or even deviate from the standard "find, mount, exec" pattern described above entirely: For example, if you're creating a simple embedded system where space is at a premium and your system will only ever execute one program, you might be able to save some space by statically linking the program and saving it as 'init' in your initramfs. If you compile your own kernel, there's even an option to meld the kernel and initramfs into a single file.

On Ubuntu- (and AFAIK most Debian-like systems), a set of scripts in the initramfs-tools package is used to rebuild the initramfs when a new kernel version is installed, or manually upon user request. (The most common reason for manually running update-initramfs is adding kernel modules for drivers that are necessary to access the filesystem you want to use as root, e.g. LVM or NFS.)


200MB? that's a lot! there was a QNX demo that entered in a 1.44 MB floppy disk. I also built a proof of concept running Squeak over Linux within the same size: http://swain.webframe.org/squeak/floppy/


I don't know if I would call QNX a "modern desktop". 200MB is not a floppy, yes, but part of the value equation proposed here is how much you get, not just how little it costs you in space.


With QNX you get a RTOS. You get a higher level of reliability, dependability than with multitasking. You don't get that sort of reliability with some pre-packaged Linux distribution. You need to do some nontrivial kernel hacking to make Linux into a RTOS.

Why did Blackberry buy QNX?


I've got nothing against QNX, but I don't think RTOS is what a "modern linux desktop" is about.


Smalltalkers will tell you that Squeak is a very complete and cohesive environment. Also if you look at the demo scene thinking of 200MB is "obscene".


> the demo scene

Is divorced from any kind of practical reality, by definition.

Cease comparing apples to oranges. A sedan is bigger than a go-kart because a sedan isn't a go-kart.


I have never understood this type of backlash. I see it so often when discussing systems of reduced size (and sometimes reduced functionality). What is so offensive to you about small things? That you feel the need to make a comment like this? I don't get it.

If you want to use an OS that requires 7GB to install, you can. We won't hold it against you. And you can wax poetic about it.

But why is it that when someone wants to use a small system it causes people to make these sort of backlash comments?

The ironic thing here, with this example, is that demo scene actually accomplishes feats I have never seen done on larger systems. To use your analogy, the go-kart is able to do things, impressive things, the sedan doesn't do. Surely the sedan could, but it doesn't.


Why it is divorced? The demoscene is related to games who have more constraints (performance, assets compression) than a OS distribution. Also the QNX demo shows a real operating system in a mush reduced scale.


The interesting thing here really isn't the 200MB footprint (this fails to impress me), but rather union mounting. Seems like something that you could do some very neat things with, particularly if modified to allow unioning local and remote storage, using local as a sort of cache.

A union of, say, your $HOME and your dropbox account could be very neat.


Is this like the bind command in plan9, and is it available for Debian-based Linuxes?


Union filesystems in linux are like union mounts in plan9, if I understand it correctly. You should be able to get a union filesystem working on a debian-based system, though I have no personal experience with doing so.


I will have to check this out! I've been wishing for bind on other systems for a while now, but didn't think to check for it.


I'm not sure I understand what would make this different from simply making $HOME your Dropbox folder.


Presumably files would be saved only to disk and not synced to dropbox, unless they already existed in dropbox. Files that were in dropbox would appear alongside files that were not.

You would need some sort of utility to tell the union-ed filesystem that you want to kick a file or directory tree that is local onto dropbox, and perhaps vice versa.


Slitaz (http://www.slitaz.org/en/) claims to provide a fully featured Linux desktop environment in 35 Mb. (!92 Mb RAM) It uses LXDE and Openbox.

It has great internationalisation.

It has scary stuff that people should be careful of.

There are a few minimal Linux distributions - LFS; TinyCore, etc.

I'm not sure where TomsRtBt fits in the list anymore, but he crammed quite a lot onto a floppy disc.


We use SliTaz as the platform behind our bootable recovery CDs - it's incredible what their team has managed to accomplish. It's important to stress that this isn't another Knoppix or whatever: it's a complete distro. By that, I mean that they have their own package manager (tazpkg), build toolchain, package formats, etc - the whole shebang.

We were able to create our own "from-scratch" Linux live CD that weighed around 20MiB, but ended up going with SliTaz since having someone else maintain that for you is worth the extra 15MiB :)


from wikipedia: As of 2012 the tomsrtbt home page, though still faithful, has not been updated for years and is largely of historic interest. It comprises mostly broken links. tomsrtbt persists in mirror sites and is still useful for computers of its era.


Scary stuff?


Well, just everything runs as root all the time.


I have an "old" 2006 era laptop with all of 176 MB of RAM (oh, and 1000s of bad addresses, so it keeps segfaulting all the time). On this setup i use stock Ubuntu 7.10 (the last Ubuntu which "worked"). And its not stripped down or anything --- run firefox, emacs, beagle destkop search, watch movies, etc.

Seriously, if you have low hardware resources, pick a 5-7 years old distro and you'll be fine.


You will be fine as long as you don't want security updates.


er... 200 MB is pretty big. The fact that it looks like a feat is alarming!


It's a fair amount, but considering it has a more or less complete KDE desktop and Firefox, it's pretty interesting.


Yeah, I don't believe that the interesting part of SLAX is the small size (many distros have done this before, like Puppy linux, DSL, etc), but rather what they've managed to fit into it.

Shoehorning KDE4 into a 200mb distro is pretty impressive. I used SLAX a while back for a short period of time, and I might have to give it another go. Hopefully there's an easy way to remove KDE and add XFCE. Last I checked KDE desktop was checked as a dependency for nearly everything, which made switching DEs a real pain.


LFS mentions a 5MB working OS but the linked email seems to indicate it's really 10MB and stripped to the bare minimum.

http://linuxfromscratch.org/pipermail/lfs-support/2001-Octob...




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: