Raspberry PI
Mounting a NAS drive
Install Samba (smbfs is deprecated, cifs-utils replaces it)
- sudo apt-get install cifs-utils
Install Samba Client (not really necessary, but why not)
- sudo apt-get install smbclient
Capture the current list of devices
Make the directory where it will mount to. I put mine in /mnt, but you can put it anywhere you like.
Edit the fstab file to add you entry.
Add the following line
- //192.168.0.101/Volume_1 /mnt/DNS323 cifs username=guest,password=,uid=1000,gid=1000,iocharset=utf8 0 0
Replace IP, username and password for access to the NAS with the appropriate details.
Mount the drive.
To auto-mount the NAS drive at boot time. List the devices attached. You should see the one you have just mounted (compare to earlier step). Use the UUID discovered for the drive.
Edit /etc/ftab and add the UUID at the start of the line set earlier:
- UUID="XXXX-YYYY" //192.168.0.101/Volume_1 /mnt/DNS323 cifs username=dns322user,password=mypass,uid=1000,gid=1000,iocharset=utf8 0 0
Copying an image to the SD card
dd bs=4M if=<input file> of=/dev/sdX conv=fsync
Setting a static IP address
Edit the dhcpcd.conf file.
Scroll to the end of the config file and add one of the two following code snippets. eth0 = wired, wlan0 = wireless:
interface eth0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
interface wlan0
static ip_address=192.168.0.10/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
If error occurs that can't update due to release not valid yet
sudo apt-get update --allow-releaseinfo-change
Comments