Setup ntfs » Historie » Version 1
Jeremias Keihsler, 12.01.2017 16:52
| 1 | 1 | Jeremias Keihsler | h1. Install ntfs-support |
|---|---|---|---|
| 2 | |||
| 3 | h2. Requirements |
||
| 4 | |||
| 5 | To install ntfs-support you will need the following: |
||
| 6 | * a installed and supported operating system (e.g. Raspian Jessie) |
||
| 7 | * root-access |
||
| 8 | * a fast internet connection |
||
| 9 | |||
| 10 | h2. Preliminary Note |
||
| 11 | |||
| 12 | This procedure is based on http://www.techjawab.com/2013/06/how-to-setup-mount-auto-mount-usb-hard.html |
||
| 13 | |||
| 14 | There is no native support for NTFS, so use this filesystem on your own risk. |
||
| 15 | *do not use encrypted ntfs* |
||
| 16 | |||
| 17 | h2. Install |
||
| 18 | |||
| 19 | Install @ntfs-3g@: |
||
| 20 | |||
| 21 | <pre><code class="bash"> |
||
| 22 | sudo apt-get install ntfs-3g |
||
| 23 | </code></pre> |
||
| 24 | |||
| 25 | h2. Usage |
||
| 26 | |||
| 27 | Plug in your USB HDD / Drive to Raspberry Pi |
||
| 28 | |||
| 29 | Log on pi using ssh terminal and execute: |
||
| 30 | <pre><code class="bash"> |
||
| 31 | ls -l /dev/disk/by-uuid/ |
||
| 32 | </code></pre> |
||
| 33 | |||
| 34 | You will see something like the following: |
||
| 35 | |||
| 36 | <pre><code class="bash"> |
||
| 37 | lrwxrwxrwx 1 root root 10 Jan 1 1970 0AC4D607C4D5F543 -> ../../sda1 |
||
| 38 | </code></pre> |
||
| 39 | |||
| 40 | Note down the value of the UUID --> @0AC4D607C4D5F543@ |
||
| 41 | |||
| 42 | Create a location for mount point: |
||
| 43 | <pre><code class="bash"> |
||
| 44 | sudo mkdir /media/NASDRIVE |
||
| 45 | </code></pre> |
||
| 46 | |||
| 47 | Give proper permission: |
||
| 48 | <pre><code class="bash"> |
||
| 49 | sudo chmod 775 /media/NASDRIVE |
||
| 50 | </code></pre> |
||
| 51 | |||
| 52 | Mount the USB Drive and then check if it is accessible at /media/NASDRIVE |
||
| 53 | <pre><code class="bash"> |
||
| 54 | sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /media/NASDRIVE |
||
| 55 | </code></pre> |
||
| 56 | |||
| 57 | Note: |
||
| 58 | ntfs-3g for NTFS Drives |
||
| 59 | vfat for FAT32 Drives |
||
| 60 | ext4 for ext4 Drives |
||
| 61 | |||
| 62 | Now, we will configure RasPi to do this after every reboot: |
||
| 63 | |||
| 64 | Take a backup of current fstab |
||
| 65 | <pre><code class="bash"> |
||
| 66 | sudo cp /etc/fstab /etc/fstab.backup |
||
| 67 | </code></pre> |
||
| 68 | |||
| 69 | Add the mount information in the fstab file: |
||
| 70 | <pre> |
||
| 71 | UUID=0AC4D607C4D5F543 /media/NASDRIVE ntfs-3g rw,defaults 0 0 |
||
| 72 | </pre> |
||
| 73 | |||
| 74 | Reboot |
||
| 75 | <pre><code class="bash"> |
||
| 76 | sudo reboot |
||
| 77 | </code></pre> |
||
| 78 | |||
| 79 | Turn on the GUI mode by sudo raspi-config, only if required. |
||
| 80 | You should see your USB drive automatically mounted at @/media/NASDRIVE@ |