LinHES Forums

R5E50 Upgrade hints and hazards
Page 1 of 5

Author:  tjc [ Tue Dec 26, 2006 10:48 pm ]
Post subject:  R5E50 Upgrade hints and hazards

Don't Panic! :-) The Hitchhiker's Guide to Upgrading to KnoppMyth R5E50

This is a very long post which covers everything from pre through post install issues and fixups. Do not let this frighten you off. It's long because I tried to write it at a "drunken monkey" level of detail, with the intent that you can cut & paste the example commands shown directly from this posting into a shell window on your KnoppMyth box. Please scroll down and look at the bold headings to get a feel for what it covers... If you're looking for something specific please use your browsers page search feature. Also, please read the "Known Changes" and "Known Issues" sections at the end, for various potential "gotchas" before you upgrade. They often point you to steps that you need to do to avoid problems. Most of the information under Known Issues and Known Changes still applies even if you're doing a fresh install.

This posting is intended to be a supplement to Cecil's updated Pamphlet and change list rather than a replacement. As a result it tends to skip issues they cover, so don't forget to review those before you start upgrading. This information is intended to apply whether you're doing an Auto Upgrade or a manual upgrade. (BTW - Auto Upgrade only works if you originally did an Auto Install. If you had to do a manual install you need to do a manual upgrade. See the pamphlet for details.)

Please note, when upgrading from an KnoppMyth version before R5C7, you MUST use the supplemental backup technique described below or your restore will fail. If you've forgotten which release you're running, you can find out by running cat /etc/KnoppMyth-version as root.


A note on the color coding used here, red is used for file system objects (files, directories, ...), green is used for sample commands (partial or complete), indigo is used for GUI menu paths, and text in blue is a link to another posting/thread or web page.

Phase 0 - Before you upgrade:

    1) Make a backup using the mythbackup script and verify that it worked. In more recent versions, like R5D1, the verification is done automatically as part of the backup, in older versions you must do it manually. You can't do an upgrade without a valid backup.

      1.1) If you are upgrading from a version of KnoppMyth before R5C7, you must manually convert your old style backup into a new style backup by archiving all of /etc /root and /home. As root run the following commands:
      cd /
      tar zcvf /myth/backup/savedfiles.tar.gz ./etc ./root ./home

      The leading ./ on these three directory names is important. Don't forget it, or your backup/restore won't work properly!

      1.2) Check that the backup worked! If you already have /usr/local/bin/ or /usr/local/bin/checkbackup on your system, run that. Otherwise get the script which can be found on the MythBackupAndRestoreHowTo page on the wiki. Note that you may need to make a single character change to the tar commands in that script, as described below, depending on the compression type.
    See the "Taking advantage of the enhanced backup and restore scripts" posting for more information on using backup and restore. Also see the "Known Changes" section below for more things to beware of.

    2) Make a list of any add ons you've installed or extra configuration you've done while you've still got the old install to refer to.

    3) Make a note of your current hostname. This is very important, since changing the hostname can make various DB entries keyed by hostname useless. The following command will print your hostname:

Phase 1 - When you boot from the CD:

    1) Pick the appropriate boot options.

      1.1) Using the "tv" option on your boot command is strongly recommended. Otherwise the install defaults to a potentially unreadable 1280x1024 resolution. This is one of those "more is not always better" cases. ;-) For example:
      tv testcd

      1.2) Always use the testcd option in your boot command or from the main menu if this is first time you've used a given CD with the machine. If the validation fails do not continue the upgrade! For example:
      tv testcd

      1.3) If the installer hangs probing for SCSI devices boot using the "expert" or "noscsi" options. Note that "expert" needs to be the first thing in the boot command list. For example:
      tv noscsi testcd

      expert tv testcd

      1.4) If your motherboard has the Intel ICH8 chipset, add the the "intelfix" option to enable support for this new chipset. The installer takes care of the rest. For example:
      tv intelfix testcd

    2) Do not use the name "mythtv" when prompted to create a user account. The mythtv user is already created automatically. Don't forget to make a note of that user name and the passwords you pick for that user and the administrator (root) accounts.

    3) Make sure you use the same hostname (machine name) during the upgrade! Look at the notes you made before the upgrade and enter that name when prompted. Using a different hostname will cause a number of nasty problems with various tables in the DB, particularly the settings table, which uses the hostname as one of its keys. Changing the hostname is a project beyond the scope of these hints.

Phase 2 - After the install from the CD and reboot

Phase 2a. Before entering the root password to start the setup dialogs:

To do any of these tasks you'll need to switch to an alternate virtual console using Ctrl-Alt-F1 and login there as root.

    1) If you're using LVM with the standard volume group name of "vg" use the script to restore it. Otherwise you'll need to edit the script to use the "right" volume group name for you system. This is a nondestructive operation and only gets the system to recognize what is already there.

    2) If you have some other nonstandard disk arrangement you may need to correct your /etc/fstab and mount the updated partitions. Especially /myth! The restore will fail if it can't find the /myth/backup directory.

    3) If X isn't working out of the box, you may need to merge certain setting from your old old working XF86Config-4 into the new /etc/X11/xorg.conf. See the "Known Changes" section below for more details.

    4) If you have a MCE USB remote, do the following:
    mv /usr/local/share/knoppmyth/remotes/mceusb2/etc/init.d/lirc /usr/local/share/knoppmyth/remotes/mceusb2/etc/init.d/lirc.stale

    This will avoid overwriting a good script with a stale version when configuring this remote.

    5) Do any other fixups that you need to complete before the Phase 2b Setup Dialogs run.
When you have completed any tweaks, use Alt-F7 to switch back to the GUI desktop virtual console screen. Note the asymetry here; Ctrl-Alt-F1 (or Ctrl-Alt-F2, ...) when you're in the GUI, Alt-F7 when you're in a text console.

2b. Setup dialogs:

    1) Make sure you get the timezone right. This is easy to screw up and will lead to really annoying problems with your program guide at the very least. If you botch this see the ProgramGuideIsOff page on the wiki.

    2) Make a note of the passwords you pick.

Phase 3 - Post-install setup:

    1) If you are upgrading from a version of KnoppMyth before R5D1, and you have a PVR card, you must drop all of your card definitions and recreate them! See steps 8-11 on the CompileIvtv page on the wiki for details. This is necessary because the version of the ivtv driver included in R5E50 uses different input names and numbering to conform to the standard V4L2 interface, and the DB configuration contains references to the obsolete names. If you do not do this, you will see all sorts of bizarre and mysterious errors. The configuration walkthrough on the BlackScreenWatchingTV wiki page may also be helpful when redoing this configuration.

    If you are upgrading from R5C7 or older you may also need to update your ivtv module options to work with the newer drivers. See this sticky thread for details - The KM upgrade scripts try to fix the most common obsolete options, but there are just too many possible options and too many places people can hide them to get everything.

    2) Redo any add ons or extra configuration that you noted earlier. (Check first to make sure that it hasn't already been added as a new standard feature.) For example:

      2.1) Restoring your NFS setup (If you have a .bz2 for your backup file rather than .gz use jxvf instead of zxvf in the tar command below.):
      mv /etc/exports /etc/exports.R5E50
      cd /
      tar zxvf /myth/backup/savedfiles.tar.gz ./etc/exports
      /etc/init.d/nfs-common start
      /etc/init.d/nfs-kernel-server start
      update-rc.d nfs-common defaults
      update-rc.d nfs-kernel-server defaults

      2.2) Restoring your webmin setup. This assumes that your LAN is using the private network IP range. If you are using a different range (e.g. correct the "allow" line below accordingly.
      echo "allow=" >>/etc/webmin/miniserv.conf
      /usr/share/webmin/ /etc/webmin root YOURPASSWORDHERE
      /etc/init.d/webmin start

      update-rc.d webmin defaults

      This may not work until you reboot.

      2.3) Restoring your lirc setup. To recover any LIRC customizations you've made from your backup:

        2.3.1) You must have run the script during the Phase 2b setup. If you skipped it or don't remember, run it now and choose the appropriate settings.

        2.3.2) Restore your old files from the backup and reboot (If you have a .bz2 for your backup file rather than .gz use jxvf instead of zxvf in the tar command below.):
        mv /etc/lirc/lircd.conf /etc/lirc/lircd.conf.R5E50
        mv /home/mythtv/.mythtv/lircrc /home/mythtv/.mythtv/lircrc.R5E50
        cd /
        tar zxvf /myth/backup/savedfiles.tar.gz ./etc/lirc/lircd.conf ./home/mythtv/.mythtv/lircrc

        2.3.3) Check your /etc/lirc/hardware.conf and make sure that the DEVICE is correct. This may mean changing "/dev/lirc" to "/dev/lirc0".

      2.4) Restoring your customized sound card settings. If you have special settings in /etc/asound.conf to enable SPDIF pass through or other features, restore your old files from the backup and restart the alsa drivers. (If you have a .bz2 for your backup file rather than .gz use jxvf instead of zxvf in the tar command below.):
      mv /etc/asound.conf /etc/asound.conf.R5E50
      cd /
      tar zxvf /myth/backup/savedfiles.tar.gz ./etc/asound.conf
      /etc/init.d/alsa restart
      /etc/init.d/alsa-utils restart

    3) Be very careful about doing apt-get install to add extra packages. The /etc/apt/sources.list has been updated to point to the sid repository and is fairly current but you still need to use common sense. Do not attempt to do an apt-get upgrade or an apt-get dist-upgrade, this is almost guaranteed to roach your system.

      3.1) Don't ever use the -y option.

      3.2) Always review the list of packages it wants to add or remove.

      3.3) If in doubt say "no".

