-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinitramfs.file
More file actions
70 lines (58 loc) · 2.34 KB
/
initramfs.file
File metadata and controls
70 lines (58 loc) · 2.34 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
# file <name> <location> <mode> <uid> <gid> [<hard links>]
# dir <name> <mode> <uid> <gid>
# nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>
# slink <name> <target> <mode> <uid> <gid>
# pipe <name> <mode> <uid> <gid>
# sock <name> <mode> <uid> <gid>
#
# <name> name of the file/dir/nod/etc in the archive
# <location> location of the file in the current filesystem
# expands shell variables quoted with ${}
# <target> link target
# <mode> mode/permissions of the file
# <uid> user id (0=root)
# <gid> group id (0=root)
# <dev_type> device type (b=block, c=character)
# <maj> major number of nod
# <min> minor number of nod
# <hard links> space separated list of other links to file
#
# VARIABLES SUBSTITUTED
# PROFILE -- to select between target/{debug,release}/pefoo
# CRUN -- path to crun binary
#
# TODO some of this might be faster/easier to just create in peinit
# dirs should be faster in here since it is all kernel esp the owner + perms
dir /dev 0755 0 0
dir /proc 0755 0 0
dir /sys 0755 0 0
dir /sys/fs 0755 0 0
dir /sys/fs/cgroup 0755 0 0
# pivot dir for parent rootfs
dir /abc 0755 0 0
dir /mnt 0755 0 0
# workdir for overlayfs
dir /mnt/work 0755 0 0
# where the squashfs/erofs multi-image gets mounted
dir /mnt/image 0755 0 0
# where we bind mount the actual image's rootfs
dir /mnt/rootfs 0755 0 0
# root of upper in overlayfs to overlay the /run dir over rootfs
dir /mnt/upper 0777 1000 1000
dir /run 0777 0 0
dir /run/bundle 0755 0 0
dir /run/bundle/rootfs 0755 0 0
dir /run/crun 0777 0 0
dir /run/input 0777 1000 1000
# this is a mount point for a tmpfs so we don't create /run/output/dir here
dir /run/output 0777 1000 1000
dir /bin 0755 0 0
file /bin/crun $CRUN 0555 0 0
file /bin/pearchive target/x86_64-unknown-linux-musl/$PROFILE/pearchive 0555 0 0
file /init target/x86_64-unknown-linux-musl/$PROFILE/peinit 0555 0 0
# TODO pull these from maybe somewhere else
# busybox is https://www.busybox.net/downloads/binaries/1.35.0-x86_64-linux-musl/busybox
# but strace was a custom build locally
file /bin/busybox busybox 0555 0 0 #@ REMOVE_IN_RELEASE
slink /bin/sh /bin/busybox 0555 0 0 #@ REMOVE_IN_RELEASE
file /bin/strace strace 0555 0 0 #@ REMOVE_IN_RELEASE