Filesystem Administration  «Prev 

Unmounting root Partition in Red Hat

If you wish to unmount your root partition and modify the filesystem parameters, get rescue software for Linux.
Use the rescue software, then use tune2fs to make the modifications.
To detach a previously mounted file system, use either of the following variants of the umount command:
  1. umount directory
  2. umount device
When a file system is in use (for example, when a process is reading a file on this file system), running the umount command will fail with an error.
To determine which processes are accessing the file system, use the fuser command in the following form:
fuser -m directory
For example, to list the processes that are accessing a file system mounted to the /media/cdrom/ directory, type:
~]$ fuser -m /media/cdrom /media/cdrom: 1793 2013 2022 2435 10532c 10672c

Red Hat Linux Certification

How do I unmount root partition in Red Hat?

In Red Hat, the umount command is used to unmount a file system from the file hierarchy. To unmount a root partition, you will first need to log in as the root user or use sudo to execute the command with administrator privileges.
Here is the basic syntax of the command to unmount the root partition:

umount /path/to/root/partition

For example, if the root partition is located at /dev/sda1, you would run the following command:
umount /dev/sda1

Execute while system is running

It is important to note that you should not unmount the root partition while the system is running and actively using it, as this could cause data loss or system crashes. If you want to change the partition while the system is running, you should use other tools like lvm and resize2fs to change size of the partition. Before unmounting the root partition, it's a good practice to check whether the partition is in use or not by using command

df -h
or
lsof | grep /path/to/root/partition
Also, you may want to unmount other filesystems which are mounted on the root partition before unmounting it.