On Wed, 18 Nov 2009, Daniel Drake wrote: > 1. cd /sysroot > 2. mount --move . / > 3. chroot . > 4. cd / > 5. chdir /versions/run/1 > 6. chroot . > 7. cd / > 8. exec /sbin/init > > This works well and the system functions as normal. However, I've > noticed that during shutdown, the root filesystem is never unmounted > cleanly. > > "mount -o remount,ro /" always fails due to this check in do_remount(): > if (path->dentry != path->mnt->mnt_root) { > return -EINVAL; > > Obviously the dentry for the / path that we are trying to unmount is not > the actual root of the mount. However the root of the mount is long > gone, so I'm not sure what we can do. And shutting down cleanly is > obviously important! You can easily make a directory a root of a mount with mount --bind $DIR $DIR In your example, add this before 5. Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html