LinHES Forums
http://forum.linhes.org/

Hints for upgrading to R5C7
http://forum.linhes.org/viewtopic.php?f=3&t=10116
Page 1 of 3

Author:  tjc [ Fri May 19, 2006 8:03 pm ]
Post subject:  Hints for upgrading to R5C7

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

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 it's written to a "drunken monkey" level of detail, with the intent that you can cut & paste the command shown directly from this message 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... Thanks.

OBTW - A note on the color coding used below, red is used for file system objects (files, directories, ...), green is used for sample commands (partial or complete).

BEFORE you upgrade:
    - Make sure you have a good back up using the standard script - /usr/local/bin/mythbackup

    - Check that the backup worked!!!
    Code:
    cd /myth/backup
    ls -al
    for i in etc.tar.gz home.tar.gz root.tgz ; do tar ztvf $i ; done

    Don't forget to look at the SQL dump file to make sure it's not empty or very small.

    - Manually back up all of /etc /root and /home - As root:
    Code:
    cd /
    tar jcvf /myth/backup/savedfiles.tar.bz2 ./etc ./root ./home

    If this file exists the new restore script will use it by preference. See this posting http://mysettopbox.tv/phpBB2/viewtopic.php?t=10117 for more details. Also if you suddenly discover that you need your old /etc/X11/XF86Config-4 file you can retrieve it like this:
    Code:
    tar jxvf /myth/backup/savedfiles.tar.bz2 ./etc/X11/XF86Config-4


    - 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.

    - Make a note of your current hostname.

When you boot from the CD (phase 1 upgrade):
    - Use the testcd option in your boot command. If the validation fails do not continue the upgrade!

    - 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.

    - Do not change your hostname during the upgrade! Look at the notes you made before the upgrade and use the same hostname. Changing the hostname will cause a number of annoying problems with various tables in the DB, particularly the settings table, which uses the hostname as one of the keys. Changing the hostname is a project beyond the scope of these hints.

After the install from the CD and reboot (before entering the root password in the xterm on the desktop to enter the phase 2 setup):

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

    - If you're using LVM with the standard volume group name of "vg" use the recreate_lvm.sh script to restore it. Otherwise you'll need to edit the script to use the "right" volume group name for you system.

    - If you have some other nonstandard disk arrangement you may need to correct your /etc/fstab and mount the updated partitions. Especially /myth!

    - If X isn't working out of the box, recover your old working XF86Config-4.
    Code:
    cd /
    mv /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.orig.R5C7
    tar jxvf /myth/backup/savedfiles.tar.bz2 ./etc/X11/XF86Config-4
    /etc/init.d/gdm restart


    - Do any other fixups that you need to have in place before the 2nd phase install/upgrade script runs.

During phase 2 setup:
    - 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

After the phase 2 setup:

    - If you are upgrading from a version older than R5B7, see the CompileIvtv page on the wiki for the last four steps to be done after upgrading the ivtv driver. This is necessary because R5C7 includes a newer version (0.4.4 ) of the driver which requires different setup. Your PVR cards, especially the PVR-150 and PVR-500, will not work correctly if you don't do these steps. You may also need to do the fourth step if your card is not recognized.

    - 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:

      1) Restoring your NFS setup
      Code:
      cd /
      mv /etc/exports /etc/exports.orig.R5C7
      tar jxvf /myth/backup/savedfiles.tar.bz2 ./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) Restoring your webmin setup
      Code:
      cd /
      mv /etc/webmin/miniserv.conf /etc/webmin/miniserv.conf.orig.R5C7
      tar jxvf /myth/backup/savedfiles.tar.bz2 ./etc/webmin/miniserv.conf
      /usr/share/webmin/changepass.pl /etc/webmin root YOURPASSWORDHERE
      /etc/init.d/webmin start
      update-rc.d webmin defaults


    - Be very careful about doing apt-get install to add extra packages. The dependency cascades are kind of bad at the moment and you could roach your system. At the very least check your /etc/apt/sources.list and make sure that it lists these 3 entries at the front:
    Code:
    deb http://http.us.debian.org/debian stable main contrib non-free
    deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
    deb http://security.debian.org stable/updates main contrib non-free

    After doing this I was able to apt-get update then apt-get install several packages like jed, xjed and apcupsd. YMMV! Please use good judgement here. Do not use the -y option and check any extra packages apt-get wants to install, upgrade or delete carefully.

Author:  marc.aronson [ Thu Jun 01, 2006 9:07 am ]
Post subject: 

TJC, thanks for posting this guide. I am preparing to do my upgrade from R5A30.2 to R5C7. In the process I am going to replace my existing disks with a different set of disks and I want to selectively restore a small subset of my various tweaks, so I was planning to use a slightly different approach. Do you see any problems with the following:

0. Run mythbackup.

1. "cp -a" /myth to my new, jumbo disk.

2. Remove all existing drives. Install empty drive to "hda"; install jumbo drive with copy of "/myth" to "hdb".

3 .Run auto install (not ugprade).

4. Quit out of "myth setup", shutdown front end & backend.

5a. Twiddle fstab so that my "jumbo disk" is now mounted as "/myth".

5b. Restore mythtv database using mythrestore. I will tweak the script so that it doesn't restore anything unrelated to the data base restore as I want to manually (and selectively) restore my other tweaks.

6. Run myth setup to verify that things look good.

7. Restart backend, frontend, etc.

I'll also take a look at the "/myth" directly created by the R5C7 install to see if are any "goodies" on it I should pick up.

Do you see any problems with this approach? Thanks!

Marc

Author:  tjc [ Thu Jun 01, 2006 5:11 pm ]
Post subject: 

marc.aronson wrote:
Do you see any problems with this approach?

I'm away from the box so I can't check a couple of the things I'd like to directly, but I've got some ordering concerns. Ithink if you try to break out of the install it may end up completing later and undoing the results of your restore.
marc.aronson wrote:
3 .Run auto install (not ugprade).

4. Quit out of "myth setup", shutdown front end & backend.

Don't quit. Go all the way through the install on just /dev/hda to get a good baseline.
marc.aronson wrote:
5a. Twiddle fstab so that my "jumbo disk" is now mounted as "/myth".

Good.
marc.aronson wrote:
5b. Restore mythtv database using mythrestore. I will tweak the script so that it doesn't restore anything unrelated to the data base restore as I want to manually (and selectively) restore my other tweaks.

At this point do another backup, and then some minor surgery by decompressing the .1 SQL dump and copying it back over the newer one.

Then toss the same CD back in and do an auto upgrade using your modified backup. This may seem like the long way around the mulberry bush, but I think it's probably the most reliable way to get your DB contents restored and the schema fully upgraded. Remember at the point mentioned above you'll need to Ctrl-Alt-F1 and fix your fstab again.

BTW - You'll still need to go through the ivtv fixes mentioned above if you're coming from a version prior to R5B7.

Author:  marc.aronson [ Thu Jun 01, 2006 7:27 pm ]
Post subject: 

TJC:

I think I see where you're going with this. In essence, I am doing a clean install of R5C7, making a backup of that clean install, replacing the sql dump (mythconverg.sql) created by running the r5c7 backup with the sql dump created on my original R5A30.2 system, and then running an auto upgrade. Am I properly understanding the approach? This approach does make a lot of sense.

As a final sanity check, I don't thnk I will need to do the ivtv fixes mentioned because only the database is coming from a pre-r5b7 system. The ivtv config files will all be from the R5C7 install. Am I thinking about this the right way? Thanks!

Marc

Author:  tjc [ Thu Jun 01, 2006 8:30 pm ]
Post subject: 

marc.aronson wrote:
I think I see where you're going with this. In essence, I am doing a clean install of R5C7, making a backup of that clean install, replacing the sql dump (mythconverg.sql) created by running the r5c7 backup with the sql dump created on my original R5A30.2 system, and then running an auto upgrade. Am I properly understanding the approach? This approach does make a lot of sense.

Spot on. :-)

marc.aronson wrote:
As a final sanity check, I don't thnk I will need to do the ivtv fixes mentioned because only the database is coming from a pre-r5b7 system. The ivtv config files will all be from the R5C7 install. Am I thinking about this the right way? Thanks!

Nope. See the note above, the new drivers require new setup, part of which is stored in the DB.
Quote:
- If you are upgrading from a version older than R5B7, see the CompileIvtv page on the wiki for the last four steps to be done after upgrading the ivtv driver. This is necessary because R5C7 includes a newer version (0.4.4 ) of the driver which requires different setup. Your PVR cards, especially the PVR-150 and PVR-500, will not work correctly if you don't do these steps. You may also need to do the fourth step if your card is not recognized.

You don't need to upgrade the drivers, just do the steps (8-11 if memory serves) to reconfigure the cards. This is absolutely essential.

BTW - I seem to be utterly failing to get this point across to folks. Can you think of some way to explain it more clearly? :?

Author:  marc.aronson [ Fri Jun 02, 2006 7:36 am ]
Post subject: 

tjc, thanks for the help and quick reply. I'm going to try the upgrade thiw weekend.

In terms of getting the point across on the need to execute those last 4 steps -- I know what the confusion was for me. In my mind I was thinking that the issue was totally address by changes in the file system. I had not grocked that there were also data base changes that needed to happen, and that those data base changes were made by deleted the existing tuner cards from the data base and re-creating them. It's not that your instructions don't say that -- they do, and very clearly. It has more to do with "assumptions" in the mind of the reader. Perhaps this change in wording will drive the point home:

Quote:
- If you are upgrading from a version older than R5B7, see the CompileIvtv page on the wiki for the last four steps to be done after upgrading the ivtv driver. This is necessary because R5C7 includes a newer version (0.4.4 ) of the driver which requires changes in both various configuration files and the mythtv database. Your PVR cards, especially the PVR-150 and PVR-500, will not work correctly if you don't do these steps. You may also need to do the fourth step if your card is not recognized.


Of course, I can only be sure about why I was confused. The reason that others missed this point may be very different. Perhaps simply having this chain of messages in the thread will help people better recognize the importance of this step.

Thanks again for your help -- both today and over the years!

Marc

Author:  tjc [ Mon Jun 26, 2006 6:36 pm ]
Post subject: 

For information about doing a manual upgrade (needed if you have a SATA drive or other "unusual" disk layout) see this thread. http://mysettopbox.tv/phpBB2/viewtopic.php?t=8686

Note that the steps to create the semaphore file can be done either before rebooting, or after rebooting and before entering the password. After the reboot the commands are:
Code:
rm -f  /home/mythtv/.configure
touch /home/mythtv/.upgrade
chown mythtv:mythtv /home/mythtv/.upgrade

Before the reboot you'll need to prefix the directory names with the mount point for whatever partition you're installing to.

Author:  bigbro [ Tue Jul 11, 2006 11:45 pm ]
Post subject:  Third time with some help, can it be a charm.

I have a pretty basic install, no specific stuff that I can't recreate.
Only uniqique thing I have is about 180Gigs of various shows that have been recorded while I was away. They are mounted on an LVM.

I followed the instructions here at least I think.

Since I had some problems before that were related to my installation and further adjustments, chose to do a full install rather than an upgrade. Everything seemed to work right in the install, I had done a recreate of the LVM and could tell I only had about 60 gigs left. I did a myth restore from my good backup. I had the recording back and they would play. Then I went in to do the Compile IVTV. Seemed to get corrupted stuck at that point after I did the reboot.

So I did another install just for test, before I attached my LVM I checked and all of the box functions worked with no tweaking. Not the distribution it would seem. So from that perspective if I were building a "New" box this would probably qualify as a Tier 1. But momma would really like to recover some of the stuff she had recorded while I was away.

Now I know I have fix my PVR once I restore the SQL db. Is there something I am missing? I am not sure how I should go in and do some minor surgery on the .1 SQL dump like you referenced. Like I said a pretty plain install, only setup Webmin and SSH so I could access the box from my desktop pc.

I haven't done anything that would corrupt my original backup from r5a30, like a new backup so it is still as if I am just coming from r5a30. just that part doesn't exist anymore.

Thanks in advance.

Author:  marc.aronson [ Wed Jul 12, 2006 8:19 am ]
Post subject: 

bigbro, I wanted to do the same thing (clean install but import my old data base & recordings). Take a look at the exchange between TJC and myself a few posts back on this thread. That approach worked for me. and it is different than what you did.

