This repository has been archived by the owner on May 9, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The problem with bind-mounts is that once we switch-root, they all become *private* mounts. Why does that matter? Well, it means unmounting /sysroot/boot doesn't actually unmount the original /boot.. ..which means /boot is still mounted when we reboot. So we can lose data in recently-written files. Like that new initramfs we just wrote at the end of the upgrade. Which leaves our system unbootable. Daaaang. Whoops. So here's a partial workaround: make the mounts private *before* switch-root, and unmount the *original* copy of /boot before the switch, so the /sysroot/boot copy is the *only* one, so when we unmount that the kernel actually writes everything to disk. Whew. Unfortunately, this doesn't do anything for the root device, but we can work something out for that inside the initramfs.
- Loading branch information