|
|
Log in / Subscribe / Register

pivot_root()?

pivot_root()?

Posted Mar 14, 2026 13:54 UTC (Sat) by Nikratio (subscriber, #71966)
In reply to: pivot_root()? by NYKevin
Parent article: Practical uses for a null filesystem

> My (possibly wrong) interpretation is that this is not a filesystem-level restriction, but a mounting restriction. In other words, the problem is not that there's some specific "rootfs" filesystem that is unable to be pivoted. Rather, the problem is that, post-boot, the mount system is unable to represent a state where nothing is mounted. Presumably, the pivot_root() syscall would need to transition through such a state, and working around this limitation is either impossible or not worth the complexity.

I think that interpretation boils down to "the pivot _root system call fundamentally does not work", since pivoting ing the root filesystem is the one and only thing this system call is supposed to do. I highly doubt this would have been added if it never works.


to post comments

pivot_root()?

Posted Mar 16, 2026 17:41 UTC (Mon) by NYKevin (subscriber, #129325) [Link]

Per the man page, it changes the root filesystem *for the current mount namespace.* As described under NOTES, this is primarily useful for setting up containers. It was at one point also used during boot, but this is (apparently) no longer possible.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds