From MythTV Official Wiki
Jump to: navigation, search

A few days ago, I rebooted my system but the front-end started as if it needed an initial configuration. I rebooted, again, and everything looked OK. Today, May 3, 2015, I rebooted yet another time, and, again, saw an initial-configuration screen. So, I rebooted; however, the front-end did not start up successfully. I tried repairing the database

I still haven't had a successful start-up, but at least the database tools no longer report corruption. I did try the optimize script, but that didn't fix my problem. So, I took the usual precautions

sudo /etc/cron.daily/mythconverg-backup

sudo /etc/cron.daily/rsync-backup

Next, I make sure to note what my current partitions are:

$ sudo parted -l
Model: ATA SAMSUNG HD204UI (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2000GB  2000GB  jfs

Model: ATA SAMSUNG SP0822N (scsi)
Disk /dev/sdb: 80.1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      32.3kB  1287MB  1287MB  primary   ext2            boot
 2      1287MB  10.3GB  9052MB  primary   linux-swap(v1)
 3      10.3GB  26.5GB  16.1GB  primary   ext3
 4      26.5GB  80.1GB  53.6GB  extended
 5      26.5GB  47.4GB  21.0GB  logical   ext3
 6      47.4GB  57.9GB  10.5GB  logical   ext4
 7      57.9GB  68.4GB  10.5GB  logical   ext4
 8      68.4GB  78.9GB  10.5GB  logical   ext4

Next steps

  • I disconnect my drive that stores my recordings,
  • Install new mythbuntu

I burned a DVD, but it wouldn't boot. I followed the instructions at to create a bootable USB stick (2GB Cruzer). That worked. However, when I first booted with it, I ran the file check option and it reported that one file was bad. I checked the md5 of the iso image and it matched, perfectly. The only other observation is that, during installation, the styling of the title text of windows used inverted colors. Instead of seeing white text with shadowing on a dark background, I saw a white strip at the top of the window and it had black text text with a dark halo or glow around it.

Here are the commands I used in Mac OS X to make the bootable USB

diskutil list > ~/list1.txt
% insert the USB stick
diskutil list > ~/list2.txt
diff list1.txt list2.txt 
% now, I know the device number of the USB stick
diskutil unmountDisk /dev/disk8
hdiutil convert -format UDRW -o mythbuntu-14.04.2-desktop-amd64.img mythbuntu-14.04.2-desktop-amd64.iso
sudo dd if=mythbuntu-14.04.2-desktop-amd64.img.dmg  of=/dev/rdisk8 bs=1m
diskutil eject /dev/disk8

Near the end of installation, progress got hung up when fetching time from an ntp server. I have an extra ethernet card and a wi-fi card. I unplugged and re-plugged in the ethernet cable for my internet connection, but that did not help. I then shut down the computer and disconnected the wi-fi card. When I booted it back up, I only plugged in one ethernet cable and that was for the internet connection to the motherboard's ethernet. That time, the installation proceeded and declared success.

  • ran the 'Software Updater' to update to current software.
  • launched Mythbuntu Control Center and activated "MythTV Updates" for v0.27 and "Mythbuntu Updates"
  • ran the 'Software Updater' again. it froze, I waited a while, clicked the 'x', then clicked 'ok' to kill the app. I ran the 'Software Updater' yet again, this time it claimed that everything is up to date.

software to install

$ sudo apt-get install jfsutils
$ sudo apt-get install rcs
$ sudo apt-get install ir-keytable
$ sudo apt-get install unzip
$ sudo apt-get install p7zip-rar
$ sudo apt-get install cifs-utils

I may not have needed cifs-utils, but I was having problem with my /etc/fstab.

  • sudo mkdir /storage
  • sudo mkdir /mythtv-oberon

refer to for help with /etc/fstab also

# manually added 5 May 2015 by TDG
UUID=d70970b0-e22c-47ae-a9e0-5d9c637aa073  /storage       jfs     defaults        0       2 
# manually added 5 May 2015 by TDG
# sudo mount -t cifs -o user=diskuser,password=foo,rw,hard,nosetuids,noperm,sec=ntlm  // /mythtv-oberon 
// /mythtv-oberon/ cifs user=diskuser,password=foo,_netdev,nobrl,iocharset=utf8,rw,sec=ntlm,auto,uid=tdg,gid=tdg,defaults 0 2 

and I restored my network configuration

$ cat /etc/network/interfaces
# manually added by TDG 5 May 2015
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static

and then a reboot to see if it works. Ugh! somehow my ethernet ports got switched on me. I bet it happened during the installation, some sort of automatic detection of ethernet cards :( I switched my ehthernet cables and now it works!

$ hdhomerun_config discover
hdhomerun device 10172423 found at

I was seeing errors about mounting /storage -- I realized I needed jfsutils

sudo apt-get install jfsutils

copy the backup directory, just in case

$ cd /storage/backups
$ sudo cp -pr daily daily-5may2015

restore home directory setup

$ tar cvzf default14042.tar.gz .config .lirc .lircrc .mythbuntu .mythtv
$ cp -pr /storage/backups/daily/home/xxx/.mythtv/backuprc .mythtv/.
$ cp -pr /storage/backups/daily/home/xxx/.bash_history bash_history.txt
$ cp -pr /storage/backups/daily/home/xxx/bin/* bin/.
$ cd bin
$ ln -s /usr/share/mythtv/ .
$ ln -s /usr/share/mythtv/ .
$ cd
$ cd .lirc
$ cp -pr /storage/backups/daily/home/troy/.lirc/mythtv .

restore mythtv database

$ sudo service mythtv-backend stop
$ /usr/share/mythtv/ --drop_database --create_database --filename mythconverg-1299-20150503215451.sql.gz --verbose

The script reported exit status 0, restored 3861 of 3861 lines, DBSchemaVer 1299, and successfully restored backup. I hope it worked!

$ /usr/share/doc/mythtv-backend/contrib/maintenance/
Database schema 1299 not supported.
Bindings support schema version 1317

I guess I have to run this again after I run the frontend

Next, I ran Mythtv Backend setup (which should, also, update the database)

restore lirc hardware

$ diff --unified=3 /etc/lirc/hardware.conf /storage/backups/daily/etc/lirc/hardware.conf | less
$ ls -Ftl /etc/lirc/hardware.conf
-rw-r--r-- 1 root root 1389 May  4 23:31 /etc/lirc/hardware.conf
$ sudo cp -pr /storage/backups/daily/etc/lirc/hardware.conf /etc/lirc/hardware.conf
$ ls -Ftl /etc/lirc/hardware.conf
-rw-r--r-- 1 root root 1201 Oct 23  2012 /etc/lirc/hardware.conf

Adding irexec per I went to Applications -> Settings -> Session and Startup -> Application Autostart. I added an entry for "irexec -d"

I also needed to restore my copy of =lircd.conf=, as follows

$ ls -Ftl /etc/lirc/lircd.conf /storage/backups/daily/etc/lirc/lircd.conf
-rw-rw-r-- 1 root root   561 May  4 23:31 /etc/lirc/lircd.conf
-rw-r--r-- 1 root root 26394 Mar 28  2011 /storage/backups/daily/etc/lirc/lircd.conf
$ cd /etc/lirc/
$ sudo mv lircd.conf lircd.conf-orig
$ sudo cp -pr /storage/backups/daily/etc/lirc/lircd.conf .
$ ls -Ftl /etc/lirc/lircd.conf /storage/backups/daily/etc/lirc/lircd.conf
-rw-r--r-- 1 root root 26394 Mar 28  2011 /etc/lirc/lircd.conf
-rw-r--r-- 1 root root 26394 Mar 28  2011 /storage/backups/daily/etc/lirc/lircd.conf

Then I did =sudo service lirc restart= and then my button presses show up in =irw= yay!


I followed instructions at AirTunes/AirPlay and, while not perfect, I think it's working

HDMI problem


I edited my /etc/X11/xorg.conf

$ diff --unified=3  xorg.conf-original xorg.conf
--- xorg.conf-original	2015-05-04 23:31:33.074001450 -0700
+++ xorg.conf	2015-06-08 22:04:52.343135870 -0700
@@ -9,6 +9,8 @@
 	Driver	"nvidia"
 	Option	"DPI"	"100x100"
 	Option	"NoLogo"	"1"
+        Option "ConnectedMonitor" "DFP-0"
+        Option "UseDisplayDevice" "DFP-0"
 Section "Extensions"

and I added this script:

$ cat ~/bin/ 
# from
#Fix TV state when HDMI link is lost.
#By Mario Limonciello <email address hidden>
   DISPLAY=:0 xrandr --output $OUTPUT --mode $MODE
   sleep 2