This will be a quick post about how you would mount an external hard drive to a Raspberry Pi or any linux machine

Check to see to new drive is been seem by the OS

$ 😆 😆  sudo blkid
/dev/mmcblk0p1: LABEL_FATBOOT="system-boot" LABEL="system-boot" UUID="5496-E6C8" TYPE="vfat" PARTUUID="f66f0719-01"
/dev/mmcblk0p2: LABEL="writable" UUID="675ba907-3741-428c-afa4-c00f1b649e3c" TYPE="ext4" PARTUUID="f66f0719-02"
/dev/sda1: LABEL="One Touch" UUID="60B9-EB12" TYPE="exfat" PARTUUID="a9cb6aa4-01"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs" 

We can see that /dev/sda1 is the driver for the Portable Hard Drive, in this case it is a SEAGATE - One Touch Portable Hard Drive. We can also confirm this by using sudo fdisk –l

$ 😆 😆  sudo fdisk -l
Disk /dev/loop0: 48.98 MiB, 51335168 bytes, 100264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 57.42 MiB, 60198912 bytes, 117576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 48.98 MiB, 51331072 bytes, 100256 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 57.42 MiB, 60194816 bytes, 117568 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 60.68 MiB, 63610880 bytes, 124240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 28.7 MiB, 29433856 bytes, 57488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 61.98 MiB, 64962560 bytes, 126880 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 28.22 MiB, 29581312 bytes, 57776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mmcblk0: 238.3 GiB, 255869321216 bytes, 499744768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf66f0719

Device         Boot  Start       End   Sectors  Size Id Type
/dev/mmcblk0p1 *      2048    526335    524288  256M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      526336 499744734 499218399  238G 83 Linux


Disk /dev/sda: 931.53 GiB, 1000204885504 bytes, 1953525167 sectors
Disk model: One Touch HDD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xa9cb6aa4

Device     Boot Start        End    Sectors   Size Id Type
/dev/sda1        2048 1953523711 1953521664 931.5G  7 HPFS/NTFS/exFAT

The drive will need to mounted to the OS so thats its storage will be usage: sudo mount /dev/sda1 /mnt

As long as the drive isn’t being accessed at the the time, you will be able to unmount the drive by running: sudo umount /mnt

All done!

Share on LinkedIn
Share on Reddit