12

There is a 2TB Time Capsule on my home network (IP 192.168.0.1). How can I mount the Time Capsule's disk from my Raspberry Pi, automatically after reboots?

ohho
  • 299
  • 2
  • 4
  • 12

4 Answers4

14

Put it in fstab.

sudo su
mkdir /mnt/timecapsule
echo "//timeCapsuleIp/Data /mnt/timecapsule cifs user=timecapsuleUsername,pass=timecapsuleUserPassword,rw,uid=1000,iocharset=utf8,sec=ntlm 0 0" >> /etc/fstab

Required cifs-utils package should be already provided on raspbian.

Of course change timecapsuleUsername and timecapsuleUserPassword. The uid=1000 sets owner of mounted files to user pi. If using other user check it's uid with id -u username. Check if "Data" folder is right for you - list resources by issuing command smbclient -Uusername -I ip-address -L.

Hengjie
  • 105
  • 3
RooTer
  • 579
  • 4
  • 6
5

I got adding sec=ntlm to the options, the complete command is:

sudo su
mkdir /mnt/timecapsule
echo "//timeCapsuleIp/Data /mnt/timecapsule cifs user= timecapsuleUsername,pass= timecapsuleUserPassword,rw,uid=1000,iocharset=utf8,sec=ntlm 0 0" >> /etc/fstab

Then, run this command:

mount -a

You should no get any errors.

VictorV
  • 159
  • 1
  • 1
4

Update for users of Raspberry Stretch v9. Note the addition of vers=1.0

//IPofTimeCapsule/PathWithinYourTimeCapsule /mnt/TimeCapsule cifs username=insert,password=insert,rw,uid=1000,iocharset=utf8,sec=ntlm,vers=1.0 0 0
Ingo
  • 42,961
  • 20
  • 87
  • 207
ddavila
  • 41
  • 1
1

For me, when using a disk password on the time capsule, it only worked when I added uid=504 (which is the userID used on the macintosh mainly using the timecapsule, not the uid used on the raspberry). When I didn't put uid=504 then I got "mount error(16): Device or resource busy" back from the time capsule.