Recipe: 009-Map Network Share
Recipe Card
009 : Map Network Share
Recipe Files | Ingredients |
---|---|
(flavour)_root.txt | 009-map-network-share_INGREDIENTS.zip |
Tested: Raspbian |
WARNING: This recipe also requires the following recipe(s) to be setup on the SD-Card:
See the markdown version of this recipe on the Pi-Kitchen GitHub site see:
Description
By using the Samba share setup by Recipe 007: Network Share we can access the files on the Raspberry Pi from other computers. However, we can also share files over the network by accessing files which are located on other computers (or network drives if you have one).
You will need a standard Windows share setup on your network (or a linux Samba share – such as another Raspberry Pi with a shared folder).
Next update the mapnetworkshare.sh
script located in the _SETTINGS/009-map-network-share
directory to include the network share, mounting folder (and if required the username and password).
NOTE: You may find that you have to use the IP address of the computer (i.e. 192.168.0.10) you want to connect to, rather than its hostname (i.e. PCNAME).
References
For more details about mounting network shares, see the following site (which provided the details needed to create this recipe):
Raspberry Pi Adventures – Mounting and Automounting Windows Shares on Raspberry Pi
How to use
Update the details in the ‘mapnetworkshare.sh’ script to include the network path of the shared directory (and username and password if applicable).
Ingredients
The ingredient files should be placed in the following location on the NOOBS RECOVERY partition:
pi-kitchen/009-map-network-share
This recipe uses the following files:
dummydir.txt
bin/_RUNSTART/mapnetworkshare.sh
Plus the following files in the _SETTINGS folder:
It is assumed that the following file(s) are placed in the following location on the NOOBS RECOVERY partition:
pi-kitchen/_SETTINGS/009-map-network-share
You will need the following _SETTINGS file(s):
009-map-network-share/mapnetworkshare.sh
NOTE: Files which are configured manually or may contain sensitive information are placed in the _SETTTINGS directory on the SD-Card. This is so that it is easier to support different configurations and remove sensitive information from the setup if needed.
Perform the following actions:
Ensure you update the ‘mapnetworkshare.sh’ script to include the network path of the shared directory (and username and password if applicable).
You can download all the ingredient files, and extracted directly to the NOOBS SD-Card (ensuring you remove the ZIP file’s name from the directory – the files should be extracted to pi-kitchen/009-map-network-share
).
The Recipe Files
Each recipe will use one file for each of the partitions it installs to – boot, root and data).
You will need to suitably rename or copy the content of each of the following files into your recipe files (i.e. RaspbianPiKitchen_root.txt
) and place them in your os folder in the NOOBS partition (i.e. os/Raspbian
).
For more information see the Pi-Kitchen: Creating Flavours guide.
# #Recipe: 009-map-network-share #- Create mount location ../../pi-kitchen/009-map-network-share/dummydir.txt /home/pi/network #- Add script to _RUNSTART folder ../../pi-kitchen/_SETTINGS/009-map-network-share/mapnetworkshare.sh /home/pi/bin/_RUNSTART
Enjoy baking your Raspberry Pi SD-Card fresh from the Pi-Kitchen.
[…] Recipe: 009-Map Network Share […]