User:Trogod/System0Up1810Mythtv

From MythTV Official Wiki
Jump to: navigation, search

Installing MythTV for System 0 Upgrade to Ubuntu 18.10

January 2019

install Mythtv

for reference

$ sudo add-apt-repository ppa:mythbuntu/30.0
$ sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Err:2 http://ppa.launchpad.net/mythbuntu/30.0/ubuntu cosmic InRelease    
  403  Forbidden [IP: 91.189.95.83 80]
Hit:3 http://us.archive.ubuntu.com/ubuntu cosmic InRelease               
Hit:4 http://us.archive.ubuntu.com/ubuntu cosmic-updates InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu cosmic-backports InRelease
Reading package lists... Done                     
E: Failed to fetch http://ppa.launchpad.net/mythbuntu/30.0/ubuntu/dists/cosmic/InRelease  403  Forbidden [IP: 91.189.95.83 80]
E: The repository 'http://ppa.launchpad.net/mythbuntu/30.0/ubuntu cosmic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I tried editing /etc/apt/sources.list

$ diff sources.list-bak0 sources.list
38d37
< 
57a57,58
> 
> deb [ allow-insecure=yes ] http://ppa.launchpad.net/mythbuntu/30.0/ubuntu cosmic InRelease

from https://launchpad.net/~mythbuntu/+archive/ubuntu/30.0 "This PPA does not contain any packages yet" UGH!!!

I restored sources.list

$ sudo add-apt-repository ppa:mythbuntu/30
$ sudo add-apt-repository --remove ppa:mythbuntu/30.0
$ sudo apt-get update
Hit:1 http://ppa.launchpad.net/mythbuntu/30/ubuntu cosmic InRelease
Get:2 http://security.ubuntu.com/ubuntu cosmic-security InRelease [88.7 kB]
Hit:3 http://us.archive.ubuntu.com/ubuntu cosmic InRelease
Get:4 http://us.archive.ubuntu.com/ubuntu cosmic-updates InRelease [88.7 kB]        
Get:5 http://us.archive.ubuntu.com/ubuntu cosmic-backports InRelease [74.6 kB]                  
Fetched 252 kB in 1s (260 kB/s)                                                                 
Reading package lists... Done
$ apt-cache policy mythtv
mythtv:
  Installed: (none)
  Candidate: 2:30.0~master.201901180435.c62e273~ubuntu18.10.1
  Version table:
     2:30.0~master.201901180435.c62e273~ubuntu18.10.1 500
        500 http://ppa.launchpad.net/mythbuntu/30/ubuntu cosmic/main amd64 Packages
        500 http://ppa.launchpad.net/mythbuntu/30/ubuntu cosmic/main i386 Packages
     2:30.0~master.20181118.26d8d51-0ubuntu0mythbuntu2 500
        500 http://ppa.launchpad.net/mythbuntu/30/ubuntu cosmic/main amd64 Packages
        500 http://ppa.launchpad.net/mythbuntu/30/ubuntu cosmic/main i386 Packages
     2:29.1+fixes.20180414.329c235-0ubuntu3 500
        500 http://us.archive.ubuntu.com/ubuntu cosmic/multiverse amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu cosmic/multiverse i386 Packages

that looks like it worked

sudo apt-get install mythtv


a screen appeared titled "configuring mythtv-database" and asked "will other computers run MythTV?" I answered NO


Configure

bring over old files

from my old home directory:

$ ls -a .mythtv/
3rdParty  Cache-mythfilldatabase-myth-bob  Cache-mythtv-setup-myth-bob  
config.xml       lircrc       MythGallery  MythVideo      RAOPKey.rsa  
themecache  thumbcache
backuprc  Cache-mythfrontend-myth-bob      channels                     
HardwareProfile  MythBrowser  MythMusic    pytmdb3.cache  remotecache  
themes      tmp
$ cp -pr .mythtv ~/.

for the purpose of testing my setup without damaging my existing recordings, I will not mount my 2TB storage disk. Instead, I'll just create the /storage directory locally:

$ sudo mkdir /storage
$ sudo chmod a+rwx /storage


the mythtv group

I needed to add my user to the mythtv group - https://help.ubuntu.com/community/MythTV/Install/mythtv-group

$ sudo usermod -a -G mythtv USERNAME

I tried to run the Mythtv Backend setup again, but it still complained that I was not a member of the mythtv group: "You must be a member of the mythtv group before starting any mythtv applications. Would you like to automatically be added to the group? (Note: sudo access required)". I answered "No" because I'm trying to do it, myself.

I checked:

$ groups ME
ME : ME adm cdrom sudo dip plugdev lpadmin sambashare mythtv
$ id
uid=1000(ME) gid=1000(ME) groups=1000(ME),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),128(sambashare)

