how to umount /

I mount /dev/hd0t79 as “/” first,then I want to make it readonly,I want to use “mount -r -qnx4 /dev/hd0t79 /”,but I must umount it first,When I use “/” it tells me “the resource busy”,How to do?

“/” is the root of the pathname space, not just filesystem.

If it could be umounted what would happen to /dev/shmem, /dev/con, /dev/random, etc?

When a filesystem is mounted into “/” the filesystem contents are grafted into the existing pathname space (in other words “/” exists in the path space before the drive is mounted).

You need to umount the partition, not the root (umount /dev/hd0t79) then remount it. If any file is in use on the partition you may not be able to umount.

umount /dev/hd0t79,also failed

Is this your primary boot drive?

Before you umount has any executable or library been loaded from the drive?

If it’s for QNX6 you can do mount -r -u …

mount -r /dev/hd0t79 /, failed ,why can’t mount to “/”?

Is /dev/hd0t79 your boot drive?


QNX6, right? You may not be able to do what you want. When you boot off the drive the binary for each executable loaded is kept busy (probably allowing for some future swap capability that hasn’t been built yet). I don’t think you can remount a drive when there are busy files on it. If every single file referenced is in the IFS, and not loaded from the drive at boot, then it seems it should be possible.

Did you try mount -r -u …, there is no need to unmount it.

mario,you are right! thank you ,:slight_smile: