# Unmounting the root filesystem (/) for resizing without a rescue cd?

I am just trying to figure out if this is possible to do. I am trying to resize a number of filesystems, and to be safe (these are production boxes as well as QA) I wanted to do the resize offline. I have gotten into the server with single user mode and am having no issues unmounting /var, and /opt. However I cannot unmount /. Any ideas would be appreciated, using a rescue cd is not an option.

-

You certainly cannot unmount / ; you could perhaps first pivot_root to another / then umount the previous /, but there always has to be a /, and you cannot unmount a filesystem in use (and if it is /, it must be in use).
The pivot_root to tmpfs is not that hard, it worked really well for me to unmount and resize a root filesystem that didn't allow online resize. Can even do it without a reboot (but I rebooted to clean up at the end). This guy wrote a howto: ivarch.com/blogs/oss/2007/01/… but it can be even easier. You have to know what you're doing! I have a remote console (prgmr.com service), so no need to keep ssh or the network up. Didn't copy anything from /usr so only 150MB RAM neede for tmpfs. telinit u to restart init so it lets go of the old root. –  Sam Watkins Oct 17 '13 at 3:35