How to install Mythbuntu 16.04.1 Since I have to rebuild my Mythtv ATSC OTA DVR once in a while I forget what I did in detail so I always miss a critical step and spend hours looking for something I figured out months earlier. So now I’ve created a document to save me that trouble. It should not leave out a step for the average Ubuntu Linux user and may help others besides me. So here are the steps I used: 1. I use an Intel® Core i5 system with Hauppauge HVR 2250 Dual Tuner PCIe card and a SiliconDust HDHomeRun Connect networked tuner. 2. I ran a mythtv database backup so I could restore it after the install and keep my current recordings and settings: /usr/share/mythtv/mythconverg_backup.pl 3. I moved of copy of the database backup file to my NAS. 4. Boot Mythbuntu 16.04.1 installation image via USB Flash drive created with Startup Disk Creator from Ubuntu 16.04 system, or installation CDROM. 5. Ensure the host name you enter during the install is identical to that on the old system so the restored database will work. 6. Install standard options, some noted below: a. Download updates while installing b. Install 3rd party software c. Erase and reinstall d. In my case I have 3 drives; an SSD to boot, and 2 hard drives for recording storage. Make sure you pick the right drive to install and format. My SSD was /dev/sdc so I picked that. e. Pick your timezone location. f. Pick your keyboard layout g. Setup login information and auto login option. h. Primary backend w/Frontend i. Select, VNC, SSH, Samba, NFS, and MythTV Service j. Android remote or whatever you use. 7. After the boot from the hard drive, it tries to run the mythtv-setup program GUI, but I exit and make sure no mythtv programs are running. 8. Update the system using sudo apt update and sudo apt upgrade. Reboot. DON’T USE SOFTWARE UPDATER AS IT LOCKS UP AFTER FRESH INSTALL; at least it does every time for me. 9. I then run mythtv-control-center and change a few options like: a. Mysql – enable remote frontends b. Repositories - set for updates using 0.28 and also mythbuntu updates. c. Startup behavior - disable running mythfrontend on boot. 10. I updated the system again to bring in the new mythtv updates. 11. In my case I need to auto mount the 2 recording data drives, so I need to modify /etc/fstab. NOTE! If GID or UID changed from last time these drive were used in

a mythtv system, it might pay to recreate the file systems on these drives with Gparted. 12. From terminal: sudo blkid

13. Edit /etc/fstab using UUID from the output of the ‘blkid’ command to add drives to list of drives mounted at boot. Or you could use the label option. In my case: # # sdb1 recorded-tv-1 UUID=84f59b6c-7cbb-4126-9101-c5af3989eb74 /media/recorded-tv-1 ext4 defaults 0 0 # sda1 recorded-tv-2 UUID=a9196a4c-a8ad-4a6d-b57e-2a890eba3067 /media/recorded-tv-2 ext4 defaults 0 0 #

OR: LABEL=recorded-tv-1 LABEL=recorded-tv-2

/media/recorded-tv-1 /media/recorded-tv-2

ext4 ext4

14. I also add an entry in /etc/fstab for my NAS:

defaults 0 0 defaults 0 0

192.168.0.250:/mnt/media /media/media nfs defaults 0 0

15. After reboot, make sure drives and NAS are mounted at desired mount points 16. Change owner and group of new mounted drives/NAS to user and group ‘mythtv’. i.e. sudo chown –R mythtv:mythtv /media/recording-tv-1 17. Also need to make the directories R/W for others. Make sure you use this wisely i.e. sudo chmod 777 /media/recording-tv-1 18. I needed to add drivers for my Hauppage HVR2250 card. At a terminal session: (Or get files from a local backup) sudo apt-get install unzip wget http://www.steventoth.net/linux/hvr22xx/22xxdrv_27086.zip wget http://www.steventoth.net/linux/hvr22xx/HVR-12x0-14x017x0_1_25_25271_WHQL.zip wget http://www.steventoth.net/linux/hvr22xx/extract.sh wget http://www.steventoth.net/linux/hvr22xx/firmwares/4019072/NXP71642010-03-10.1.fw sudo sh extract.sh sudo cp *fw /lib/firmware