maybe I need to log out and back in? I'll just reboot...

it worked, now I get

$ groups ME
ME : ME adm cdrom sudo dip plugdev lpadmin sambashare mythtv
$ id
uid=1000(ME gid=1000(ME) groups=1000(ME),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),128(sambashare),132(mythtv)

backend setup reported that it could not connect to the database. Somehow, it had the wrong password. I had to look in config.xml to find out the password to enter. Then, the backend setup GUI launched. I exited that because I want to try and restore from my old mythconverg database

restore old database

I listed my old files:

$ ls -Ftl --full-time recordings/mythcon*
-rw-r--r-- 1 root root 66899483 2019-01-18 22:41:57.622909353 -0800 recordings/mythconverg-1317-20190118224125.sql.gz
-rw-r--r-- 1 root root 74812011 2019-01-09 15:51:11.349710585 -0800 recordings/mythconverg-1317-20190109155034.sql.gz
-rw-r--r-- 1 root root 74614069 2018-08-18 08:32:26.389590246 -0700 recordings/mythconverg-1317-20180818083158.sql.gz
-rw-r--r-- 1 root root 72127370 2018-08-11 08:06:00.198474597 -0700 recordings/mythconverg-1317-20180811080525.sql.gz
-rw-r--r-- 1 root root 69849291 2018-08-04 13:18:37.706524133 -0700 recordings/mythconverg-1317-20180804131804.sql.gz
-rw-rw-rw- 1 root root 17933724 2011-05-28 07:47:48.678225587 -0700 recordings/mythconverg-148-11.sql.gz

using instructions at Database_Backup_and_Restore, I restored from the 9 Jan backup:

$ /usr/share/mythtv/mythconverg_restore.pl --drop_database --create_database --directory=/media/troy/d70970b0-e22c-47ae-a9e0-5d9c637aa073/mythtv/recordings/ --filename=mythconverg-1317-20190109155034.sql.gz --verbose
....
Restored 4194 of 4194 lines.
Successfully restored backup.
Found DBSchemaVer: 1317.
Setting database character set.

now, let's run the backup setup GUI, again, to see if it looks like it really did it...

settings for the backend

It looks to me like this worked and my old settings are recovered. Now, I need to

  • copy a few old recordings over to the new directory for testing
  • check all the entries in the backend settings GUI
  • verify that mythfilldatabase doesn't fail
  • try out the frontend


Live TV

I made an attempt at using the frontend to watch Live TV, but it didn't work. I checked /var/log/mythtv/mythfrontend.log and found this:

Feb  9 17:54:36 PVR-Bob mythfrontend.real: mythfrontend[21812]: E CoreContext livetvchain.cpp:293 (GetEntryAt) It appears that your backend may be misconfigured.  Check your backend logs to determine whether your inputs, lineups, channels, or storage configuration are reporting errors.  This issue is commonly caused by failing to complete all setup steps properly.  You may wish to review the documentation for mythtv-setup.

I checked the log from mythtv-backend: /var/log/mythtv/mythbackend.log

Feb  9 17:54:36 PVR-Bob mythbackend: mythbackend[21759]: E TVRecEvent threadedfilewriter.cpp:126 (Open) TFW(/storage/mythtv/livetv/1002_20190210015436.ts:-1): Opening file '/storage/mythtv/livetv/1002_20190210015436.ts'.#012#011#011#011eno: Permission denied (13)

I tried an experiment:

$ sudo -i -u mythtv
$ cd /storage
$ cd mythtv	
$ cd livetv
$ touch foo
touch: cannot touch 'foo': Permission denied

maybe I just simply have a file permissions problem!

$ sudo -i -u mythtv
$ bash
 mythtv@PVR-Bob:/storage$ mkdir -p mythtv/{banners,coverart,db_backups,fanart,livetv,music,musicart,pictures,posters,recordings,screenshots,trailers,videos}

making the directories as user 'mythtv' seems to have resolved that problem

testing Frontend

I copied some files from my hard drive of recordings:

$ sudo cp -v -pr /media/troy/d70970b0-e22c-47ae-a9e0-5d9c637aa073/mythtv/recordings/*_20180{8,6}*mpg .
$ sudo cp -v -pr /media/troy/d70970b0-e22c-47ae-a9e0-5d9c637aa073/mythtv/recordings/*_20180511*mpg /storage/mythtv/recordings/.
/storage/mythtv/recordings$ sudo chown mythtv:mythtv *
/storage/mythtv/recordings$ sudo chmod a+rw *

I've been able to watch Live TV, record Live TV, record a program from the Program Guide, and watch recorded shows

The problem is that the video isn't smooth :(