Leon Anavi
IT Tips && Tricks

Mobile & Embedded

Created: 23.09.2012 23:18 Last Modified: 30.03.2015 02:36 Views: 29222
Keywords: ARM, raspbian, debian, externalharddrive, hdd, linux, ntfs, rapsberry pi 2, raspberry pi, sda, sdcard, usb

How to Connect an External Hard Drive to Raspberry Pi & Raspberry Pi 2?

Introduction

Recently I received a Raspberry Pi from Nokia QtonPi developer program delivered via Farnell. I would like to demonstrate you how to connect an external hard drive. The Raspberry Pi supports several Linux distributions so attaching external hdd is pretty simple.

Connect External Hard Drive to Raspberry Pi with Raspbian

  • Insert SD card with Debian 6 (Raspbian) or other compatible Linux distribution.
  • Connect a keyboard.
  • Connect an external hard drive. I used a Western Digital My Passport 500GB.
  • Connect the Raspberry Pi to a monitor.
  • Plug the power supply and the Raspberry will automatically boot.
  • Retrieve the location of the external hard drive via the logs:
  • less /var/log/messages | grep sda
  • Create a directory for the external hard drive and mount it to the file system of the OS.
mkdir /mnt/usbdrive
mount –t ntfs /dev/sda1 /mnt/usbdrive

Safety Removal

Please unmount the external hard drive for the file system before disconnecting it physically.
umount /mnt/usbdrive

Troubleshooting

  • The Raspberry Pi might automatically restarts until it detects the external hard drive and recognizes it properly.
  • Please specify the file system type when executing the mount command. The external drive that was used for this demonstration was with NTFS file system.


  Home | About | Contact | Disclaimer | Sitemap © 2009-2022 Leon Anavi. All rights reserved.