0

Saying this is how the world looks like before pivot_root,

/
/bin
/sbin
/etc
/lib
/proc
/sysfs
.....

When I call "pivot_root /newroot /newroot/oldroot", what happened to all these folders above?

We get a nude "/" and whole old world resides in "/oldroot"??

/
/oldroot
/oldroot/bin
/oldroot/sbin
/oldroot/lib
/oldroot/etc

But then who created /bin, /sbin, and /proc, /sysfs in the new world?

kumo
  • 227
  • 1
  • 10

1 Answers1

1

Before doing the pivot_root, one should care to do the "mount --move" for all the necessary /proc, /dev, etc... whatever required to be available.

Anton
  • 976
  • 8
  • 9