summaryrefslogtreecommitdiff
path: root/experiments/03_20251130_leaving_initramfs/README
blob: a458ac280cfdb23443611cb58babea7562c30891 (plain)
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
Goal: boot into initramfs and switch to real system
Status: success

Added busybox to the mix, incredibely useful here

init script will create new_root, mount tmpfs there and copy all the binaries
from initramfs to it so we have something to work with. It'll also mount /proc,
/dev and /sys. After that's done it'll switch root and run busybox shell as new
PID 1.

there's a /new_root/cake file created by the script to confirm that we indeed
changed the root

Useful resources:
- https://github.com/torvalds/linux/blob/v4.17/Documentation/filesystems/ramfs-rootfs-initramfs.txt
- https://www.kernel.org/doc/html/latest/admin-guide/initrd.html (obsolete but useful)

Package list:
busybox-static_1.37.0-7_amd64.deb
dash_0.5.12-12_amd64.deb
gcc-14-base_14.2.0-19_amd64.deb
libblkid1_2.41.2-4_amd64.deb
libc6_2.41-12_amd64.deb
libc-bin_2.41-12_amd64.deb
libgcc-s1_14.2.0-19_amd64.deb
libmount1_2.41.2-4_amd64.deb
libpcre2-8-0_10.47-2_amd64.deb
libselinux1_3.9-4_amd64.deb
libsmartcols1_2.41.2-4_amd64.deb
mount_2.41.2-4_amd64.deb
util-linux_2.41.2-4_amd64.deb