12 lines
815 B
Markdown
12 lines
815 B
Markdown
|
After basic bootstrapping, the source for the rootfs needs to be found, via hardware coldplugging and if wanted, a device manager to extend what the kernel provides by default.
|
||
|
|
||
|
This is provided by nlplug-findfs on Alpine Linux.
|
||
|
|
||
|
Once the block is present it can be mounted, but care must be taken so that the filesystem is either autodetected or provided to the mount call.
|
||
|
|
||
|
Once sysroot is mounted, all special filesystems that have been so far mounted and optionally everything else must be moved over to new root.
|
||
|
|
||
|
switch_root claims to move /dev, /proc, /sys and /run but this is probably only true for the coreutils switch_root. Care should be taken that these mounts are moved manually ahead of time to ensure presence.
|
||
|
|
||
|
switch_root must be exec'd to overtake PID 1 and continue the init in the true rootfs.
|