-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prepare-root: avoid double-stacked /sysroot mount
prepare-root works with the mount that has been set up at /sysroot. It creates a bind-mount within /sysroot (the deployment) and then moves that mount to /sysroot. Now we have 2 mounts both at /sysroot, and once we do switch_root, we will never be able to unmount both of them. I'm not sure if this is ultimately a kernel bug, but either way, ostree could do a bit more tidying up after itself. http://thread.gmane.org/gmane.linux.file-systems/92411 Easy way to reproduce: 1. Boot with rd.break param 2. At initramfs shell, run: ostree-prepare-root /sysroot 3. Observe two /sysroot mounts in /proc/mounts Fix this by setting up the mounts at /sysroot.tmp, and unmounting the original /sysroot before our new mount is MS_MOVEd on top of it.
- Loading branch information
Showing
1 changed file
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters