Once installed, connect online, open the terminal and run
sudo apt-get update && sudo apt-get upgrade
Open Preferences > Raspberry Pi Configuration and select to boot to CLI. Don't restart yet.
On newer versions SSH is disabled by default. To enable it:
- Launch Raspberry Pi Configuration from the Preferences menu
- Navigate to the Interfaces tab
- Select Enabled next to SSH
- Click OK
- Enter sudo raspi-config in a terminal window
- Select Interfacing Options
- Navigate to and select SSH
- Choose Yes
- Select Ok
- Choose Finish
Disconnect from the display and keyboard, connect to router via LAN. Connect the drives which will be available from the Pi.
Plug in the power, and access it via SSH. Default hostname is raspberrypi
, username pi
and password is raspberry
.
ssh pi@raspberrypi
If can't connect via hostname, try looking for Pi's IP address using
arp -a
Install ntfs-3g
to be able to access NTFS drives with:
sudo apt-get install ntfs-3g -y
Then find out the drives connected and their filesystems:
lsblk -f
It will output something like
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 vfat EFI 67E3-17ED
└─sda2 ntfs qDrive 7206BEEA06BEAF0B
sdb
└─sdb1 ntfs Jebeno Veliki Disk 1450E3C750E3AE24
Mount points, UUID and filesystem can also be discovered using blkid
.
sudo blkid
/dev/mmcblk0: PTUUID="000d59fd" PTTYPE="dos"
/dev/mmcblk0p1: LABEL="RECOVERY" UUID="6182-6A41" TYPE="vfat" PARTUUID="000d59fd-01"
/dev/mmcblk0p5: LABEL="SETTINGS" UUID="25655052-1f86-422f-ba13-95fb43cc5014" TYPE="ext4" PARTUUID="000d59fd-05"
/dev/mmcblk0p6: LABEL="boot" UUID="016B-29F2" TYPE="vfat" PARTUUID="000d59fd-06"
/dev/mmcblk0p7: LABEL="root" UUID="9a57d527-35a7-4743-abdc-f673efecd3c5" TYPE="ext4" PARTUUID="000d59fd-07"
/dev/sda1: LABEL="EFI" UUID="67E3-17ED" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="fabdb918-3ca6-4d82-9db5-9f1a5cfc3128"
/dev/sda2: LABEL="qDrive" UUID="7206BEEA06BEAF0B" TYPE="ntfs" PARTLABEL="QDRIVE" PARTUUID="1b7f7a1e-67c0-4309-97cc-f21d7a5cffd1"
/dev/sdb1: LABEL="Jebeno Veliki Disk" UUID="1450E3C750E3AE24" TYPE="ntfs" PARTUUID="00031541-01"
sudo mkdir /mnt/qDrive
sudo mount /dev/sda2 /mnt/qDrive
sudo chmod 777 /mnt/qDrive
Run
sudo nano /etc/fstab
And add the following lines for drives
UUID=7206BEEA06BEAF0B /mnt/qDrive ntfs async,big_writes,noatime,nodiratime,nofail,uid=1000,gid=1000,umask=007 0 0
UUID=1450E3C750E3AE24 /mnt/JVD ntfs async,big_writes,noatime,nodiratime,nofail,uid=1000,gid=1000,umask=007 0 0
The UUIDs should be available from before by running blkid
. uid
and gid
can be found by running
id -u pi && id -g pi
- Unmount any currently mounted drives in /mnt/ with
sudo umount /mnt/qDrive
- Run
sudo mount -a
which will mount all currently unmounted drives - Check if you can access the drives
- Reboot
sudo apt install nfs-kernel-server -y
Open the NFS exports file where you configure the paths to share and their permissions
sudo nano /etc/exports
Add the following lines
/mnt/qDrive *(rw,all_squash,insecure,async,no_subtree_check,anonuid=1000,anongid=1000)
/mnt/JVD *(rw,all_squash,insecure,async,no_subtree_check,anonuid=1000,anongid=1000)
This will allow anyone read/write access to the drives.
For other options, see link.
Trying to enable nfs-common ran into errors with masked service. Following this helped fix it.
sudo exportfs -ra
showmount -e localhost
sudo systemctl enable rpcbind
sudo systemctl enable nfs-kernel-server
sudo systemctl enable nfs-common
sudo systemctl enable nfs-common.service
sudo systemctl start rpcbind
sudo systemctl start nfs-kernel-server
sudo systemctl start nfs-common
sudo systemctl start nfs-common.service
A known issue (examples)
- https://discourse.osmc.tv/t/nfs-not-starting-properly/20460/2
- https://raspberrypi.stackexchange.com/questions/69839/nfs-kernel-server-does-not-start-after-reboot
Fix:
sudo nano /etc/rc.local
Add the following, just above exit 0
sleep 20
systemctl restart nfs-common
systemctl restart nfs-common.service
Run
sudo nano /etc/dhcpcd.conf
Add the following lines at the bottom
interface eth0
static ip_address=192.168.10.159/24
static routers=192.168.10.1
static domain_name_servers=192.168.10.1
interface wlan0
static ip_address=192.168.10.159/24
static routers=192.168.10.1
static domain_name_servers=192.168.10.1
Restart and test with
ip a