Bignumbas
Posts: 8
Joined: Sat Mar 19, 2016 9:48 am

My Ubuntu Mate Pi3B+ media server setup instructions

Sat Apr 21, 2018 11:57 pm

After 2 weeks of hair pulling and gnashing of teeth I finally managed to get everything running on my new Pi3B+.
Everything now works flawlessly, no error messages or random things happening. Plus wireless and Bluetooth work.
This is the synopsis of what I have had to do.

************ WARNING************
At the moment a serious bug has been found with the pi3B+ Gb network not working properly so I have gone back to using my pi3B
until a solution is found.
https://github.com/raspberrypi/linux/issues/2449

I have tried this workaround and it seems to have fixed the problem and until they come out with a new driver/firmware fix it works.

run this command: ethtool --offload eth0 rx off tx off
Actual changes:
rx-checksumming: off
tx-checksumming: off
tx-checksum-ip-generic: off
tcp-segmentation-offload: off
tx-tcp-segmentation: off [requested on]
tx-tcp6-segmentation: off [requested on]

I added a script file to /etc/NetworkManager/dispatcher.d to run this

I can now use my Pi3b+ Samba server and it does not fail. I can copy files to it from my win 7 Pc at 19-20MBytes (160mbit)

****************PI Ubuntu Mate Initial Setup*****************

To upgrade from an Ubuntu Mate Pi3 to 3b+ copy the boot partition from the latest Raspbian to your existing Pi installation but keep your cmdline.txt as the root drive is wrong for your system in the new version.

"Copy the following files from Raspbian to Ubuntu Mate:
For Booting: copy bootcode.bin, fixup.dat, start.elf, bcm2710-rpi-3-b-plus.dtb and kernel7.img
For keyboard/mouse: copy /lib/modules/4.9.80-v7+ (root partition)
For network: copy the contents of /lib/firmware/brcm/ (root partition)"

So copy the /lib/modules and /lib/firmware/brcm from Raspbian to your system.
You can do all this by mounting the Raspbian SDcard in your current running Pi.

There is also a torrent download of an image available on this forum which I downloaded and used:
viewtopic.php?f=63&t=208538&start=75#p1295937
http://downloads.mijnscore.be/Ubuntu%20 ... SD.torrent
http://downloads.mijnscore.be/Ubuntu%20 ... SB.torrent

To set network interface name to always be eth* instead of en* add "net.ifnames=0 biosdevname=0" to the end of cmdline.txt.
e.g. Doing this allows you to swap the card into another pi and still have eth0 instead of en +MAC address which changes.

************ To Install Webmin:

https://www.digitalocean.com/community/ ... untu-16-04

nano /etc/apt/sources.list

deb http://download.webmin.com/download/repository sarge contrib

wget http://www.webmin.com/jcameron-key.asc

apt-key add jcameron-key.asc

apt-get update

apt-get install mc synaptic vino dconf-tools samba webmin
(I have included everything I installed here as well)


**************To Install vino (VNC server)
http://snarkybrill.blogspot.com.au/2016 ... -mate.html

apt-get install vino dconf-tools

run vino-preferences
enable remote access
disable confirmation of the access

run dconf-editor
go to org -> gnome -> desktop -> remote-access
change network-interface to nothing ie. leave it blank.
uncheck require-encryption
clear vnc-password

Create a "Startup Application" entry for Vino server
run /usr/lib/vino/vino-server --sm-client-disable

logout & login

***********To Install PI-Hole
http://pi-hole.net

First set a static ip address
Then run: curl -sSL https://install.pi-hole.net | bash

edit nano /etc/NetworkManager/NetworkManager.conf
change dnsmasq > #dnsmasq

If dnsmasq does not start automatically after bootup:
Add the following to the [Unit] section of dnsmasq.service:
nano /lib/systemd/service/dnsmasq.service
After=network-online.target
Wants=network-online.target

or if it still does not work try the next fix:

If dnsmasq starts but still not working until you click on the network connection in Network Manager to start the connection after boot.
Add these two lines to an executable script file in /etc/NetworkManager/dispatcher.d.
You can call the file anything you like eg 60Network-restart. The id is the name of your Network Manager connection used.

nmcli con down id 'Auto Ethernet'
nmcli con up id 'Auto Ethernet'

In my pi3B+ I also have "ethtool --offload eth0 tx off rx off" as the first line and that stops the network transfers crashing eth0.

