Project Wild Penguin 18.4.2017: Label Partitions and Automount on Startup
Label Partitions:
To label partitions on Linux based system from command line, follow the process given below:Replace
/dev/sdxN with your partition (e.g. /dev/sdc1).- for FAT32:
or:sudo mlabel -i /dev/sdxN ::"my_label"
sudo fatlabel /dev/sdxN my_label - for NTFS:
sudo ntfslabel /dev/sdxN my_label - for exFAT:
sudo exfatlabel /dev/sdxN my_label - for ext2/3/4:
sudo e2label /dev/sdxN my_label - for BTRFS:
sudo btrfs filesystem label /dev/sdxN my_label
Automount Partitions:
To automount partitions on startup, follow the process given below:
Fire up a terminal.
Examples for the
Use
(Note that specifying the

- [IMPORTANT]
sudo cp /etc/fstab /etc/fstab.old- Create a backup of the fstab file just in case something unwanted happens. sudo blkid- Note the UUID of the partition you want to automount.sudo nano /etc/fstab- Copy the following line to the end of the file, save it and reboot afterwards to check if it worked.
UUID=<uuid> <pathtomount> <file system> uid=<userid>,gid=<groupid>,umask=0022,sync,auto,rw 0 0Examples for the
<> variables:<uuid>=3087106951D2FA7E
<pathtomount>=/home/data/
<file system>=ntfs-3g (for an NTFS partition)
<userid>=1000
<groupid>=1000Use
id -u <username> to get the userid and id -g <username> to get the groupid.(Note that specifying the
sync option can slow down write performance as it disables the cache. async is the default.)
Sources:
- https://askubuntu.com/questions/276911/how-to-rename-partitions
- https://askubuntu.com/questions/164926/how-to-make-partitions-mount-at-startup-in-ubuntu-12-04
Comments
Post a Comment