I love having a Raspberry Pi

I’ve had a pi for a while. I’ve used it mainly to control my 3D printers but I’m working on building my own little cloud at home and I needed it to start serving as my little always on linux hub now that my larger media server has been taken down in favor of a ChromeCast. I needed to mount my samba share from my Asus RT-N56U and I ran into some small hiccups so I thought I would share some helpful pointers.

The steps outlined below are as follows

  1. Edit your fstab file
  2. Make the directory to mount the samba share to
  3. Test your fstab setup using mount
  4. If needed how to discover the samba share’s “Sharename”

First make sure you have cifs installed (it was on my Wheezy distro). You don’t want to use smbfs.

You’re going to want to just edit your /etc/fstab file and add a single line.

//YOUR_ROUTERS_IP/SHARE_NAME /media/storage cifs username=guest 0 0

If you don’t know your SHARE_NAME look below for instructions on how to figure that out. You then need to make sure the directory specified exists.

sudo mkdir /media/storage

Test through running

sudo mount -a

and then if there are no errors checking /media/storage/ to see if your files are listed. There is no password for the external drive, just click enter through if mount asks you for one. You can confirm it will auto mount by shutting down and restarting the Pi

sudo shutdown -r -t 5 now

If you don’t know the correct LAN address you can use smbclient to figure it out

apt-get install smbclient*

*you may need to apt-get update

then run

smbclient -L //YOUR_ROUTER_IP/
*there is no password, just click through

Then you’ll get a list of information about the samba share on the router. The Sharename is what you want (For me it was Seagate_Expansion_Drive).

I also installed Go on it to be able to play with how much server performance I can get out of it and to test a few other things out. You don’t need to do much other then the standard

apt-get install golang

then just create a gocode directory and add a GOPATH to your bashrc

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *