Bog'liq Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)
[ 223 ] Analyzing the contents of /etc/fstab When your system boots, it looks at the
/etc/fstab
file to determine where the root
filesystem is. In addition, the location of your
swap
area is read from this file and
mounted at
boot time as well. Your system will also read any other mount points
listed in this file, one per line, and mount them. Basically, just about any kind of
storage you can think of can be added to this file and automatically mounted. Even
network shares from Windows servers can be added here. It won't judge you (unless
you make a typo).
As an example, here are the contents of
/etc/fstab
on one of my machines:
Figure 9.8: Viewing the contents of the /etc/fstab file
When you install Ubuntu Server, the
/etc/fstab
file is created for you and populated
with a line for each of the partitions the installer created during installation. On the
server I used to grab the example
fstab
content, I have a single partition for the root
filesystem, and you can also see where the swap file is mentioned.
Each partition is typically designated with a