Marc

Author:  marc.aronson [ Wed Jul 12, 2006 8:30 am ]
Post subject: 

I just noticed I missed your question. You asked
Quote:
I am not sure how I should go in and do some minor surgery on the .1 SQL dump like you referenced.


The step prior to this was to run a backup under R5C7. This will result in your existing mysql dump file being gziped and renamed "<original name>.1". The "surgery" is simply unzipping this file and renaming it back without the ".1" suffix. Alternatively, you can save your original mysql backup file before you run the mythbackup under R5C7, and then copy it back before you do the restore.

Marc

Author:  bigbro [ Wed Jul 12, 2006 9:21 pm ]
Post subject:  I think I've got it?

So if I understand this correctly my steps would look something like this.

0)Run mythbackup. (already done and still untouched.)

1) Run auto install (not ugprade)

Before Step 2 - "Root Password"
2) Switch to Alternate Console Ctrl-Alt-F1 and run Recreate_lvm.sh

3) check my /etc/fstab for proper /myth mount.

4) Leave Alternate Shell (I know I can Ctrl-Alt-F7 and that switches me out, is there someway I can terminate that Alt console easily? or do I even need to?)

5) Enter Root Password

6) Complete Myth Setup?

7)After it Completes, run a MythRestore at an Alternate Root console.
(This should load my existing Mysql db and all of my saved stuff as well as the old style "IVTV")

8)Run Last 4 Compile IVTV steps? Includes a Restart and then rerun Mythtv-Setup.

9)Save my Original MySQL backup elsewhere. At Completion above Run MythBackup from Root Console, Copy that Mysql somewhere, then replace the master one with my Original one here.

10) Now Insert my CD and run Auto Upgrade. (Do I need to do a MythRestore once this is complete?)

11) All should be happy? From here I can fix X11 and Webmin and anything else I desire....

So does that look Right? Or is there something I am missing?
Thanks in Advance.

Andy

Author:  marc.aronson [ Wed Jul 12, 2006 10:58 pm ]
Post subject: 

If you are using a standard 2-disk LVM installation today, then your /dev/hda4 partition is a part of your LVM group and I am concerned that the first step (doing an initial install) will format and wipe out /dev/hda4, but I don't know for sure that this is what will happen. In my case, I did my upgrade with all new disks, so the scenario is a bit different.

What is your disk layout on your original system and are you using those same disks for this install? I assume you install knoppmyth on /dev/hda1. Does any partition on the /dev/hda drive participate in the LVM group?

Marc

Author:  tjc [ Wed Jul 12, 2006 11:39 pm ]
Post subject: 

Auto-install would be BAD if there is anything on hda that you care about. This leaves you two choices.

- A manual install that is careful not to touch the partitions associated with /myth, or...

- Move the originnal backup and media files from the /myth tree somewhere else (another machine or a spare disk) for the duration, and (selected parts of it) back after the 2nd backup.

Author:  mjl [ Thu Jul 13, 2006 6:27 am ]
Post subject: 

Hi,

Going from A30 > C7 .nuv > meg won't the recordings sort of become orphans ? Need to be very careful as not to cause damage and loose "stuff" . I think that I would invest in a new second drive, equal to or larger than current and then play with that one.

One thing I have done as a just in case, was list out the /myth/pretty to a file so I had the titles and the matching .nuv .

ls -al /myth/pretty > pretty-list
at least then you have association to manually turn them into video files.

Have a great day!
Mike

Author:  marc.aronson [ Thu Jul 13, 2006 8:41 am ]
Post subject: 

Bigbro, based on re-reading the thread, I think there are two possible steps you missed on your first attempt to ugprade with a clean install. Also, based on the content of your original message, I am guessing that you did your clean install using a fresh disk. In either event:

1. After everything was completed, including the restore, did you go into setup (alt-s), delete your tuners and re-create them? This is a required step for any upgrade from R5A* to R5C*, and if you didn't do this, you will have problems.

2. As described above, I did both an install and an upgrade, to ensure that all ugprade scripts and processes ran. Don't know for sure that the 2-step process is required, but from your original post, it doesn't sound like you included this as part of your original attempt.

Marc

Page 1 of 3 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/