[mythtv-users] upgrading from mythbuntu 14.04/0.27 to 0.28 vs. mythbuntu 16.04 install

Jim Abernathy jfabernathy at outlook.com
Tue Nov 29 15:52:09 UTC 2016



On 11/27/2016 10:40 AM, Stephen Worthington wrote:
> On Sun, 27 Nov 2016 12:29:33 +0000, you wrote:
>
>>
>> On 11/26/2016 08:56 PM, Stephen Worthington wrote:
>>> On Sat, 26 Nov 2016 22:19:39 +0000, you wrote:
>>>
>>>
> Ok, because you have network tuners and other frontends, that means
> that the default systemd file for mythbackend is broken for you, and
> you will need to apply a fix.  The HVR-2250, I think, is also a tuner
> that has a slow firmware upload, so you will likely need the fix to
> make mythbackend wait until the tuners are up before starting.  I have
> a similar setup on my test MythTV box, so I will list all the fixes
> that I remember doing to make 16.04 work properly for this setup.
>
> 1) Create a new set of rules for udev that produce systemd events for
> the tuners.  Create a new file in /etc/udev/rules.d.  I have called
> mine 99-mythbackend.rules.  Put this in it:
>
> #
> # Create systemd device units for capture devices
> #
> SUBSYSTEM=="video4linux", TAG+="systemd"
> SUBSYSTEM=="dvb", TAG+="systemd"
> SUBSYSTEM=="firewire", TAG+="systemd"
>
> The file should be "chown root:root" and "chmod a=r,u=rw".
>
> 2) Create a new directory /etc/systemd/system/mythtv-backend.service.d
> where you put an override file for systemd to override some of the
> settings from the package installed file
> (/lib/systemd/system/mythtv-backend.service) that controls mythbackend
> startup and shutdown.
>
> The new mythtv-backend.service.d directory should be "chown root:root"
> and "chmod a=rx,u=rwx".
>
> 3) Create a new .conf file in the new mythtv-backend.service.d
> directory.  I have called mine mythtv-backend-override.conf.  This is
> what I think you will need, presuming that the HVR-2250 creates two
> devices on /dev/dvb0 and dev/dvb1:
>
> [Unit]
> Wants=dev-dvb-adapter0-frontend0.device
> After=dev-dvb-adapter0-frontend0.device
> Wants=dev-dvb-adapter1-frontend0.device
> After=dev-dvb-adapter1-frontend0.device
>
> After=NetworkManager-wait-online.service
>
> The final After line tells systemd to wait until NetworkManager has
> the network fully up and running, instead of just the localhost
> interface being up.  That allows mythbackend to find the external IP
> address it is configured for, otherwise it will immediately shut down
> again.  It also means that mythbackend will be able to talk to the
> HDHR tuners, which it does immediately after startup.  If it can not
> talk to them then, it will mark them as failed and not try to use them
> after that.
>
> The .conf file should be "chown root:root" and "chmod a=r,u=rw".
>
> 4) Check if the NetworkManager-wait-online.service is enabled:
>
> systemctl status NetworkManager-wait-online.service
>
> Here is what I get from that command:
>
> root at lith:~# systemctl status NetworkManager-wait-online.service
> ? NetworkManager-wait-online.service - Network Manager Wait Online
>     Loaded: loaded
> (/lib/systemd/system/NetworkManager-wait-online.service; enabled;
> vendor preset: enabled)
>     Active: active (exited) since Sun 2016-11-27 17:34:27 NZDT; 10h ago
>       Docs: man:nm-online(1)
>    Process: 926 ExecStart=/usr/bin/nm-online -s -q --timeout=30
> (code=exited, status=0/SUCCESS)
>   Main PID: 926 (code=exited, status=0/SUCCESS)
>     CGroup: /system.slice/NetworkManager-wait-online.service
>
> Nov 27 17:34:11 lith systemd[1]: Starting Network Manager Wait
> Online...
> Nov 27 17:34:27 lith systemd[1]: Started Network Manager Wait Online.
>
> See the "enabled" on the third line.  If that is not present, then you
> need to enable the service:
>
> systemctl enable NetworkManager-wait-online.service
>
> I believe it is not enabled by default in new 16.04 installs.
>
> 5) Optional.  In 16.04, the naming of the Ethernet adapters has
> changed to a new scheme.  You can just live with that new scheme, and
> use the NetworkManager GUI to put your IP address settings and so on
> on the adapter.  But if you have the settings in the
> /etc/network/interfaces file, the old 14.04 settings will fail as they
> will have the wrong adapter name.  I hate the new names, as I am used
> to using eth0, so I always put in config to change the names of my
> Ethernet adapters to what I want them to be.  Here is what I have for
> my test PC, which has three Ethernet ports at the moment:
>
> # Asus P5K-E motherboard
> SUBSYSTEM=="net", ACTION=="add",
> ATTR{address}=="00:1f:c6:24:64:ce",KERNEL=="enp2s0", NAME="eth0"
> SUBSYSTEM=="net", ACTION=="add",
> ATTR{address}=="00:07:e9:11:c5:95",KERNEL=="enp6s2", NAME="eth1"
> SUBSYSTEM=="net", ACTION=="add",
> ATTR{address}=="00:1b:21:25:13:96",KERNEL=="enp4s0", NAME="eth2"
>
> Note that is three lines - each line is long enough to get wrapped in
> emails.
>
> That goes in my /etc/udev/rules.d/20-network.rules file, which is
> "chown root:root" and "chmod a=r,u=rw".
>
> You get the names and MAC addresses needed for the above from an
> ifconfig command.
>
> After doing all that config on a new 16.04 install or upgrade, you
> need to reboot to make it work.
>
> If you hate using UUIDs in your fstab files, these days it is now
> possible to label the partitions and replace your UUID= IDs with
> LABEL= instead.  Use gparted to label each partition with a unique
> name, then change fstab to match.  Here is some of my test PC fstab,
> as an example:
>
> #UUID=4cdea8a6-5646-4a7a-8391-a5b1f4ed28c2      /               ext4
> errors=remount-ro 0       1
> LABEL=Ubuntu16.04-2                             /               ext4
> errors=remount-ro 0       1
>
> # swap was on /dev/sdb7 during installation
> UUID=e7612859-ea33-4acb-9b70-b674dbc626b2       none            swap
> sw              0       0
>
> LABEL=data                                      /mnt/data       ext4
> relatime,errors=remount-ro 0    2
>
> LABEL=gt70-rec1                                        /mnt/gt70-rec1
> jfs     relatime,errors=remount-ro 0    2
> LABEL=gt70-rec2                                        /mnt/gt70-rec2
> jfs     relatime,errors=remount-ro 0    2
>
> The long lines will be wrapped by the email.  I have not yet gotten
> around to labeling my swap partition, but I think that now even swap
> partitions can be identified by label instead of UUID.
>
> Since you do not use SQL, there is no need to change from MySQL to
> MariaDB.  I have made that change as the MySQL V5.7 installed by 16.04
> now uses the editline library for its command line tools, instead of
> readline.  That makes it difficult to pull up and re-use old SQL
> commands, instead of having to re-type them completely.
> ______
so if I start with Mythbuntu 16.04 do I have to still mess with systemd??
My test last summer with it worked fine in my setup except for the bug 
in mythtranscode which has now been fixed.

I must be missing something.

Jim A

> _________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org



More information about the mythtv-users mailing list