User:Mehall@itfysb.com/Upgrading from 0.20.0 to 0.20.2 on Fedora Core 6 from rpms
This is the technique I used when upgrading my FC6 system from 0.20.0 to 0.20.2. I do not provide any information about updating the MythTV settings, because that's documented many other places. I'm doing this for people that may or may not have much Linux experience, and this can help you do the upgrade as quickly and easily as possible. I am not documenting how to do it here, but I'm using the ATrpms repository.
The basic configuration of my system is a 160 MB disk running LVM2, a Hauppage PVR-150 as tuner 1, a PVR-350 as tuner 2, and using the PVR-350 as my video out. -- Mehall
- WARNING -- There is some risk to this upgrade of the kernel. As with any kernel change, it is possible to completely prevent the system from booting. Even having another kernel version installed does not completely guarantee that it will still boot.
- 1 Prepare for upgrade
- 2 Upgrading the system
- 3 After the Upgrade
- 4 Addendum
Prepare for upgrade
The upgrade process was pretty straightforward. Make sure the system is working completely before doing this upgrade, otherwise problem determination becomes more tricky - what's new, what's old? Is that the same problem?
Locate recovery media
Find the FC6 rescue CDROM Image. (If you experience any module issues as I had, it can prevent you from being able to even get to single user mode. Trust me on this one. I do Linux for a living. --mehall) Having it before starting beats having to spend 2 hours looking for it or downloading a new one.
Stop the running software
Stop the backend and disable the frontend restart for troubleshooting later. This is important to ensure that nothing gets corrupted.
# /sbin/service mythbackend stop # touch /home/mythtv/nogui
This prevents X from restarting in a login script in /home/mythtv/.bashrc:
if [ -z "$DISPLAY" -a "$(tty)" = "/dev/tty7" ] then while [ 1 = 1 ] do if [ ! -f ~/nogui ] then startx fi sleep 10 done fi
Exit the mythfrontend at some point. Since the next process took a while, this is a good time to listen to music through the frontend for a while.
Back up the database
# mysqldump -p mythconverg > mythconverg.db.020.0
(Wondering what the -p flag is? it's prompt for password. Oh, you DID set a password on your root account's db access, right!?? If not, um... do it. Soon. Maybe even now.)
Document your current system software
Get a list of the current software to ensure getting back to the exact current versions is possible The filename isn't so important, just so long know what it is later if needed.
# rpm -qa > /root/myth_system_packages_pre_update
Upgrading the system
Yum is your best friend. No really. Unless upgrading to a version a little before the most recent. There's a way to avoid that, just specify the exact version to upgrade to. So, there's a few packages that must be upgraded to specific versions, and then the rest of the system updates itself.
Updating the kernel
Update the Kernel to 18.104.22.168-32.fc6
# yum install kernel-22.214.171.124-32.fc6.i686.rpm
Update the ivtv kernel modules (drivers)
Update the ivtv-kmdl to 126.96.36.199-32.fc6-1.0.1-133.fc6
# yum install ivtv-kmdl-188.8.131.52-32.fc6-1.0.1-133.fc6.i686.rpm
Update the ivtv package
Update ivtv to 1.0.1-133.fc6
# yum install ivtv-1.0.1-133.fc6.i386.rpm
Update the alsa kernel modules
Update alsa-kmdl to 184.108.40.206-32.fc6
# yum install alsa-kmdl-220.127.116.11-32.fc6.i686.rpm === Update the lirc package's kernel modules === Update lirc-kmdl to 18.104.22.168-32.fc6 <pre># yum install lirc-kmdl-22.214.171.124-32.fc6.i686.rpm === Updating the rest of the system === This step is very important. If you do not exclude the packages we just upgraded, yum will attempt to upgrade them to higher revisions which may not match the kernel versions you have available. If you need to use a different kernel version, make sure that anything here that says <code>2.6.22-1.32</code> is replaced by your kernel version. If any of these packages fail, your hardware will not do what you want, which is record TV. <pre># yum --exclude=kernel --exclude=ivtv --exclude=ivtv-kmdl --exclude=alsa-kmdl --exclude=lirc-kmdl update
Notice that I have not used the -y flag. This way, if something that undesirable attempts to upgrade, back out is still an easy option. Go get a drink or something while this step is running. It will take a while to build the dependency tree (mine took 5-10 minutes), and the next phase can take even longer - about 1 to 2 hours to downloading all the packages.
Disable kernel modules
For right now, the /etc/modprobe.conf file will create a problem. All of the module dependencies haven't been calculated yet by the OS. By disabling this, the system can come up successfully. By not solving this problem now, the system will hang on reboot.
# mv /etc/modprobe.conf /etc/modprobe.conf.disabled === Reboot the system to move to the new kernel versions === Several pieces of documentation indicate that the system should be shut down for at least 30 seconds to allow the registers to clear on the PVR-x50 cards. <pre># shutdown -h now
Resolve module dependencies
Now that the OS has been rebooted and the depmod command will reference the correct kernel version, move the kernel module configuration file back in place, resolve dependencies, and reboot again so all of the device drivers should start up successfully.
# mv /etc/modprobe.conf.disabled /etc/modprobe.conf # depmod -a # shutdown -Fr now
After the Upgrade
Now that the upgrade is 'finished', it should be safe to do a few other important steps.
Shut down the backend again
# /sbin/service mythbackend stop
Run the MythTV setup
Update the channel listings according to other MythTV documentation.
Double check functionality
Verify that the hardware is still functioning correctly.
# dd if=/dev/video''0'' of=/dev/video''16'' bs=64k
Is there video on the TV? If so, good.
Did X start up the MythTV front end? If so, excellent. Shut that back down again.
Restart the backend
# /sbin/service mythbackend restart
Restart the front end
# rm /home/mythtv/nogui
Test all functions
This is a good time to verify system functionality. View recordings. Watch live TV. Change channels. Do other normal functions routinely used. If all is good, have a frosty cold beverage [Thanks Dave (Letterman)] and enjoy a little TV.
There may be some other issues with respect to settings for ivtv options and/or other modules depending on how the hardware was originally configured. If the hardware was well configured, there shouldn't be many issues. For instance, the video4linux-kmdl package was not installed on mehall's system. Installing it corrupted other kernel modules. Ensure that packages which aren't currently installed aren't installed afterwards. Installing different packages may introduce other unexpected changes. The reboot after reconfiguring x due to some kernel module differences resulted in repeating kernel panic. After booting via the Recovery CD and then removing the video4linux-kmdl modules, another unsuccessful reboot announced problems. After attempting recovery again and then removing ivtv-kmdl and ivtv, followed by another reboot, the system was operational but without video services. Mythbackend started and was unaware of any upcoming recordings causing this author to panic worse than the kernel. After reinstalling ivtv and ivtv-kmdl and another reboot, MythWeb indicated upcoming recordings and all was well. With some luck, these problems will be unique. -- updated 9/27 -- The problem was caused by missing a module dependency resolution step. The additional steps were added immediately before after the 1st reboot.
After I ran with this a couple of days, for some reason I still was missing data from the original zap2it listings starting at 7 pm on Sep 2nd. Here's what I did to clear it up. (Caution: the following procedure is NOT normally required when switching from DataDirect to SchedulesDirect. Deleting your Video Source can change internal channel identifiers, which will impact any recording rules you have set up. You did back up your database, didn't you?)
Back up the database (again)
# mysqldump -p mythconverg > mythconverg.prelistingschange.dbdump
Shut down the backend
# /sbin/service mythbackend stop
Run the setup
Go into the Video Sources menu. Asssuming your entire listings source is Zap2it, you'll need to delete all sources. If you have other sources, save all appropriate settings elsewhere and recreate them or they will be lost! After they have been deleted, recreate any sources necessary (other than SchedulesDirect).
To create Schedules Direct, choose New Source. Give it a name of some variety, such as Cable. Make certain that "SchedulesDirect.org Internal" is selected. Enter User ID and Password as appropriate, and select Retrieve Lineups. Afterwards, the correct lineup should be listed under lineups. Choose the proper frequency table, such as us-cable, then click finish.
Escape back to the main menu, and select Input Connections. All inputs will be set to (None). Select each input source that should be connected to the TV listings from SchedulesDirect and give it a suitable name such as PVR150, CableBox or other descriptive display name. Names such as 'tuner' are not terribly helpful if a second tuner is available. Select the video source created above. Select the "Fetch listings from channel source" button, and eventually a 'starting channel' should be set, and input priority should then default to 0 (zero). Repeat for each additional tuner, then exit the setup program.
Refill the database
All listings data has been erased. Nothing will work unless the listings are repopulated. MythWeb apparently references the first data source resulting in missing listings data if it is missing any. A combination of listings data does not appear to be working, at least on this author's system. Fortunately, a mythfilldatabase will completely repopulate this table.
$ mythfilldatabase --refresh-all
Wait a little while, and ignore the error about unable to connect to the backend. This is to be expected with the backend down. Besides, updating channel sources and connections should only be done with the backend down. Now that the fill database step is complete...
Restart the backend
# /sbin/service mythbackend start
Give it about 60 seconds, and connect to mythweb. Browse your listings, and the entire table should be updated. Hopefully, this has helped with upgrading a functional MythTV box.