User Tools

Site Tools


hardware:data-storage:start

Data storage device

Mount HD usb automatically at PC start up

Let <my-HD> be the external hard disk that we want mount automatically and already connected to the PC, then:

  1. make folder in /media in which it will be mounted:
    sudo mkdir /media/<my-HD>
  2. list all HDs according to their UUID name, which doesn't change every time the HD is mounted:
    sudo blkid

    with output like:

    /dev/sda1: UUID="036a188d-51ac-4fe4-8526-9f0c2512fe0b" TYPE="ext4" 
    /dev/sda5: UUID="79511fe3-2a67-490e-b3ba-95b5bf40508c" TYPE="swap" 
    /dev/sdf1: LABEL="<my-HD>" UUID="EE7EB0C67EB0893B" TYPE="ntfs"
  3. Open /etc/fstab, with root permission, and, at the end of the file, add the right UUID name for <my-HD>:
    # HD external
    UUID=EE7EB0C67EB0893B /media/<my-HD> ntfs rw,nosuid,nodev,allow_other,default_permissions,uid=1000,gid=46,umask=000 0 0
  4. Save.
hardware/data-storage/start.txt · Last modified: 2020/04/03 09:36 (external edit)