summaryrefslogtreecommitdiff
path: root/init/switch_root.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Copy snapuserd to first_stage_ramdiskKelvin Zhang2022-03-191-1/+2
| | | | | | | | | | Certain binaries, such as snapuserd, are only available under /system/bin. To make them accessible by first stage init, we copy /system/bin/snapuserd to /first_stage_ramdisk/system/bin/snapuserd . Test: th Bug: 219841787 Change-Id: I913425a82905c745a05ac32d488f08506dc264ff
* Reland: "init: chroot from recovery to /first_stage_ramdisk"Tom Cherry2018-11-091-55/+3
| | | | | | | | | | | | | | | | | | | | | | | | When using the recovery image as a trampoline to boot the system, first chroot from the recovery image to /first_stage_ramdisk, to minimize differences between these two boot paths. Primary motivation is due to the fact that the basename of each mount point is used by device-manager to name its nodes, and the previous code that created used /system_recovery_mount as the mount point for system.img broke AVB. Instead of hacking around that issue, this change unified mounting for the recovery trampoline and true first stage ramdisk paths. Change when relanding: the original change skipped the move mount from /first_stage_ramdisk to / and only did a chroot instead. This was a mistake that resulted in the subsequent move mount of /system to / to mount over the '/' directory instead of moving that mount. This change uses a bind mount of /first_stage_ramdisk to itself instead of skipping the first move mount. Bug: 114062208 Test: AVB works with blueline_mainline Change-Id: I65207edfe98531892da2eafcbff19b438c9c64fe
* Revert "init: chroot from recovery to /first_stage_ramdisk"Tom Cherry2018-11-091-8/+58
| | | | | | | | This reverts commit 56999b41af9c553787a2436ce4067aca04aa2dc6. Reason for revert: Something is broken here; we're not switching to /system properly. Change-Id: I777fedcfb545c11275c9cc12f99b99a2423959a0
* init: chroot from recovery to /first_stage_ramdiskTom Cherry2018-11-081-58/+8
| | | | | | | | | | | | | | | | | When using the recovery image as a trampoline to boot the system, first chroot from the recovery image to /first_stage_ramdisk, to minimize differences between these two boot paths. Primary motivation is due to the fact that the basename of each mount point is used by device-manager to name its nodes, and the previous code that created used /system_recovery_mount as the mount point for system.img broke AVB. Instead of hacking around that issue, this change unified mounting for the recovery trampoline and true first stage ramdisk paths. Bug: 114062208 Test: AVB works with blueline_mainline Change-Id: Iffb154962b6e160150917e068f1e7d0bf7cb84e7
* Switch root to /system in first stage mountTom Cherry2018-08-231-0/+151
Bug: 79173823 Bug: 79758715 Test: boot hikey and observe that /system is the new root Change-Id: I22f58f1332150ebae8e7e24eccfe780ff29eba7f