Known Changes

There are a number of changes with consequences which may bite you on an upgrade.

    1) Backup and Restore changes

      1.1) The backup format has changed versus the one used in KnoppMyth versions before R5C7. Use the manual conversion process described under "Phase 0" item #1 above.

      1.2) The default compression format of the backup has changed versus R5C7 and later. The restore script will auto-detect the correct compression type if you don't confuse it by having copies of /myth/backup/savedfiles.tar* and/or /myth/backup/mythconverg.sql* with different compression types. This includes uncompressed versions, but not the version numbered files (i.e. /myth/backup/*.[1-9]). Note that this also means that any custom scripts or examples which extract things from the backup need to be changed to match. For tar archives this means using the options zxvf to extract files from the backup rather than using jxvf, for other files this means using the gzip command rather than bzip2.

      1.3) For versions using the new style backup (R5C7 and later) there are certain things which should be removed from your custom /myth/backup/restore.list before upgrading. I know from personal experience that restoring the old webmin "miniserver.conf" will give you grief. ;-) I would also recommend being cautious with "lvm.conf".

    2) X Server and Desktop changes.

      2.1) The switch from the XFree86 to the X server means merging customizations (such as mode lines) from the old file (/etc/X11/XF86Config-4) to the new one (/etc/X11/xorg.conf). Pay particular attention to the "Monitor" section. Do not simply copy over the whole file. There are some options in the old one that will give the new server serious indigestion. You may also need to tweak some of your nvidia-settings to work better with the new server.

      2.2) GDM is gone and won't be coming back. Rather than using "/etc/init.d/gdm restart" to restart the frontend from the commnad line you can now use "pkill xinit". To stop X entirely you can drop to single user mode using "telinit 1" at the console and then kill xinit using the command described above.

      2.3) The use of DisplaySize to get a particular DPI value has been superseded by the following settings in your Monitor section:
              Option "UseEdidDpi" "FALSE"
              Option "DPI" "100 x 100"

      See this thread for more discussion -

    3) The switch to udev for hot-pluggable devices may cause some of the device names to change, especially USB devices.

      3.1) The lirc device has changed from "/dev/lirc" or "/dev/usb/hiddev0" to "/dev/lirc0". This may require you to rerun "", correct the DEVICE settings in your "/etc/lirc/hardware.conf", and reboot.

      3.2) For audio you may have to run alsaconf, and change "/dev/dsp0" to "/dev/dsp" in the setup.

      3.3) Switching to udev also means that removable storage devices (CDs, USB drives, ...) should be pretty much "plug and play" with no extra setup required, however, the default mount points may have changed as a result. For example my USB thumbdrive is now automatically mounted on "/media/usbdisk" when it is plugged in. A second drive gets mounted as /media/usbdisk-1 and so on.

    4) Some of the theme names have changed, often in subtle ways. In particular I'm aware that Isthmus (with an upper case "I") is now spelled isthmus (with a lower case "i"). If you are not seeing any OSD information while watching live or recorded TV this is most likely the problem. Simply go into the setup menus and pick a different OSD theme.

    5) The full kernel source is no longer included, however, the kernel headers needed to compile modules are. If you have a problem you may need to add some additional symlinks. Cecil has also made the kernel source available via this thread - "So you want the kernel source..."

    6) Cecil has taken a more conservative approach on codecs in recent releases. See this mplayer "how to" postings for details on installing extra codecs -

    7) MythArchive has replaced MythBurn. MythArchive has a full blown GUI which can be accessed under Optical Disks -> Archive Files from the main menu. The old MythWeb interface has been removed.

    8 ) Serial port changes.

      8.1) Dialup networking support was accidentally left out. If you don't have a connection via other means this may be a show stopper, however, exposing a KM box directly to the internet, even via dialup, is already a very bad idea. Going through a firewall box of some kind is strongly recommended.

      8.2) This also affects people using the serial port for lirc IR transmitters (blasters) and receivers since the mythtv user is no longer a member of the dialout group. To correct this, edit the /etc/group file and add mythtv so that the dialout entry looks like this:

      8.3) The serial mouse setup in the default xorg.conf file can cause the X server to grab and lock the serial port, which can make it inaccessible for other uses. Removing or commenting out that InputDevice section in your /etc/X11/xorg.conf and restarting X will free it up.

    9) Freenx was replaced with VNC for remote access.

    10) Due to the use of a newer version of the ivtv drivers with full(?) v4l2 compliance, many settings which you used to be able to adjust with ivtvctl, must now be made using the v4l2-ctl utility. Run it with the --help option for a complete list of the command options.

    11) The atscscan and dvbscan utilities have been replaced with a single unified scan program.

Known Issues

There are also a handful of known issues with R5E50, mostly minor and with known work arounds:

    1) R5E50 is missing the mythrestore.old script which is used to handle old style backups. If you are upgrading from a KM version before R5C7 you must use the technique described under "Phase 0" above to create a backup which will work.

    2) If your backend doesn't come up after an upgrade (one symptom is an empty recodings list) running /etc/init.d/mythtv-backend restart as root should get it back. You can also do this using the Alt-3 key shortcut from the GUI desktop. To avoid future problems there is a patched version of the mythtv-backend script in a later post in this thread which should eliminate the main cause of this.

    3) There is a known IVTV issue with some PVR-150 and PVR-500 cards using the default 480x480 recording profile and VBI encoding. See the postings by ethernut here - The workaround is to switch to a 720x480 capture resolutiuon or turn off VBI. If you change the capture resolution, don't forget to adjust your recording bit rates to match.

    4) Last time I checked The ivtv 0.8.2 drivers still don't like PVR-150 and PVR-250 cards with the TCL M2523_*_E tuner chips. This was due to a deficiency in the v4l tveeprom.c in the kernel. To force the appropriate settings in /etc/modprobe.conf run the script and reboot. If /etc/modprobe.conf doesn't exist on your system you can create it. Either as an empty file using touch or using something like:
    echo "include /etc/modprobe.d" >>/etc/modprobe.conf

    5) Software suspend issues.

      5.1) There are still certain things that don't want to restart. If you use software suspend, you'll have to keep an eye out for these and deal with them on a case by case basis. Pay special attention to any areas where you have to do special hardware initialization.

      5.2) The scripts don't always get the swap partion name right in /etc/lilo.conf. See this thread In summary you may need to edit the "append=" setting in /etc/lilo.conf and change the clause that says something like "resume2=swap:/dev/hda noresume2" to the correct value your system, in a default install this is, "resume2=swap:/dev/hda2 noresume2". After making this change you need to run lilo -v to have it take effect.

    6) There are some issues with the rrd_tool graphs at http://YOURHOSTNAMEHERE/rrdtool_daily.html not updating or displaying properly out of the box.

      6.1) It may be necessary to fiddle with the cron jobs. I had to remove /etc/cron.hourly/rrd_km and add the followng line to the root crontab (using crontab -e)
      */5 * * * * /usr/local/bin/run_rrd

      6.2) If your ethernet traffic graph still isn't updating see this thread - "R5E50 upgrade and rrd_traffic doesn't update to mythweb"

      6.3) Finally check the ownership and permissions on the following files and directories, they should be owned by www-data:www-data and be world readable:
      chown www-data:www-data /var/www/rrdtool*.html /var/www/rrdtool/ /var/www/rrdtool/*.png /var/lib/rrd/ /var/lib/rrd/*.rrd
      chmod a+rx /var/www/rrdtool /var/lib/rrd
      chmod a+r /var/www/rrdtool*.html /var/www/rrdtool/*.png /var/lib/rrd/*.rrd

    7) Problems with the lirc remote control setup.

      7.1) The setup info for certain remotes is not up to date and may put the wrong value for DEVICE, in your /etc/lirc/hardware.conf configuration file. Please double check this against the actual device entry in the /dev directory.

      7.2) Some of the lircrc or lircd.conf configuration file templates contain MS-DOS style line endings which will cause them not to work.

      7.3) The /etc/init.d/lirc script installed for the MCE Remote (ver2) is out of date and not udev aware. See the intervention step in "Phase 2a." # 4 above. If you missed this, see merlinx's nice write up here for directions on fixing it.

    8 ) I'm told that "the old sound issues we used to have with R5D1 when a dvb card is present [is still there]. This shows up differently in R5E50 and freezes the frontend or console when you try to use any program that produces sound. Fortunately the solution is simple:"
    echo "blacklist  cx88_alsa" >>/etc/modprobe.d/blacklist

    See this thread for a better fix that won't disable analog sound capture for the card:

    9) Cecil has posted an update for nuvexport here: nuvexport in R5E50

    10) The path given for the Nvidia XvMC library in /etc/X11/XvMCConfig is wrong. Edit the XvMCConfig file and fix the path from:

    Credit for the fix goes to modemboy.

    11) I apparently had cheese for brains the day I sent Cecil the script, and the fixup for the /etc/mythtv/modules/ivtv file was left commented out. See this thread for the fix courtesy of bhamail:

OBTW - As Cecil said in the R5D1 thread:
cesman wrote:
Let's not turn this into my upgrade didn't work thread.

Before asking questions please see the TroubleShooting pages on the wiki. On the other hand, if I've botched something above, or it's unclear don't be shy!

Many thanks to all the folks who've worked through the early installs and upgrades to provide the solutions listed here. ;-)

Author:  mihanson [ Wed Dec 27, 2006 3:39 pm ]
Post subject:  Re: R5E50 Upgrade hints and hazards

tjc wrote:
On the other hand, if I've botched something above, or it's unclear don't be shy! Thanks again! ;-)

No, THANK YOU! I now make it a point to wait on an upgrade until you post these most excellent tips. Thanks!

Author:  Krem1120 [ Wed Dec 27, 2006 5:33 pm ]
Post subject: 

I just wanted to make sure that if running R5C7 we do not need to run the supplemental backup backup technique. I know it says prior to R5C7.. but I think i would feal better if someone said not including R5C7. I dont have much experience upgrading my box, usually I just wipe and redo, but this time i think upgrading wil be quite beneficial.



Author:  tjc [ Wed Dec 27, 2006 6:07 pm ]
Post subject: 

Krem1120 wrote:
I think i would feal better if someone said not including R5C7.

"Prior to" means "before", I even used it intentionally to emphasize the "before-ness"... I'd really hate to resort to set theory notation for open and closed intervals to make this completely unambiguous (and utterly confusing). ;-)

I'll go simplify that to just say "before"...

Author:  Human [ Wed Dec 27, 2006 8:46 pm ]
Post subject: 

I'd like to add that users of motherboards with ICH8 chipsets can boot with the
parameter to support this new chipset. The installer takes care of the rest.

Author:  tjc [ Wed Dec 27, 2006 8:57 pm ]
Post subject: 


Author:  neutron68 [ Wed Dec 27, 2006 9:38 pm ]
Post subject:  hostname?

Hi tjc,

I just typed the command
# hostname
as root and my R5D1 system responded with

When I look at the setup screens from the Mythtv frontend, there is a screen (setup/setup/general/screen1) which shows the hostname as

I'm not sure which to believe?!

During my last upgrade from R5C7 to R5D1, I typed in 'localhost' when it asked for the hostname. Was that wrong?


Author:  tjc [ Wed Dec 27, 2006 9:44 pm ]
Post subject: 

The first one is correct in this case. The "localhost" name is more of a pronoun than a name. It's the TCP/IP equivalent of "me" or "I" in English, and always corresponds to the local "loopback" address of You generally use localhost as a "never fail" way to talk to yourself.

Author:  tjc [ Sat Dec 30, 2006 3:44 pm ]
Post subject: 

I think we have a better fix for the MCE USB remote issues people are having thanks to simonf, seano, and mlbuser.

Not only do you need to correct the DEVICE= line in /etc/lirc/hardware.conf to read DEVICE="/dev/lirc0", but it looks like the custom version of /etc/init.d/lirc installed for that remote was out of date. See the directions above.

Author:  tjc [ Mon Jan 01, 2007 1:01 pm ]
Post subject: 

More on lirc in this thread - you may need to set the appropriate MODULE as described there.

Author:  red321 [ Mon Jan 01, 2007 3:21 pm ]
Post subject:  Widscreen Aspect ratio DisplaySize R5E50

I had
DisplaySize 320 180
in my XF86config, to give me a widescreen aspect ratio. This doesnt work when added to the xorg.conf file.
FIXED: see

Author:  nickread [ Mon Jan 01, 2007 6:26 pm ]
Post subject: 

A small issue - just doing an upgrade from R5B7, and found that the instructions above under 1.1 give a .gz backup, whereas the from the wiki assumes a .bz2 backup. Using the equivalent instructions from the wiki instead of the code from 1.1 works ok (so far).

Author:  tjc [ Mon Jan 01, 2007 7:45 pm ]
Post subject: 

That works. You can also update the checking script. It's a one character change to the tar options as noted above:
If you have a .bz2 for your backup file rather than .gz use jxvf instead of zxvf in the tar command above.

Just beware that you don't end up with two conflicting backup files as a result. I've been meaning to add a note about doing something along the lines of this:
ls -l /myth/backup/savedfiles.tar* /myth/backup/mythconverg.sql* |
 sed '/\.[0-9]$/d'

to verify that you don't have multiple formats for a given base filename. It's OK if the savedfiles.tar and mythconverg.sql compression (or lack thereof) are different. On my system it produces these healthy results:
root@black2:/# ls -l /myth/backup/savedfiles.tar* /myth/backup/mythconverg.sql* | sed '/\.[0-9]$/d'
-rw------- 1 root root 13715983 Dec 30 14:20 /myth/backup/mythconverg.sql.gz
-rw------- 1 root root  7958370 Dec 30 14:21 /myth/backup/savedfiles.tar.gz

Author:  crp724 [ Tue Jan 02, 2007 11:19 am ]
Post subject:  getting pcHDTV5500 to work in R5E0

I have a pcHDTV5500 card and did a fresh install of R5E0. After install I could not get playback of anything (video, TV, music etc) and the system would lock up rather than provide playback. This bit of code fixed everything and now the system works great. Thanks again everyone!

8 ) I'm told that "the old sound issues we used to have with R5D1 when a dvb card is present [is still there]. This shows up differently in R5E50 and freezes the frontend or console when you try to use any program that produces sound. Fortunately the solution is simple:"
echo "blacklist  cx88_alsa" >>/etc/modprobe.d/blacklist


Author:  mal1ch1 [ Tue Jan 02, 2007 4:42 pm ]
Post subject:  Thanks Again.....

Always great info. Since way back when I was working with KnoppMyth I've installed MythTV on Gentoo & Ubuntu, so my knowledge is slowly getting there :).
It was a little different installing this new version of KnoppMyth though; I expected things to just work like they did before. Not so. My 350's remote (lirc) didn't get configured, and a few other little things, like the database isn't just sitting there filling with data. The 500's tuners didn't get recognized either; I only had a "Tuner 1" to choose from.
I just wanted to check it out kinda' quick, and I did check the CD. I'm sure I'll work all the little kinks out as I work with it a little more.
Thanks tjc, for the help in the past and for the work on this latest version.

Page 1 of 5 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group