19. Setup a fixed IP address by adding to /etc/network/interfaces. Make sure you know which enet interface you are using if you have multiple. Note eth0/1 are now eno1/2 in mythbuntu 16.04. auto eno1 iface eno1 inet static address 192.168.0.205 netmask 255.255.255.0 network 192.168.0.0 gateway 192.168.0.1 dns-nameservers 8.8.8.8



20. Now we need to fix some startup issues because of the move to ‘systemd’ instead of the ‘init’ in mythbuntu 16.04. Here’s some guidance I used from Stephen Worthington. 21. Because I have network tuners and remote frontends, the default systemd file for mythbackend is broken, and needs to be fixed. The HVR-2250 is a tuner that has a slow firmware upload, so I will likely need to make mythbackend wait until the tuners are up before starting. 22. 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 99mythbackend.rules. Put this in it: # # Create systemd device units for capture devices # SUBSYSTEM=="video4linux", TAG+="systemd" SUBSYSTEM=="dvb", TAG+="systemd" SUBSYSTEM=="firewire", TAG+="systemd"

23. The file should be "chown root:root" and "chmod a=r,u=rw". 24. 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/mythtvbackend.service) that controls mythbackend startup and shutdown. 25. The new mythtv-backend.service.d directory should be "chown root:root" and "chmod a=rx,u=rwx". 26. 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 needed for the HVR-2250 which 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 cannot 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".



27. Check if the NetworkManager-wait-online.service is enabled: systemctl status NetworkManager-wait-online.service

Here is what I get from that command: root@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 It was enabled on my 16.04 install. 28. If main GUI screen is not visable after switching monitor or A/V receiver on, CTL-ALT-F1 and login to a shell, or use ssh from another system, and sudo restart lightdm 29. If you have a backup database, restore it, if you have recorded shows to restore into this setup and the mythtv recorded drives are from a previous system. i.e /usr/share/mythtv/mythconverg_backup.pl --drop_database -create_database --filename /full path to directory/mythconverg1214-20080626150513.sql.gz ## for example ##

30. If you don’t have a backup and you data drives for recordings are empty just proceed to the next step. 31. Run mythtv backend setup a. If you restored your database this stuff should be as it was in your last system build. So just double check everything. b. Under General set IPv4 to 192.168.0.205 (in my case) for Local Backend and Master Backend. Use Defaults for now on all other pages except Host Address Backend Setup. Beside the IPs, set Security PIN to 0000. c. Add tuners, in my case I added the HDHomeRun networked tuner and on Available devices I used the right arrow to force setup to find it for me. Repeat for 2nd HDHomeRun tuner. (Both tuners are in the same box and on the same IP). Next I added both tuners on the Hauppauge HVR 2250 as DVB-T/S/C, ATCS or ISDB tuner card and took the defaults. Setup automatically finds them and sets them as 2 different devices.

