Mount


Final | 25 Oct 2020

Daftar Isi

Mount Partition

Dalam ubuntu, partisi harus selalu di ‘mount’ terlebih dahulu sebelum di access

  • Cek file system’s physical information

lsblk -f atau blkid

NAME   FSTYPE   LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs                                                  0   100% /snap/core18/1880
loop1  squashfs                                                  0   100% /snap/gtk-common-themes/1506
loop2  squashfs                                                  0   100% /snap/snap-store/467
loop3  squashfs                                                  0   100% /snap/gnome-3-34-1804/36
loop4  squashfs                                                  0   100% /snap/snapd/8542
sda                                                                       
└─sda1 ext4           94ef7372-ae22-4b07-aff8-9328aa97be79   95,4G     8% /
sdb                                                                       
└─sdb1 ntfs     Data  1A722FD8722FB801                

Terlihat pada hardisk saya terdapat partisi bertype ntfs

  • Buat directiry untuk mounting

    sudo mkdir /media/hdd500gb
    
  • edit

    sudo nano /etc/fstab
    

saya menambahkan baris sebagai berikut untuk perintah mount drive sdb1.

#Mount Partisi ntfs
UUID=[No UUID] [Lokasi Mounting] ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000    0   0

cek id

id

uid=1000(final) gid=1000(final) groups=1000(final),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare)

Ex

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=94ef7372-ae22-4b07-aff8-9328aa97be79 /               ext4    errors=remoun>
/swapfile                                 none            swap    sw           >

# Mounting Hdd 500 Gb
UUID=1A722FD8722FB801 /media/hdd500gb ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=1000,uid=1000    0   0

Apabila tidak bisa di execute lakukan Perintah Berikut:
sudo ntfsfix /dev/sdb1

Referensi

https://qastack.id/ubuntu/46588/how-to-automount-ntfs-partitions