Skip to content

mount --move . / is missing in switch_root? #557

@tonnyl97

Description

@tonnyl97

Hi!

It looks like change c04b565 removes the step of mount(newroot, "/", NULL, MS_MOVE, NULL) and leads to incorrect view of mount point for my systemd init. systemd's component are also somehow affected.

root@ubuntu:~# lsof | grep new_root
systemd-u  633                           root  cwd       DIR              253,1     4096          2 /new_root
systemd-u  633                           root  rtd       DIR              253,1     4096          2 /new_root
systemd-u  633                           root  txt       REG              253,1   723968     133920 /new_root/usr/lib/systemd/systemd-udevd
systemd-u  633                           root  mem       REG              253,1               23958 /new_root/usr/lib/aarch64-linux-gnu/libnss_files-2.31.so (stat: No such file or directory)

Please kindly check this issue.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions