Node OS Review – Ultra-minimal Linux Distribution With Node.js/JavaScript Userspace

Introduction

The Project has started in 2013 as “the first operating system powered by npm” with the main goal to build OS with truly community driven. Node OS use npm (Node Package Manager) as default system package manager and Node Shell. Any npm package can be used in NodeOS. PID1 is REPL that help to run Java Script code in interactive mode. Future plans – Web-interface and integrated web-server with proxy. NodeOS can be used on:

  • real hardware – PC, servers, laptops
  • virtual machines – Qemu, Virtualbox
  • clouds – like an Amazon or Rackspace
  • containers – Docker and vagga
  • PaaS

Installation and running

Node OS releases can be downloaded here: images for x86 & x86_64 architectures and ready builds for Qemu & Vagga. Some impressive detail – size of image is ~40 MB. Source code is available.

Run Node OS with Qemu:

$ wget -c https://github.com/NodeOS/NodeOS/releases/download/2015-11-27/x86_64-pc_qemu.zip && unzip x86_64-pc_qemu.zip
$./run.sh

// or
$ qemu-kvm -vga std -m 256M -redir tcp:50080::80 -redir tcp:50443::443 --initrd initramfs -hda usersfs -append  "root=/dev/sda ip=dhcp vga=0x344

And it works:

Run Node OS with Docker:

// install Docker
# apt-get install docker
// or
# dnf install docker

// run Node OS
# docker run -i -t nodeos/nodeos

Tech details

Node OS doesn’t have a superuser, default user nodeos has the password nodeos. Every user has access only to his isolated environment. The root file-system is default in only ready-mode, all session data written in tmpfs. NSH (Node Shell) can run the classic Unix commands: ls, cat, cd, pwd and others:

The Node OS has the four general layers:

  • barebones – custom Linux kernel
  • initramfs – “Init RAM file-system” – archive of initial filesystem that load into memory during the Linux OS boot
  • rootfs – default read-only partition
  • usersfs – multi-user environments and data

After running in Qemu we can see the system logs in the browser:

With Node package manager can be installed any available package for Node.js:

# npm install -g bin-ncurl
/bin/ncurl --> /lib/node-modules/bin-ncurl/ncurl.js

# ncurl google.com
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.com.ua/?gfe_rd=cr&amp;ei=5qFYVrK3NuKk8wfUhKWoAw">here</A>.
</BODY></HTML>

Slap – a Sublime-like terminal-based text editor written in JavaScript:

Resume

Node OS is an very interested minimal Linux distribution with non-typical environment. You can run this OS for Node.js application or deploy it in the small ~40 MB containers without standard and big Linux distribution. Planned features like a web-interface and build for Rapsberry Pi may extend the Node OS
appliance.

Read more:

20 Years of GIMP Evolution: Step by Step

Github’s Atom vs Microsoft’s Visual Studio Code: Comparison, Review and Voting

File-System Benchmarks on USB Flash: VFAT vs NTFS vs HFS+ vs Ext2 vs Ext4 vs F2FS vs Btrfs vs XFS

Top 40 of The Best Quotes of Linus Torvalds: Money, Hardware, Source Code And Most Important Things For All

  • Michael_Sw

    Fascinating! Thanks for bringing this to my attention.

  • Jesús Leganés Combarro

    Thank you for the review of my project! Very extensive! 😀

    • Paul Alberto Rufous

      Always welcome 🙂