diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-04-28 18:35:31 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-05-03 17:55:55 +0200 |
commit | f2c1d491a539035d6cc1fa53a7cef0cbc8d52902 (patch) | |
tree | ada41e8437d437c7b3c4e3fe949dbbd48d6b9a22 /src/shared/label.h | |
parent | c4039ceb9e063d72f6afb7bc05d583de55966718 (diff) | |
download | systemd-f2c1d491a539035d6cc1fa53a7cef0cbc8d52902.tar.gz |
switch-root: don't require /mnt/ when switching root into host OS
So far, we invoked pivot_root() specifying /mnt/ as second argument,
which then unmounted right-after. We'd create /mnt/ if needed. This
sucks, because it means /mnt/ must strictly be pre-created on immutable
images.
Remove this limitation, by using pivot_root() with "." as source and
target, which will result in two stacked mounts afterwards: the new one
underneath, the old one ontop. We can then simply unmount the top one,
and have what we want without needing any extra /mnt/ dir.
Since we don't need /mnt/ anymore we can get rid of the extra
unmount_old_root parameter and simply specify it as NULL if we don't
want the old mount to stick around.
Diffstat (limited to 'src/shared/label.h')
0 files changed, 0 insertions, 0 deletions