AutoFsck - Technical Review

Phillip Susi psusi at
Tue Aug 19 16:52:20 BST 2008

Krzysztof Lichota wrote:
> I have hit the same problem. I wanted to unmount the root partition
> (by doing pivot_root trickery), but I couldn't make it work. If
> someone knows how to do it, I would be very interested in the
> solution.

I believe that pivot_root is considered depreciated.  IIRC, the new 
method being used in the initramfs is to mount the real root in /root, 
unlink all other files in /, then chroot into /root and exec init.

That means you should be able to escape the chroot back to the real 
rootfs ( using the chroot to subdir without cwd there trick ), 
repopulate it with copies of all the files you will need to run the 
check, kill off all other running processes, then exec another binary 
you just placed in the rootfs which will umount /root, run the fsck, and 

More information about the ubuntu-devel mailing list