-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstallation-linux.html
More file actions
567 lines (552 loc) · 25.7 KB
/
installation-linux.html
File metadata and controls
567 lines (552 loc) · 25.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Install Droidspaces on Linux desktop or server. Download the tarball, extract the binary, create a rootfs image, and boot your first container.">
<meta name="keywords" content="install, droidspaces, linux, container, runtime, rootfs, tarball, ext, image, namespaces">
<title>Linux Installation - Droidspaces Docs</title>
<meta property="og:title" content="Linux Installation - Droidspaces Docs">
<meta property="og:description" content="Install Droidspaces on Linux desktop or server. Download the tarball, extract the binary, create a rootfs image, and boot your first container.">
<meta property="og:url" content="https://www.droidspaces.org/docs/installation-linux.html">
<meta property="og:type" content="website">
<meta property="og:image" content="https://i.ibb.co/d4PLN7Gg/og-image.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Linux Installation - Droidspaces Docs">
<meta name="twitter:description" content="Install Droidspaces on Linux desktop or server. Download the tarball, extract the binary, create a rootfs image, and boot your first container.">
<meta name="twitter:image" content="https://i.ibb.co/d4PLN7Gg/og-image.png">
<link rel="canonical" href="https://www.droidspaces.org/docs/installation-linux.html">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:wght@300;400;500;600&display=swap" rel="stylesheet">
<link rel="icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/favicon.ico">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
<link rel="stylesheet" href="../style.css">
<style>
.docs-layout {
display: flex; min-height: calc(100vh - 56px);
}
.sidebar {
width: 300px; flex-shrink: 0;
border-right: 1px solid var(--border);
background: var(--bg2);
overflow-y: auto;
position: sticky; top: 56px; height: calc(100vh - 56px);
}
.sidebar-inner {
padding: 0;
position: relative;
width: 100%;
min-width: 0;
}
.sidebar-group {
margin-bottom: 0;
}
.sidebar-heading {
font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
text-transform: uppercase; letter-spacing: 0.08em;
color: var(--muted); padding: 1rem 1rem 0.25rem;
}
.sidebar-link {
display: block; padding: 0.5rem 1rem;
font-size: 0.9rem; color: var(--muted);
text-decoration: none; border-radius: 0;
transition: all 0.1s;
}
.sidebar-link:hover {
color: var(--text); background: var(--bg3);
}
.sidebar-link.active {
color: var(--accent2); background: rgba(79,142,247,0.08);
font-weight: 600;
}
.sidebar-content {
flex: 1; min-width: 0;
padding: 2rem 2rem 4rem;
max-width: none;
}
.sidebar-content h1 {
font-family: var(--mono); font-size: clamp(1.5rem, 2.5vw, 2rem);
font-weight: 700; letter-spacing: -0.03em; color: var(--text);
margin-bottom: 1.5rem; padding-bottom: 0.75rem;
border-bottom: 1px solid var(--border);
}
.sidebar-content h2 {
font-family: var(--mono); font-size: 1.25rem; font-weight: 700;
color: var(--text); margin: 2rem 0 0.75rem;
letter-spacing: -0.02em;
}
.sidebar-content h2:target {
border-left: 3px solid var(--accent);
padding-left: 0.75rem;
}
.sidebar-content h3 {
font-family: var(--mono); font-size: 1rem; font-weight: 600;
color: var(--accent2); margin: 1.5rem 0 0.5rem;
}
.sidebar-content h3:target {
border-left: 2px solid var(--accent);
padding-left: 0.5rem;
}
.sidebar-content p {
color: var(--muted); line-height: 1.7; margin-bottom: 1rem;
}
.sidebar-content strong { color: var(--text); }
.sidebar-content a {
color: var(--accent2); text-decoration: none;
word-break: break-word; overflow-wrap: anywhere;
}
.sidebar-content a:hover { text-decoration: underline; }
.sidebar-content code {
font-family: var(--mono); font-size: 0.82rem;
background: var(--bg3); padding: 0.15rem 0.4rem;
border-radius: 4px; color: var(--accent2);
word-break: break-word; overflow-wrap: anywhere;
}
.sidebar-content pre {
background: var(--bg2); border: 1px solid var(--border);
border-radius: 8px; padding: 1rem; overflow-x: auto;
margin-bottom: 1rem;
}
.sidebar-content pre code {
background: none; padding: 0; font-size: 0.78rem;
color: var(--text); line-height: 1.6;
}
.code-block {
position: relative;
}
.code-block:hover .copy-btn {
opacity: 1;
}
.copy-btn {
position: absolute; top: 0.5rem; right: 0.5rem;
background: var(--bg3); border: 1px solid var(--border);
color: var(--muted); font-size: 0.7rem;
font-family: var(--sans); padding: 0.2rem 0.5rem;
border-radius: 4px; cursor: pointer;
opacity: 0; transition: opacity 0.15s; z-index: 1;
display: inline-flex; align-items: center; gap: 0.25rem;
}
.copy-btn:hover {
color: var(--accent2); border-color: var(--accent2);
}
@media (max-width: 768px) {
.copy-btn { opacity: 1; }
}
.sidebar-content ul, .sidebar-content ol {
color: var(--muted); line-height: 1.7;
margin-bottom: 1rem; padding-left: 1.25rem;
}
.sidebar-content li { margin-bottom: 0.25rem; }
.sidebar-content li > .code-block { margin-top: 0.5rem; }
.sidebar-content blockquote {
border-left: 3px solid var(--accent); background: var(--bg3);
padding: 0.75rem 1rem; margin-bottom: 1rem;
border-radius: 0 6px 6px 0;
color: var(--text); font-size: 0.9rem;
}
.sidebar-content blockquote p { color: var(--text); margin-bottom: 0; }
.sidebar-content hr {
border: none; border-top: 1px solid var(--border); margin: 2rem 0;
}
.table-wrap {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
margin-bottom: 1.5rem;
}
.table-wrap table {
width: max-content;
min-width: 100%;
margin-bottom: 0;
}
.sidebar-content table {
width: max-content; min-width: 100%;
border-collapse: collapse; font-size: 0.85rem;
margin-bottom: 1.5rem;
}
.sidebar-content th {
font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
text-transform: uppercase; letter-spacing: 0.06em;
padding: 0.75rem 1rem; text-align: left; color: var(--muted);
border-bottom: 1px solid var(--border); background: var(--bg3);
white-space: nowrap;
}
.sidebar-content td {
padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
color: var(--muted);
white-space: normal; word-break: normal;
overflow-wrap: break-word; max-width: 300px;
}
.sidebar-content img {
max-width: 100%; border-radius: 8px; border: 1px solid var(--border);
margin: 1rem 0;
}
.sidebar-content details {
background: var(--bg2); border: 1px solid var(--border);
border-radius: 8px; padding: 1rem; margin-bottom: 1rem;
}
.sidebar-content summary {
font-family: var(--mono); font-size: 0.85rem;
cursor: pointer; color: var(--accent2);
}
.callout {
border-left: 4px solid var(--accent);
background: var(--bg3); padding: 0.75rem 1rem;
margin-bottom: 1rem; border-radius: 0 6px 6px 0;
font-size: 0.9rem; color: var(--text);
}
.callout-title {
font-family: var(--mono); font-size: 0.72rem;
text-transform: uppercase; letter-spacing: 0.06em;
display: block; margin-bottom: 0.25rem;
}
.callout-note { border-left-color: var(--accent); }
.callout-note .callout-title { color: var(--accent); }
.callout-tip { border-left-color: var(--green); }
.callout-tip .callout-title { color: var(--green); }
.callout-warning { border-left-color: #f59e0b; }
.callout-warning .callout-title { color: #f59e0b; }
.callout-caution { border-left-color: #f59e0b; }
.callout-caution .callout-title { color: #f59e0b; }
.callout-important { border-left-color: #ef4444; }
.callout-important .callout-title { color: #ef4444; }
.doc-nav-buttons {
display: flex; justify-content: space-between; gap: 1rem;
margin: 2rem 0 1rem;
}
.doc-nav-btn {
padding: 0.5rem 1rem; border-radius: 8px;
font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
text-decoration: none; color: var(--muted);
border: 1px solid var(--border);
transition: all 0.15s; max-width: 50%;
}
.doc-nav-btn:hover {
color: var(--text); border-color: var(--muted);
}
.doc-nav-next {
margin-left: auto; text-align: right;
}
.doc-nav-prev {
text-align: left;
}
.doc-copyright {
font-size: 0.78rem; color: var(--border2);
padding-top: 1rem; border-top: 1px solid var(--border);
margin-top: 1.5rem; text-align: center;
}
.doc-copyright a {
color: var(--border2); text-decoration: none;
}
.doc-copyright a:hover {
color: var(--muted);
}
.nav-overlay {
display: none; position: fixed;
top: 56px; left: 0; right: 0; bottom: 0;
background: rgba(0,0,0,0.5); z-index: 199;
}
.nav-overlay.active { display: block; }
.sidebar-close {
display: none;
position: absolute; top: 0.5rem; right: 1rem;
background: none; border: none;
color: var(--muted); font-size: 1.5rem;
cursor: pointer; padding: 0.25rem 0.5rem;
line-height: 1; border-radius: 4px;
}
.sidebar-close:hover {
color: var(--text); background: var(--bg3);
}
.doc-breadcrumb {
display: none;
position: sticky;
top: 56px;
z-index: 50;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--bg2);
border-bottom: 1px solid var(--border);
font-size: 0.78rem;
color: var(--muted);
user-select: none;
cursor: pointer;
}
.doc-breadcrumb .bc-sep {
color: var(--border2);
}
.doc-breadcrumb .bc-section {
color: var(--text);
}
.doc-breadcrumb .bc-label {
color: var(--accent2);
}
@media (max-width: 768px) {
.sidebar {
display: flex;
position: fixed; top: 56px; left: 0;
width: 300px; height: calc(100dvh - 56px); z-index: 200;
border-right: 1px solid var(--border);
transform: translateX(-100%);
transition: transform 0.25s ease;
box-shadow: 4px 0 12px rgba(0,0,0,0.2);
}
.sidebar.open { transform: translateX(0); }
.sidebar-close { display: block; }
.sidebar-content { padding: 1.5rem 1rem 3rem; }
.doc-breadcrumb { display: flex; }
.docs-layout { flex-direction: column; }
.sidebar-content th,
.sidebar-content td {
padding: 0.5rem 0.5rem;
font-size: 0.78rem;
}
}
</style>
<script>
(function () {
const savedTheme = localStorage.getItem('theme');
if (savedTheme) document.documentElement.setAttribute('data-theme', savedTheme);
})();
</script>
</head>
<body>
<nav aria-label="Main navigation">
<div class="container" style="display:flex;align-items:center;justify-content:space-between;height:100%;">
<a href="/" class="nav-logo">
<svg class="logo-icon" viewBox="8.25 10.35 31.5 27.3" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M36.85 30.16H11.15c-0.82 0-1.48 0.68-1.48 1.52v3.05c0 0.84 0.66 1.52 1.48 1.52h25.69c0.82 0 1.48-0.68 1.48-1.52v-3.05c0-0.84-0.66-1.52-1.48-1.52ZM12.58 34.97c-0.95 0-1.73-0.79-1.73-1.77s0.77-1.77 1.73-1.77 1.73 0.79 1.73 1.77-0.77 1.77-1.73 1.77Z"/>
<path d="M36.85 21.00H11.15c-0.82 0-1.48 0.68-1.48 1.52v3.05c0 0.84 0.66 1.52 1.48 1.52h25.69c0.82 0 1.48-0.68 1.48-1.52v-3.05c0-0.84-0.66-1.52-1.48-1.52ZM12.58 25.82c-0.95 0-1.73-0.79-1.73-1.77s0.77-1.77 1.73-1.77 1.73 0.79 1.73 1.77-0.77 1.77-1.73 1.77Z"/>
<path d="M36.84 11.74H11.15c-0.82 0-1.48 0.68-1.48 1.52v3.05c0 0.84 0.66 1.52 1.48 1.52h25.69c0.82 0 1.48-0.68 1.48-1.52v-3.05c0-0.84-0.66-1.52-1.48-1.52ZM12.58 16.57c-0.95 0-1.73-0.79-1.73-1.77s0.77-1.77 1.73-1.77 1.73 0.79 1.73 1.77-0.77 1.77-1.73 1.77Z"/>
</svg>
<span class="logo-text">Droidspaces</span>
</a>
<div style="display:flex;align-items:center;gap:0.5rem;">
<ul class="nav-links">
<li class="nav-features"><a href="/#features">Features</a></li>
<li><a href="/docs/" style="color:var(--accent2)"><i class="fas fa-book nav-icon nav-icon-docs"></i><span class="nav-label">Documentation</span></a></li>
<li class="nav-downloads"><a href="/downloads.html"><i class="fas fa-download nav-icon nav-icon-docs"></i><span class="nav-label">Downloads</span></a></li>
<li><a href="https://github.com/ravindu644/Droidspaces-OSS" rel="noopener noreferrer"><i class="fab fa-github nav-icon"></i><span class="nav-label nav-label-gt">GitHub</span></a></li>
<li><a href="https://t.me/Droidspaces" rel="noopener noreferrer"><i class="fab fa-telegram nav-icon"></i><span class="nav-label nav-label-gt">Telegram</span></a></li>
</ul>
<button class="theme-toggle" id="theme-toggle" title="Toggle theme">
<svg class="sun-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="display:none">
<circle cx="12" cy="12" r="5"></circle>
<line x1="12" y1="1" x2="12" y2="3"></line>
<line x1="12" y1="21" x2="12" y2="23"></line>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
<line x1="1" y1="12" x2="3" y2="12"></line>
<line x1="21" y1="12" x2="23" y2="12"></line>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
</svg>
<svg class="moon-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
</button>
</div>
</div>
</nav>
<div class="nav-overlay" id="sidebar-overlay"></div>
<div class="doc-breadcrumb" id="sidebar-toggle" role="button" tabindex="0" aria-label="Toggle docs navigation">
<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" style="flex-shrink:0">
<rect x="3" y="3" width="18" height="18" rx="2"/>
<line x1="9" y1="3" x2="9" y2="21"/>
</svg>
<span>Docs</span><span class="bc-sep">/</span><span class="bc-section">Basics</span><span class="bc-sep">/</span><span class="bc-label">Linux Installation</span>
</div>
<div class="docs-layout">
<aside class="sidebar" id="sidebar">
<div class="sidebar-inner">
<button class="sidebar-close" id="sidebar-close" aria-label="Close sidebar">×</button>
<div class="sidebar-group">
<div class="sidebar-heading">Basics</div>
<a href="installation-android.html" class="sidebar-link">Android Installation</a>
<a href="installation-linux.html" class="sidebar-link active">Linux Installation</a>
</div>
<div class="sidebar-group">
<div class="sidebar-heading">Guides</div>
<a href="features.html" class="sidebar-link">Feature Deep Dives</a>
<a href="gpu-acceleration.html" class="sidebar-link">GPU Acceleration</a>
<a href="kernel-configuration.html" class="sidebar-link">Kernel Configuration</a>
<a href="usage-android-app.html" class="sidebar-link">Android App Usage</a>
<a href="linux-cli.html" class="sidebar-link">Linux CLI</a>
</div>
<div class="sidebar-group">
<div class="sidebar-heading">Recipes</div>
<a href="cool-things-you-can-do.html" class="sidebar-link">Cool Things You Can Do</a>
</div>
<div class="sidebar-group">
<div class="sidebar-heading">Reference</div>
<a href="troubleshooting.html" class="sidebar-link">Troubleshooting</a>
<a href="community-supported-devices.html" class="sidebar-link">Community-Supported Devices</a>
<a href="nix-nixos.html" class="sidebar-link">Nix/NixOS</a>
<a href="uninstallation.html" class="sidebar-link">Uninstallation</a>
</div>
</div>
</aside>
<div class="sidebar-content">
<h1 id="linux-installation-guide">Linux Installation Guide</h1>
<p>This guide covers how to install Droidspaces on a Linux desktop or server.</p>
<h2 id="prerequisites">Prerequisites</h2>
<p>Most modern Linux distributions already include everything Droidspaces needs. No special kernel configuration or additional packages are required.</p>
<p><strong>Requirements:</strong> - Root privileges (<code>sudo</code>)</p>
<h2 id="step-1-download-the-release">Step 1: Download the Release</h2>
<p>Go to the <a href="https://github.com/ravindu644/Droidspaces-OSS/releases/latest" rel="noopener noreferrer">latest release page</a> and download the <strong>Droidspaces Backend Tarball</strong>.</p>
<p>Alternatively, download it from the command line:</p>
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code># Replace VERSION with the actual version (e.g., v4.3.0)
wget https://github.com/ravindu644/Droidspaces-OSS/releases/download/VERSION/droidspaces-vVERSION-DATE.tar.gz
</code></pre></div>
<h2 id="step-2-extract-and-install">Step 2: Extract and Install</h2>
<h3 id="identify-your-architecture">Identify Your Architecture</h3>
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code>uname -m
</code></pre></div>
<p>This will output one of: <code>x86_64</code>, <code>aarch64</code>, <code>armv7l</code> (armhf), or <code>i686</code> (x86).</p>
<h3 id="install-the-binary">Install the Binary</h3>
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code># Extract the tarball
tar xzf droidspaces-v*.tar.gz
# Navigate into the extracted directory
cd droidspaces-v*/
# Copy the binary for your architecture to a directory in your PATH
sudo cp x86_64/droidspaces /usr/local/bin/droidspaces
# Make it executable
sudo chmod +x /usr/local/bin/droidspaces
</code></pre></div>
<h2 id="step-3-verify-installation">Step 3: Verify Installation</h2>
<p>Run the system requirements checker:</p>
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code>sudo droidspaces check
</code></pre></div>
<p>All checks should pass with green checkmarks. On a modern Linux desktop, everything should be supported out of the box.</p>
<h2 id="step-4-get-a-rootfs">Step 4: Get a Rootfs</h2>
<p>You need a Linux root filesystem to create your first container. We recommend using the official <strong>Linux Containers image repository</strong>, which provides clean, pre-built rootfs tarballs for dozens of distributions.</p>
<p><strong>Download URL</strong>: <a href="https://images.linuxcontainers.org/images/" rel="noopener noreferrer">images.linuxcontainers.org/images/</a></p>
<p>Navigate to your desired distribution (e.g., <code>ubuntu/noble/amd64/default/</code>) and download the <code>rootfs.tar.xz</code> file.</p>
<div class="callout callout-important"><strong class="callout-title">IMPORTANT</strong> You <strong>must</strong> use <code>sudo</code> when extracting the rootfs tarball in both methods below. This ensures that file ownership (<code>UID 0</code>) and special setuid permissions are preserved. Failure to do so will result in a broken container where commands like <code>sudo</code> won't function (because the binaries won't be owned by root inside the environment), and system services may fail to start.</div>
<hr>
<h3 id="option-a-use-a-directory-rootfs">Option A: Use a Directory Rootfs</h3>
<p>Simply extract the tarball to a directory:</p>
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code>mkdir my-container
sudo tar -xvf rootfs.tar.xz -C my-container
</code></pre></div>
<h3 id="option-b-create-an-ext4-image-recommended">Option B: Create an ext4 Image (Recommended)</h3>
<p>Encapsulating your rootfs in a single <code>.img</code> file provides better portability and avoids host filesystem conflicts.</p>
<ol>
<li><strong>Create a sparse image file</strong> (e.g., 16GB):
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code>truncate -s 16G rootfs.img
</code></pre></div>
</li>
<li><strong>Format it as ext4</strong>:
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code>mkfs.ext4 -L Droidspaces rootfs.img
</code></pre></div>
</li>
<li><strong>Mount the image</strong>:
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code>mkdir -p rootfs_mount
sudo mount rootfs.img rootfs_mount
</code></pre></div>
</li>
<li><strong>Extract the rootfs tarball to the mountpoint</strong>:
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code>sudo tar -xvf /path/to/rootfs.tar.xz -C rootfs_mount
</code></pre></div>
</li>
<li><strong>Unmount and clean up</strong>:
<div class="code-block"><button class="copy-btn" onclick="copyCode(this)"><i class="fa-regular fa-copy"></i> Copy</button><pre><code>sudo umount rootfs_mount
rmdir rootfs_mount
</code></pre></div>
</li>
</ol>
<p>Now you can boot it instantly using: <code>sudo droidspaces --name=my-container --rootfs-img=rootfs.img start</code></p>
<h2 id="next-steps">Next Steps</h2>
<ul>
<li><a href="linux-cli.html" rel="noopener noreferrer">Linux CLI Guide</a> for complete command and flag reference
</li>
<li><a href="features.html" rel="noopener noreferrer">Feature Deep Dives</a> for detailed explanations of each feature
</li>
</ul>
<div class="doc-nav-buttons"><a href="installation-android.html" class="doc-nav-btn doc-nav-prev">← Android Installation</a><a href="features.html" class="doc-nav-btn doc-nav-next">Feature Deep Dives →</a></div>
<p class="doc-copyright">© 2026 Droidspaces · <a href="https://github.com/ravindu644/Droidspaces-OSS/blob/main/LICENSE" rel="noopener noreferrer">GPLv3</a> · by <a href="https://github.com/ravindu644" rel="noopener noreferrer">ravindu644</a> and <a href="https://github.com/ravindu644/Droidspaces-OSS/graphs/contributors" rel="noopener noreferrer">contributors</a>
</p>
</div>
</div>
<script>
(() => {
const themeToggle = document.getElementById('theme-toggle');
const sunIcon = themeToggle.querySelector('.sun-icon');
const moonIcon = themeToggle.querySelector('.moon-icon');
const mediaQuery = window.matchMedia('(prefers-color-scheme: light)');
function updateIcons(theme) {
sunIcon.style.display = theme === 'light' ? 'none' : 'block';
moonIcon.style.display = theme === 'light' ? 'block' : 'none';
}
function getEffectiveTheme() {
const saved = localStorage.getItem('theme');
if (saved) return saved;
return mediaQuery.matches ? 'light' : 'dark';
}
function applyTheme(theme) {
if (theme === 'system') {
document.documentElement.removeAttribute('data-theme');
updateIcons(mediaQuery.matches ? 'light' : 'dark');
} else {
document.documentElement.setAttribute('data-theme', theme);
updateIcons(theme);
}
}
applyTheme(getEffectiveTheme());
mediaQuery.addEventListener('change', (e) => {
if (!localStorage.getItem('theme')) applyTheme(e.matches ? 'light' : 'dark');
});
themeToggle.addEventListener('click', () => {
const currentTheme = getEffectiveTheme();
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
localStorage.setItem('theme', newTheme);
applyTheme(newTheme);
});
// Docs sidebar toggle
const sidebarToggle = document.getElementById('sidebar-toggle');
const sidebar = document.getElementById('sidebar');
const sidebarOverlay = document.getElementById('sidebar-overlay');
function openSidebar() {
sidebar.classList.add('open');
sidebarOverlay.classList.add('active');
document.body.style.overflow = 'hidden';
}
function closeSidebar() {
sidebar.classList.remove('open');
sidebarOverlay.classList.remove('active');
document.body.style.overflow = '';
}
if (sidebarToggle) {
sidebarToggle.addEventListener('click', (e) => {
e.stopPropagation();
if (sidebar.classList.contains('open')) closeSidebar();
else openSidebar();
});
}
if (sidebarOverlay) {
sidebarOverlay.addEventListener('click', closeSidebar);
}
const sidebarClose = document.getElementById('sidebar-close');
if (sidebarClose) {
sidebarClose.addEventListener('click', closeSidebar);
}
if (sidebar) {
sidebar.querySelectorAll('a').forEach(link => {
link.addEventListener('click', closeSidebar);
});
}
})();
function copyCode(btn) {
const code = btn.parentElement.querySelector('pre code');
const text = code.textContent;
navigator.clipboard.writeText(text).then(() => {
const orig = btn.innerHTML;
btn.innerHTML = '<i class="fas fa-check"></i> Copied!';
setTimeout(() => { btn.innerHTML = orig; }, 1500);
}).catch(() => {});
}
</script>
</body>
</html>