5.12.7 About the Installation root File System

The mounted root file system is a snapshot (named install) of the root file system taken at the end of installation. To find out the ID of the parent of the root file system subvolume, use the following command:

# btrfs subvolume list /
ID 258 top level 5 path install 

In this example, the installation root file system subvolume has an ID of 5. The subvolume with ID 258 (install) is currently mounted as /. Figure 5.1, “Layout of the root File System Following Installation” illustrates the layout of the file system:

Figure 5.1 Layout of the root File System Following Installation

The diagram illustrates the layout of the example root file system with the top level subvolume (ID 5) containing the root file system as it existed after installation and the subvolume install (ID 258) containing the currently active root file system.


The top-level subvolume with ID 5 records the contents of the root file system file system at the end of installation. The default subvolume (install) with ID 258 is currently mounted as the active root file system.

The mount command shows the device that is currently mounted as the root file system:

# mount
/dev/mapper/vg_btrfs-lv_root on / type btrfs (rw)
...

To mount the installation root file system volume, you can use the following commands:

# mkdir /instroot
# mount -o subvolid=5 /dev/mapper/vg_btrfs-lv_root /instroot

If you list the contents of /instroot, you can see both the contents of the installation root file system volume and the install snapshot, for example:

# ls /instroot
bin   cgroup  etc   install  lib64  misc  net  proc  sbin     srv  tmp  var
boot  dev     home  lib      media  mnt   opt  root  selinux  sys  usr

The contents of / and /instroot/install are identical as demonstrated in the following example where a file (foo) created in /instroot/install is also visible in /:

# touch /instroot/install/foo
# ls /
bin   cgroup  etc  home      lib    media  mnt  opt   root  selinux  sys  usr 
boot  dev     foo  instroot  lib64  misc   net  proc  sbin  srv      tmp  var
# ls /instroot/install
bin   cgroup  etc  home      lib    media  mnt  opt   root  selinux  sys  usr 
boot  dev     foo  instroot  lib64  misc   net  proc  sbin  srv      tmp  var
# rm -f /foo
# ls /
bin   cgroup  etc   instroot  lib64  misc  net  proc  sbin     srv  tmp  var
boot  dev     home  lib       media  mnt   opt  root  selinux  sys  usr
# ls /instroot/install
bin   cgroup  etc   instroot  lib64  misc  net  proc  sbin     srv  tmp  var
boot  dev     home  lib       media  mnt   opt  root  selinux  sys  usr