You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://waffle.io/NodeOS/NodeOS)
3
12
[](https://gitter.im/NodeOS/NodeOS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Lightweight operating system using [Node.js](http://nodejs.org) as userspace.
10
21
11
-
NodeOS is an operating system build entirely in Javascript and managed by
12
-
[npm](https://www.npmjs.com). Any package in `npm` is a NodeOS package, which at
13
-
last count was 301,660 packages. The goal of NodeOS is to provide just enough to
14
-
let `npm` provide the rest. Since anyone can contribute to it, anyone can create
15
-
NodeOS packages.
22
+
NodeOS is an operating system built entirely in Javascript and managed by
23
+
[npm](https://www.npmjs.com). Any package in `npm` is a NodeOS package, that means a selection of more than 400.000 packages. The goal of NodeOS is to provide just
24
+
enough to let `npm` provide the rest. Since anyone can contribute to it, anyone
25
+
can create NodeOS packages.
16
26
17
-
This project won the spanish[9th National Free Software Championship](https://www.concursosoftwarelibre.org/1415)
27
+
This project won the Spanish[9th National Free Software Championship](https://www.concursosoftwarelibre.org/1415)
18
28
on the Systems category and was Honorable Mention of its [10th edition](https://www.concursosoftwarelibre.org/1516).
19
29
It was also presented as the degree thesis of [Jesús Leganes Combarro](https://github.com/piranna)
20
30
with a qualification of 10/10 with distinction.
@@ -47,50 +57,48 @@ adjust better to each target platform, but the general structure is:
47
57
48
58
-*barebones* custom Linux kernel with an initramfs that boots to a Node.js REPL
49
59
-*initramfs* Initram environment to mount the users partition & boot the system
50
-
-*rootfs* Read-only partition image to host Linux kernel and initramfs files
51
60
-*usersfs* multi-user environment with the same behaviour of traditional OSes
52
61
53
62
### Booting process
54
63
55
64
All the layers are bootable, leading *barebones* to a raw naked Node.js
56
-
[REPL](http://nodejs.org/api/repl.html) prompt as PID 1, while *initramfs*(and
57
-
by extension *rootfs*) exec actual NodeOS code to mount the *usersfs* partition.
58
-
In all the cases, it will be used an initramfs as root filesystem and all the
59
-
changes will be lost when powered-off.
65
+
[REPL](http://nodejs.org/api/repl.html) prompt as PID 1, while *initramfs*exec
66
+
actual NodeOS code to mount the *usersfs* partition. In all the cases, it will
67
+
be used an initramfs as root filesystem and all the changes will be lost when
68
+
poweredoff.
60
69
61
70
If a *usersfs* partition is being set at boot time, it will be mounted and the
62
-
system will considerate each one of its folders as the home folder for a valid
71
+
system will consider each one of its folders as the home folder for a valid
63
72
user on the system, and will execute a `init` file in the root of each of them.
64
-
If found, `root` user will be the first to be considerated and will have access
65
-
to all the home directories, but by design it will not be possible to elevate
66
-
permissions once the system has booted.
73
+
If found, the `root` user will be the first to be considered and will have access
74
+
to all of the home directories, but by design it will not be possible to elevate
75
+
permissions once the system has finished booting.
67
76
68
77
### Hacking
69
78
70
-
If you are hacking on NodeOS as a somewhat production server, you are likely
71
-
building *usersfs* images since each user is isolated of others, but you can be
72
-
able to customize all layers. For example, you could be able to modify
73
-
*initramfs* to login the users and mount their home folders from a cloud service
79
+
If you are hacking on NodeOS for a somewhat production environment, you are
80
+
likely building *usersfs* images since each user is isolated of others, but you
81
+
can customize all layers. For example, you can modify
82
+
*initramfs* to login users and mount their home folders from a cloud service
74
83
or craft a system without global services (no `root` user) or also dedicate a
75
84
full NodeOS instance to a single Node.js application.
76
85
77
86
78
-
# Pre-built Images
87
+
##Pre-built Images
79
88
80
89
Ready to use [pre-build images](https://github.com/NodeOS/NodeOS/releases) are
81
90
automatically generated after each commit in master branch that sucessfully
82
91
[pass the tests](https://semaphoreapp.com/nodeos/nodeos). To exec them, you'll
83
92
need to have [QEmu](http://wiki.qemu.org/Main_Page) installed on your system.
84
93
85
-
The *iso* can be written to a CD-R or flashed to an USB pendrive, but will only
86
-
provide the read-only rootfs and the changes will be done in memory loosing them
87
-
after reboot, so you'll need to set manually a read-write usersfs partition if
88
-
you want to persist them. On the other hand, if you want to flash it to an USB
89
-
pendrive, it's recomended to do it by using `bin/installUSB` command so it will
90
-
create automatically a read-write usersfs partition to fill the remaining space
91
-
so your changes will persist.
94
+
The *iso* can be written to a CD-R or flashed to a USB pendrive, but will only
95
+
provide the read-only rootfs and the changes will be done in memory losing them
96
+
after reboot, so you'll manually need to set a read-write usersfs partition if
97
+
you want to persist them. On the other hand, if you want to flash it to a USB
98
+
pendrive, I recommended doing it by using `bin/installUSB` command so it will
99
+
automatically create a read-write usersfs partition to fill the remaining space and your changes will be persistent.
92
100
93
-
# Build NodeOS in five steps
101
+
##Build NodeOS in five steps
94
102
95
103
1. Download the project source code:
96
104
@@ -99,8 +107,7 @@ so your changes will persist.
99
107
cd NodeOS
100
108
```
101
109
102
-
2. Install the required build tools, on a Ubuntu based system you can do it by
103
-
executing
110
+
2. Install the required build tools. On a Ubuntu based system you can do it by executing:
104
111
105
112
```bash
106
113
sudo bin/install-dependencies
@@ -110,22 +117,20 @@ so your changes will persist.
110
117
111
118
```bash
112
119
npm install
113
-
```
120
+
```
114
121
115
-
3. Build NodeOS:
122
+
4. Build NodeOS:
116
123
117
124
```bash
118
125
npm run build
119
126
```
120
127
121
128
By default it will generate some files that can be used with QEmu, compiled
122
-
for your current machine architecture. You can be able to configure the build
129
+
for your current machine architecture. You can configure the build
123
130
process by passing some environment variables. For example, to force to build
124
131
for 32 bits, use `PLATFORM=qemu_32 npm install` instead.
125
132
126
-
4. Pick some microwave pop-corn and go to see a movie. No, really, do it.
127
-
128
-
5. Exec your fresh compiled NodeOS image:
133
+
5. Exec your freshly compiled NodeOS image:
129
134
130
135
```bash
131
136
npm start
@@ -134,31 +139,30 @@ so your changes will persist.
134
139
It will automatically detect what CPU architecture will need to be used on
135
140
QEmu and exec the correct emulation.
136
141
137
-
...and profit! :-D
142
+
...profit! :-D
138
143
139
144
If you encounter an error when building NodeOS, take a look at
140
145
[the wiki](https://github.com/NodeOS/NodeOS/wiki/Fixing-NodeOS-Build-Errors) or
141
146
open an [issue](https://github.com/NodeOS/NodeOS/issues).
142
147
143
-
# NodeOS on LXC containers (Docker and vagga)
148
+
## NodeOS on LXC containers (Docker and vagga)
149
+
150
+
NodeOS fully officially supports Docker, but the images published to DockerHub are totally outdated (we're accepting PRs!). If you are interested in helping or testing, you can build them from source code.
144
151
145
-
Currently LXC containers support is unmaintained due to the inability to mount
146
-
filesystems from inside them. There are some NodeOS images on Docker Hub, but
147
-
they are totally outdated. If you are interested inhelp or testing, you can
148
-
build them from source code.
152
+
Vagga support is fairly experimental, and help here will be greatly appreciated.
Even as we discuss everything in the issues, additionally here you will find drafts for concepts and ideas for NodeOS. Feel free to contribute to an idea and should a great idea come across your mind, create a new Thread and page and link one to another!
(Or solutions to problems you seem to have often).
3
+
4
+
Not many questions will be actually answered on this page, but rather linked to the respective page thank explains it to you nicely in detail. Hopefully at the start of the page a tl;dr will sum it all up for you if you don't have time.
0 commit comments