While I was reading about storage media I learned that there's a file called fstab which lists the devices that are to be mounted at boot time. However, the example here is different from my fstab file.

My file looks like this :

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=b8a822c2-467f-4914-a28a-34f0553926ac /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=0e14018c-81db-43d4-9bb3-84074f7e9226 none            swap    sw              0       0

The normal one (I guess) looks like this :

LABEL=/home   /home  ext3  defaults   1 1 

What is wrong with mine?

  • The UUIDs that you see there are much more accurate for mounting devices. The UUID is "Universally Unique IDentifier" that is unique to every partition format that is on a hard drive. UUIDs will never change from reboot to reboot, where a drive designation i.e. /dev/sda1 can change on reboot. There is absolutely nothing wrong with your fstab file. – Terrance Jul 15 '16 at 5:24
  • Read man 5 fstab. That explains it all. – waltinator Jul 15 '16 at 5:33

The main difference between these two examples is that yours is referring to partitions by their UUID, rather than another method such as whatever path your kernel chooses for them.

Addressing a partition by its UUID:


Addressing a partition by its kernel path:


Addressing a partition by its label:


The benefit to using the UUID is that if you swap which physical ports they plug into on your motherboard (or mess with your CMOS settings to do the same thing), they will still be identified properly. Likewise you can be sure if you add a new drive or partition it won't conflict.

The UUID is unique to the drive/partition itself, not to the port the drive is plugged into or the order in which it's configured in your CMOS settings.

Using the label can achieve a similar function, but it is probably my least preferred choice, because there is a high likelihood of name conflicts - if you ever attach a new drive that also has a partition with the same label, it becomes ambiguous which one should be chosen.


Nothing is wrong with yours; there are many possible ways to write an fstab. See also man fstab.


If you have not mounted any partition under the mount point /home, then your given /etc/fstab is okay for a swap partition and an ext4 partition which is mounted under "/" root mount point as root partition.

And almost all Linux systems use "ext4" partition system as default unless otherwise stated. And your home directory is there at /home under root partition, :)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.