Find the UUID of a filesystem and add to fstab

por | 4 marzo, 2018

use blkid

sudo blkid
/dev/sda2: LABEL="NTFSDISK" UUID="8C14553212372BD7" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6120d102-a321-2dg3-a3c2-abc3b31313a3"
/dev/sda1: UUID="727cac18-044b-4504-87f1-a5aefa774bda" TYPE="ext3"
/dev/sdb: UUID="467c4aa9-963d-4467-8cd0-d58caaacaff4" TYPE="ext3"

Find UUID and add to fstab

#
# /etc/fstab
# Created by anaconda on Fri Feb 2 13:55:13 2018
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/centos_cmini-root / xfs defaults 0 0
UUID=f102ede3-21c3-23ef-82c1-cb1c382118b2 /boot xfs defaults 0 0
UUID=11G5-11B9 /boot/efi vfat umask=0077,shortname=winnt 0 0
/dev/mapper/centos_cmini-home /home xfs defaults 0 0
/dev/mapper/centos_cmini-swap swap swap defaults 0 0
UUID=8C14553212372BD7 /mnt/ntfs ntfs-3g rw,umask=0000,defaults 0 0