d. Add Video source. i.e. Schedules Direct login info. I used SchedulesDirect as the Video source name. Then enter User ID and Password for my account on Schedules Direct. Retrieve Lineups will validate that you have it right and populate Data Direct Lineup. Take Defaults for the rest. e. Add Input connections for each tuner to schedules direct (only scan first tuner). I used appropriate names for the Display names so I could track which tuners are in use via the Frontend Status. Also using the right arrow on Video Source will select your video source, i.e. Schedules Direct. f. After all the Input Connections are set, I went back in to each tuner and set the Schedule order and Live TV order to use the HVR 2250 first for Live TV and the HDHomeRun first for Scheduled recordings. Since I have 2 physical tuner devices with dual tuners and each tuner can record 2 programs off the same stream at the same time, I have 8 logical tuners to deal with. So my first connection has 1 for Schedule Order and 7 for Live TV order. Change the other 4 tuners similarly making the total equal 8 on each tuner Input Connection. The goal was to have my best tuner hardware (HDHomeRun) do most of the scheduled recordings and not be interfered with by Live TV, which is directed first to the HVR 2250. g. Edit channels to include only the ones you want h. Setup Storage Directories. In my case I have 2 drives for records and they are mounted by /etc/fstab at startup on /media/recorded-tv-1, and /media/recorded-tv-2. I added those directories into the Default and Live TV groups. 32. Run mythtv frontend and setup Theme, Audio (important if using HDMI) 33. {Optional} Install the package pavucontrol so the audio will work in VLC media player (and Kodi after it’s installed. sudo apt-get install pavucontrol

34. {Optional} Run pavucontrol (Pulse Volume Control) and select HDMI to match what you did for mythfrontend. 35. Setup recordings rules in mythfrontend. 36. The system is ready to use and is stable at this point. 37. If you want mythfrontend auto starting, you can use MCC startup behavior to fix this. Also enable the Repositories in MCC so you’ll get the updates. Adding APCUPSD for UPS monitoring and shutdown 1. Install apcupsd software using; sudo apt install apcupsd apcupsd-cgi 2. Add/modify /etc/apcupsd/apcupsd.conf UPSNAME smartups750 UPSCABLE usb UPSTYPE usb DEVICE POLLTIME 60

3. sudo nano /etc/default/apcupsd

ISCONFIGURED=yes 4. reboot 5. add the following to /etc/apache2/apache2.conf ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted AddHandler cgi-script .cgi 6. Turn on CGI a. sudo a2enmod cgi b. sudo service apache2 restart

To add Kodi media program 1. 2. 3. 4. 5. 6.

sudo apt-get install software-properties-common sudo add-apt-repository ppa:team-xbmc/ppa sudo apt-get update sudo apt-get install kodi sudo spt-get install kodi-pvr-mythtv Run Kodi and add the pvr-mythtv addon, configure and enable TV

Add sendTVtonas.sh job I use a script within mythbackend as a job that I use to remove commercials that I marked with a cutlist manually and compress the recording by converting it from the original MPEG2 to m4v using handbrake. The converted file is move to my NAS and the original is not modified. All this is handled by sendTVtonas.sh within mythtv. The script has all the install information in comments. You get the script from the first post in the following topic in the mythtv forum: Script to export Mythtv recordings to a folder or NAS https://forum.mythtv.org/viewtopic.php?f=2&t=1261

How to install Mythbuntu 16.04 on system.pdf

There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Main menu.

152KB Sizes 2 Downloads 185 Views

Recommend Documents

How To Install Wordpress On WebMatrix.pdf
How To Install Wordpress On WebMatrix.pdf. How To Install Wordpress On WebMatrix.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying How To ...

How To Install Apache - PHP - MySQL - PHPMyAdmin On Windows ...
How To Install Apache - PHP - MySQL - PHPMyAdmin On Windows 7.pdf. How To Install Apache - PHP - MySQL - PHPMyAdmin On Windows 7.pdf. Open.

How to install IE ActiveX.pdf
Prior to installation, please follow up the steps below and program the network security level. a) Open the IE browser and click [Tools→ Internet Options].

How to install / link Allegro 5 with Code::Blocks - GitHub
//(if you don't, the application will shut down immediately after you launch it) al_rest(5.0f);. //Deallocate the memory used for the display creation.

HOW TO INSTALL CLOUDSIM-BY AJITHEX.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. HOW TO ...

[Offline+Mod] How To Download And Install Gangstar ...
[Offline+Mod] How To Download And Install. Gangstar New Orleans Game In Any Android Device. Apk+Data. [Offline+Mod] How To Download And Install ...

How to Install/Uninstall/Upgrade a Dispage extension ... - GitHub
After accepted the Agreement above, the DEM extension is downloaded from the Dispage. Resource Center (DRC), then installed and validated (Figure 3).

1604 Meeting Room Usage.pdf
B. Partner Organizations. 1. Organizations that meet the following criteria may apply to become a Partner Organization: A. Engaged in educational, cultural, intellectual, civic or charitable activities. B. Serve people in the City and/or Township of

man-80\java-1604-download.pdf
File name : java 1.6.04 download.pdf. Click button below ... JAVA 1.6.04 DOWNLOAD PDF. Page 1 of 5. Page 2 of 5. JAVA 1.6.04 DOWNLOAD PDF. Java 1.6.04 ...

man-43\how-to-install-skype-to-lg-tv.pdf
man-43\how-to-install-skype-to-lg-tv.pdf. man-43\how-to-install-skype-to-lg-tv.pdf. Open. Extract. Open with. Sign In. Main menu.

For Better Safety On The Road Install Electric Brake Controllers.pdf ...
Page 1 of 1. For Better Safety On The Road Install. Electric Brake Controllers. It is important that you take all safety measure into account for long. journeys.