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

  • sudo blkid

Make the directory where it will mount to. I put mine in /mnt, but you can put it anywhere you like.

  • sudo mkdir /mnt/DNS323

Edit the fstab file to add you entry.

  • sudo vi /etc/fstab

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.

  • sudo mount -a

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.

  • sudo blkid

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.

  • sudo vi /etc/dhcpcd.conf

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


Topic revision: r4 - 2019-07-19 - TimMcDonald
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback