logo
background
 Home and Links
 Your PC and Security
 Server NAS
 Wargames
 Astronomy
 PhotoStory
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>

Notes index links

Links to all my notes (includes mini-projects and source code etc)

(+) 0001 How do I change the Pi System partition size ?

(+) 0100 Device tree settings

(+) 0201 Power over Ethernet - (PoE)

(+) 0202 Solar Power - (with WiFi)

(+) 0203 Power Bank pass through

(+) 0400 Accessing the SDHC card system image



(-) 0401 Accessing PC shares from the Pi


Mounting a network 'share' on the Pi

It is, apparently, quite possible to access a Windows PC 'share' from the Pi by simply 'mounting' it = and this is a LOT simpler than trying to install 'samba' and dealing with all the "Could not resolve 'mirrordirector.raspbian.org'"  errors (which is required before you can see Pi shares on a PC)

You should, in fact, be able to 'mount' any existing 'share' on your LAN, including your NAS / Server 'back-up' folders etc.

You start by creating the 'share' on your LAN (eg 'share' a folder on your PC / NAS / Server). You will need to note the share name and the details of a user account (on the PC/NAS etc) that has access to the share.

At the Pi command line, start by creating a 'directory' to act as the mount point:-
sudo mkdir mount-point-dir

Now connect to the Windows share using the mount command:-
sudo mount -t cifs -o username=username,password=password //server-name/share-name mount-point-dir

NB. the PC's IP address can be used in place of 'server-name'

You can now treat the directory (mount-point-dir) just like any other folder on the Pi (ls to list the contents, cd to move to a different folder, cp to copy files etc.)

To unmount the Windows share, use the umount command:
sudo umount mount-point

.. or just reboot the Pi

If you want the 'share' to be mounted automatically after a re-boot (i.e. when you log on), you'll need to add the mount details to fstab :-

You need to create a mount point in /mnt for the PC share point.
sudo mkdir /mnt/share-mount

Now edit your fstab:
sudo nano /etc/fstab

Add a new entry in the following format:
//pc-server/pc-share /mnt/share-mount cifs defaults,rw,username=pc-username,password=pc-user-password,domain=pc-workgroup-name 0 0

Where :
pc-server is the IP address (or NetBIOS name) of your PC,
pc-share is the name of the share that you created on your PC
share-mount is the name of the mount point you have just created.
pc-username and pc-user-password are a valid account on the PC (that has access to the Windows share).
The 'domain' is used the Windows domain or workgroup (i.e. not specifically a domain) = note this is required in fstab (a manual mount at the command line will work without the domain keyword)

To avoid rebooting, you can 'refresh' the shares from the command line :-

sudo mount -av

This note last modified: 17th Sep 2016 08:10.

[top]

(+) 0402 Installing samba - (the Pi as a Network Share on your PC)

(+) 0900 Can this approach be scaled up to a PC UPS ?

(+) 1001 Pandora Spotify on the Pi

(+) 1002 Playing movies on the Pi

(+) 1003 Getting VGA from the HDMI socket

(+) 1004 Using the RCA socket

(+) 1005 Using the Pi RS232 serial links

(+) 1006 Using the GPIO pins

(+) 1007 Controlling the Pi Zero ACT LED

(+) 1200 List of standard camera modes

(+) 1300 Auto file names

(+) 6500 How to make the System partition read only ?

(+) 6501 Minimising SDHC corruption on power down

(+) 9000 diode switch

(+) 9001 Auto shut down

(+) 9001 MOSFET switch

(+) C201 High speed photos

(+) Dec 1969 (no desc)

(+) a000 Display setup - (for PhotoFrame)

(+) a001 go photoframe - (how it works)

(+) a002 set photo - (select for display)

(+) a003 go button script - (photoframe pause control)

(+) a005 get photos - (fetch resize)

(+) a00x Other display utilities

(+) c000 CCTV UPS requirements

(+) c001 countering low speed motion detect

(+) c002 Pi Overclocking

(+) c203 Pi ram disk - (tmpfs)

(+) c901 iR illumination

(+) c902 Viewing a video stream

(+) c905 Image anotation

(+) Dec 1969 (no desc)

(+) raspicamdocs.txt (no desc)

(+) s010 Elevation sensing

Next subject :- index

[top]