alpha
Login
or
Join now
tombl.dev
/
distro
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
busybox: symlink applets
author
Thomas Stokes
date
1 year ago
(Apr 18, 2025, 5:01 PM +0800)
commit
fc0041b3
fc0041b3bf8008cd26adf82ee90498a3a5856987
parent
eff48f00
eff48f00472d93732291216e3068bacc7692c377
+375
-1
1 changed file
Expand all
Collapse all
Unified
Split
packages
initramfs
package.nix
+375
-1
packages/initramfs/package.nix
Reviewed
···
1
1
{
2
2
run,
3
3
busybox,
4
4
+
lib,
4
5
}:
5
6
7
7
+
let
8
8
+
applets = [
9
9
+
"["
10
10
+
"[["
11
11
+
"acpid"
12
12
+
"add-shell"
13
13
+
"addgroup"
14
14
+
"adduser"
15
15
+
"adjtimex"
16
16
+
"arch"
17
17
+
"arp"
18
18
+
"arping"
19
19
+
"ascii"
20
20
+
"awk"
21
21
+
"base32"
22
22
+
"base64"
23
23
+
"basename"
24
24
+
"bc"
25
25
+
"beep"
26
26
+
"blkdiscard"
27
27
+
"blkid"
28
28
+
"blockdev"
29
29
+
"brctl"
30
30
+
"bunzip2"
31
31
+
"bzcat"
32
32
+
"bzip2"
33
33
+
"cal"
34
34
+
"cat"
35
35
+
"chat"
36
36
+
"chattr"
37
37
+
"chgrp"
38
38
+
"chmod"
39
39
+
"chown"
40
40
+
"chpasswd"
41
41
+
"chpst"
42
42
+
"chroot"
43
43
+
"chrt"
44
44
+
"chvt"
45
45
+
"cksum"
46
46
+
"clear"
47
47
+
"cmp"
48
48
+
"comm"
49
49
+
"cp"
50
50
+
"cpio"
51
51
+
"crc32"
52
52
+
"cryptpw"
53
53
+
"cttyhack"
54
54
+
"cut"
55
55
+
"date"
56
56
+
"dc"
57
57
+
"dd"
58
58
+
"deallocvt"
59
59
+
"delgroup"
60
60
+
"deluser"
61
61
+
"depmod"
62
62
+
"df"
63
63
+
"dhcprelay"
64
64
+
"diff"
65
65
+
"dirname"
66
66
+
"dmesg"
67
67
+
"dnsd"
68
68
+
"dnsdomainname"
69
69
+
"dos2unix"
70
70
+
"dpkg"
71
71
+
"dpkg-deb"
72
72
+
"du"
73
73
+
"dumpkmap"
74
74
+
"dumpleases"
75
75
+
"echo"
76
76
+
"ed"
77
77
+
"egrep"
78
78
+
"eject"
79
79
+
"env"
80
80
+
"envdir"
81
81
+
"envuidgid"
82
82
+
"ether-wake"
83
83
+
"expand"
84
84
+
"expr"
85
85
+
"factor"
86
86
+
"fakeidentd"
87
87
+
"fallocate"
88
88
+
"false"
89
89
+
"fatattr"
90
90
+
"fbset"
91
91
+
"fdflush"
92
92
+
"fdformat"
93
93
+
"fdisk"
94
94
+
"fgconsole"
95
95
+
"fgrep"
96
96
+
"find"
97
97
+
"findfs"
98
98
+
"flock"
99
99
+
"fold"
100
100
+
"free"
101
101
+
"freeramdisk"
102
102
+
"fsck"
103
103
+
"fsck.minix"
104
104
+
"fsfreeze"
105
105
+
"fstrim"
106
106
+
"fsync"
107
107
+
"ftpget"
108
108
+
"ftpput"
109
109
+
"fuser"
110
110
+
"getfattr"
111
111
+
"getopt"
112
112
+
"getty"
113
113
+
"grep"
114
114
+
"groups"
115
115
+
"gunzip"
116
116
+
"gzip"
117
117
+
"halt"
118
118
+
"hd"
119
119
+
"head"
120
120
+
"hexdump"
121
121
+
"hostid"
122
122
+
"hostname"
123
123
+
"hush"
124
124
+
"i2cdetect"
125
125
+
"i2cdump"
126
126
+
"i2cget"
127
127
+
"i2cset"
128
128
+
"i2ctransfer"
129
129
+
"id"
130
130
+
"ifconfig"
131
131
+
"ifenslave"
132
132
+
"ifplugd"
133
133
+
"insmod"
134
134
+
"install"
135
135
+
"ionice"
136
136
+
"iostat"
137
137
+
"ip"
138
138
+
"ipaddr"
139
139
+
"ipcalc"
140
140
+
"ipcrm"
141
141
+
"ipcs"
142
142
+
"iplink"
143
143
+
"ipneigh"
144
144
+
"iproute"
145
145
+
"iprule"
146
146
+
"iptunnel"
147
147
+
"kbd_mode"
148
148
+
"kill"
149
149
+
"killall"
150
150
+
"killall5"
151
151
+
"klogd"
152
152
+
"last"
153
153
+
"less"
154
154
+
"link"
155
155
+
"linux32"
156
156
+
"linux64"
157
157
+
"ln"
158
158
+
"loadfont"
159
159
+
"loadkmap"
160
160
+
"logger"
161
161
+
"login"
162
162
+
"logname"
163
163
+
"logread"
164
164
+
"losetup"
165
165
+
"lpd"
166
166
+
"lpq"
167
167
+
"lpr"
168
168
+
"ls"
169
169
+
"lsattr"
170
170
+
"lsmod"
171
171
+
"lsof"
172
172
+
"lspci"
173
173
+
"lsscsi"
174
174
+
"lsusb"
175
175
+
"lzcat"
176
176
+
"lzma"
177
177
+
"lzop"
178
178
+
"makedevs"
179
179
+
"man"
180
180
+
"md5sum"
181
181
+
"mdev"
182
182
+
"mesg"
183
183
+
"microcom"
184
184
+
"mim"
185
185
+
"mkdir"
186
186
+
"mkdosfs"
187
187
+
"mke2fs"
188
188
+
"mkfifo"
189
189
+
"mkfs.ext2"
190
190
+
"mkfs.minix"
191
191
+
"mkfs.vfat"
192
192
+
"mknod"
193
193
+
"mkpasswd"
194
194
+
"mkswap"
195
195
+
"mktemp"
196
196
+
"modinfo"
197
197
+
"modprobe"
198
198
+
"more"
199
199
+
"mount"
200
200
+
"mountpoint"
201
201
+
"mpstat"
202
202
+
"mt"
203
203
+
"mv"
204
204
+
"nameif"
205
205
+
"nanddump"
206
206
+
"nandwrite"
207
207
+
"nbd-client"
208
208
+
"netstat"
209
209
+
"nice"
210
210
+
"nl"
211
211
+
"nmeter"
212
212
+
"nohup"
213
213
+
"nologin"
214
214
+
"nproc"
215
215
+
"nslookup"
216
216
+
"ntpd"
217
217
+
"od"
218
218
+
"openvt"
219
219
+
"partprobe"
220
220
+
"passwd"
221
221
+
"paste"
222
222
+
"patch"
223
223
+
"pgrep"
224
224
+
"pidof"
225
225
+
"ping"
226
226
+
"ping6"
227
227
+
"pipe_progress"
228
228
+
"pivot_root"
229
229
+
"pkill"
230
230
+
"pmap"
231
231
+
"poweroff"
232
232
+
"powertop"
233
233
+
"printenv"
234
234
+
"printf"
235
235
+
"ps"
236
236
+
"pscan"
237
237
+
"pstree"
238
238
+
"pwd"
239
239
+
"pwdx"
240
240
+
"raidautorun"
241
241
+
"rdate"
242
242
+
"rdev"
243
243
+
"readahead"
244
244
+
"readlink"
245
245
+
"readprofile"
246
246
+
"realpath"
247
247
+
"reboot"
248
248
+
"remove-shell"
249
249
+
"renice"
250
250
+
"reset"
251
251
+
"resize"
252
252
+
"resume"
253
253
+
"rev"
254
254
+
"rm"
255
255
+
"rmdir"
256
256
+
"rmmod"
257
257
+
"route"
258
258
+
"rpm"
259
259
+
"rpm2cpio"
260
260
+
"run-init"
261
261
+
"run-parts"
262
262
+
"runlevel"
263
263
+
"rx"
264
264
+
"scriptreplay"
265
265
+
"sed"
266
266
+
"seedrng"
267
267
+
"seq"
268
268
+
"setarch"
269
269
+
"setconsole"
270
270
+
"setfattr"
271
271
+
"setfont"
272
272
+
"setkeycodes"
273
273
+
"setlogcons"
274
274
+
"setpriv"
275
275
+
"setserial"
276
276
+
"setsid"
277
277
+
"setuidgid"
278
278
+
"sh"
279
279
+
"sha1sum"
280
280
+
"sha256sum"
281
281
+
"sha3sum"
282
282
+
"sha512sum"
283
283
+
"showkey"
284
284
+
"shred"
285
285
+
"shuf"
286
286
+
"slattach"
287
287
+
"sleep"
288
288
+
"smemcap"
289
289
+
"softlimit"
290
290
+
"sort"
291
291
+
"split"
292
292
+
"ssl_client"
293
293
+
"stat"
294
294
+
"strings"
295
295
+
"stty"
296
296
+
"su"
297
297
+
"sulogin"
298
298
+
"sum"
299
299
+
"sv"
300
300
+
"svc"
301
301
+
"svok"
302
302
+
"switch_root"
303
303
+
"sync"
304
304
+
"sysctl"
305
305
+
"syslogd"
306
306
+
"tac"
307
307
+
"tail"
308
308
+
"tar"
309
309
+
"taskset"
310
310
+
"tc"
311
311
+
"tee"
312
312
+
"telnet"
313
313
+
"test"
314
314
+
"tftp"
315
315
+
"tftpd"
316
316
+
"timeout"
317
317
+
"top"
318
318
+
"touch"
319
319
+
"tr"
320
320
+
"traceroute"
321
321
+
"traceroute6"
322
322
+
"tree"
323
323
+
"true"
324
324
+
"truncate"
325
325
+
"tsort"
326
326
+
"tty"
327
327
+
"ttysize"
328
328
+
"tunctl"
329
329
+
"ubiattach"
330
330
+
"ubidetach"
331
331
+
"ubimkvol"
332
332
+
"ubirename"
333
333
+
"ubirmvol"
334
334
+
"ubirsvol"
335
335
+
"ubiupdatevol"
336
336
+
"udhcpc"
337
337
+
"udhcpc6"
338
338
+
"udhcpd"
339
339
+
"uevent"
340
340
+
"umount"
341
341
+
"uname"
342
342
+
"unexpand"
343
343
+
"uniq"
344
344
+
"unix2dos"
345
345
+
"unlink"
346
346
+
"unlzma"
347
347
+
"unxz"
348
348
+
"unzip"
349
349
+
"uptime"
350
350
+
"users"
351
351
+
"usleep"
352
352
+
"uudecode"
353
353
+
"uuencode"
354
354
+
"vconfig"
355
355
+
"vi"
356
356
+
"vlock"
357
357
+
"volname"
358
358
+
"w"
359
359
+
"wall"
360
360
+
"watch"
361
361
+
"watchdog"
362
362
+
"wc"
363
363
+
"which"
364
364
+
"who"
365
365
+
"whoami"
366
366
+
"whois"
367
367
+
"xargs"
368
368
+
"xxd"
369
369
+
"xz"
370
370
+
"xzcat"
371
371
+
"yes"
372
372
+
"zcat"
373
373
+
"zcip"
374
374
+
];
375
375
+
in
376
376
+
6
377
run { name = "initramfs.cpio"; } ''
7
378
mkdir -p root/bin
8
8
-
cp ${busybox}/bin/busybox root/bin/sh
379
379
+
cp ${busybox}/bin/busybox root/bin/busybox
380
380
+
for applet in ${lib.concatStringsSep " " applets}; do
381
381
+
ln -s busybox root/bin/$applet
382
382
+
done
9
383
10
384
echo '#!/bin/sh' > root/init
11
385
echo 'exec /bin/sh' >> root/init