4 ms·
Creating a mount namespace and using pivot_root seems like a safer solution.
by remram 2y ago
Creating a mount namespace and using pivot_root seems like a safer solution.
- alexgartrell 2y agoI don’t think pivot_root is necessary for something like this, but a new mount namespace will definitely help avoid creating a mess on accident
- deleted 2y ago[deleted]
- throwway120385 2y agoCame here to suggest this. pivot_root has the advantage that it can remount the existing root. It's essentially meant for going from an initramfs using linuxrc to boot to a full-on init in the other root filesystem. If things are horribly broken you could use a shell or some other process as init.