For Ubuntu 18.04 if DNSmasq not resolving after starting:
Check that /etc/systemd/resolved.conf contains
DNSStubHandler=no

***********SSH setup
This can be done from raspi-config
or
nano /etc/ssh/sshd_config
change PermitRootLogin to yes
Start and set SSH service to start at boot

***********Misc fixes
Modules not loaded on boot message:
rename /etc/modules-load.d/cups-filter.conf to *.disabled

Shutting down 16.04 hangs with at-spi-registryd.desktop message:
rename /usr/lib/at-spi2-core to *.disabled

I downgraded Firefox to version 52 but to stop it upgrading to a crashing version
run: apt-mark hold firefox
or
use synaptic to lock it to the current version

***********My Samba Config for Media server

# This PI Media server Samba setup was copied from OpenElec Kodi:
I login to my Pi as Mark so the external USB harddrive named "MEDIA" is always automounted under /media/mark/MEDIA. Which I then shared. Does not matter which usb port I plug it into its always shared correctly.

You need to convert nobody and root to samba users: sudo smbpasswd -a <username>

smb.conf:
#======================= Global Settings =======================

[global]
server string = PIMEDIA
workgroup = WORKGROUP
preferred master = yes
domain master = yes
browseable = yes
writeable = yes
printable = no
deadtime = 30
mangled names = no
# I have found that putting bcast first instead of host kills any browsing on smb shares.
name resolve order = host bcast
printcap name = /dev/null
load printers = no
encrypt passwords = true
enable core files = no
passdb backend = smbpasswd
smb encrypt = disabled
strict allocate = no
allocation roundup size = 0

# samba share options
map to guest = bad user
guest account = root
security = user

#======================= Share Definitions =======================

[TV]
path = /media/mark/MEDIA/TV
comment = TV
available = yes
browsable = yes
public = yes
writable = yes

[MUSIC]
path = /media/mark/MEDIA/Music
comment = Music
available = yes
browsable = yes
public = yes
writable = yes

[MOVIES]
path = /media/mark/MEDIA/Movies
comment = Movie Drive
available = yes
browsable = yes
public = yes
writable = yes

[Automounts]
path = /media/mark
comment = automounted drives
available = yes
browsable = yes
public = yes
writable = yes
Last edited by Bignumbas on Wed Jul 18, 2018 5:14 am, edited 9 times in total.

Bignumbas
Posts: 8
Joined: Sat Mar 19, 2016 9:48 am

Important news flash

Fri May 04, 2018 4:32 am

At the moment a serious bug has been found with the pi3B+ Gb network not working properly so I have gone back to using my pi3B
until a solution is found. I had really weird data dropouts and slowdowns. ie Some movies would play in slow motion and some would play fine and then just pause until kodi timed out and closed the movie automatically with no error message..
Apparently it works fine with wireless though.

https://github.com/raspberrypi/linux/issues/2449

Bignumbas
Posts: 8
Joined: Sat Mar 19, 2016 9:48 am

Workaround for GB ethernet file transfer failure.

Thu Jun 14, 2018 2:16 am

I have tried this workaround and it seems to have fixed the problem and until they come out with a new driver/firmware fix it works.

run this command: ethtool --offload eth0 rx off tx off
Actual changes:
rx-checksumming: off
tx-checksumming: off
tx-checksum-ip-generic: off
tcp-segmentation-offload: off
tx-tcp-segmentation: off [requested on]
tx-tcp6-segmentation: off [requested on]

I added a script file to /etc/NetworkManager/dispatcher.d to run this.

I can now use my Pi3b+ Samba server and it does not fail. I can copy files to it from my win 7 Pc at 19-20MBytes (160mbit)

Bignumbas
Posts: 8
Joined: Sat Mar 19, 2016 9:48 am

After Ubuntu 18.04 upgrade - DNSmasq not resolving

Wed Jul 11, 2018 4:16 am

I have updated my Ubunutu from 16.04LTS to 18.04LTS
I had to change from vino to xRDP to get remote desktop back.
Pi-Hole went back to not resolving which was really annoying again.

If DNSmasq is not resolving after starting:
Check that /etc/systemd/resolved.conf contains
DNSStubHandler=no

Return to “Media centres”

Who is online

Users browsing this forum: No registered users and 6 guests