View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 16 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Jul 26, 2009 5:34 am 
Offline
Joined: Thu Feb 24, 2005 2:50 am
Posts: 60
During an auto-upgrade from R5.5 to R6.00.08, I receive the following error: "An error occurred while attempting to restore the database! The old database could not be restored, so a new database was created".

The same problem occurred when previously trying to upgrade from R5F1 directly to R6 a few days earlier, so I reverted to my backup disk and upgraded to R5.5 instead (upgrade to R5.5 worked fine with no database problems reported). My procedure of course is to run mythbackup, verify good .gz backup files in /myth/backup, shut down, boot from the R6 install CD, and select Upgrade.

After the attempted upgrade, the /myth folder is empty. The following lines near the end of mythvantage_install.log may be significant (or not):
Quote:
stopping mysql in chroot
/bin/stty: standard input: Inappropriate ioctl for device
:: Stopping MySQL 9G [BUSY] /etc/rc.d/functions.d/fbsplash.sh: line 38: [: ==: unary operator expected 9G [FAIL]

Any suggestions?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 26, 2009 8:40 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Try installing without the splash screen. The fbsplash.sh script is frame buffer splash, and by that error it sounds like it has some unquoted variable expansions.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 26, 2009 8:50 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
BTW - I just looked through the current R6 source and couldn't even find a
Code:
fbsplash.sh
command and the splash related scripts I did find all looked pretty correct in their quoting. Is this something you're restoring from your old backup?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 26, 2009 10:58 pm 
Offline
Joined: Thu Feb 24, 2005 2:50 am
Posts: 60
TJC, thanks for the tip. I did find some old etc.tgz etc files in /myth/backup from 2007 that perhaps R6's upgrade script is trying to restore. I'll try wiping the entire directory, running mythbackup, and see if I can upgrade to R6 successfully with only the two .gz files present.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 26, 2009 11:14 pm 
Offline
Joined: Mon Nov 28, 2005 9:05 pm
Posts: 200
****naughty hack warning***

I'd just whack everything in /data/srv/mysql/mythconverg/* and copy your database into it (i've done it several times this week while upgrading to svn). Dont forget to "chown mysql.mysql *" and "chmod 660" everything in the mythconverg dir.

Bounce mysqld and mythbackend then run mythbackend from a console as root make sure it upgrades the database. Once it does, wipe all of your settings in mythtv-setup and start fresh..


***nice hack warning***

My preferred method for transferring a database uses the technique here:

http://www.mythpvr.com/mythtv/tips/migr ... dings.html

This ofcourse assumes you can still mount your old database to run the dump..


Ether...

_________________
Knoppmyth 7.02 Kernel 2.6.39-LINHES
[MBE] SilverStone LC-10 HTPC Case, Asus M2NPV-VM, AMD X2 4200+, 1G RAM, Nvidia 9500 PCIe, PVR500 and a HD-PVR - Rockin VDPAU


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 29, 2009 6:23 am 
Offline
Joined: Thu Feb 24, 2005 2:50 am
Posts: 60
I removed all files from /myth/backup and ran "mythbackup" again to create new mythconverg.sql.gz & savefiles.sql.gz backup files, and attempted to upgrade to R6 again. Same result. Per the mythvantage_install.log, the upgrade seems to be having problems finding the backup database from the very beginning (see lines in bold below). Suggestions?
    2009-07-29 10:44:21.984 Using runtime prefix = /usr
    2009-07-29 10:44:22.016 DPMS is disabled.
    2009-07-29 10:44:22.141 Unable to read configuration file mysql.txt
    2009-07-29 10:44:22.141 Empty LocalHostName.
    2009-07-29 10:44:22.141 Using localhost value of larch5
    2009-07-29 10:44:22.343 New DB connection, total: 1
    2009-07-29 10:44:22.347 Connected to database 'mythconverg' at host: localhost
    2009-07-29 10:44:22.347 Closing DB connection named 'DBManager0'
    2009-07-29 10:44:22.349 Primary screen 0.
    2009-07-29 10:44:22.349 Connected to database 'mythconverg' at host: localhost
    2009-07-29 10:44:22.350 Using screen 0, 800x600 at 0,0
    2009-07-29 10:44:22.558 Primary screen 0.
    2009-07-29 10:44:22.558 Using screen 0, 800x600 at 0,0
    2009-07-29 10:44:22.559 No theme dir: /root/.mythtv/themes/LinHES
    2009-07-29 10:44:22.661 Switching to square mode (LinHES)
    2009-07-29 10:44:22.922 Using the Qt painter
    2009-07-29 10:44:22.922 JoystickMenuClient Error: Joystick disabled - Failed to read /root/.mythtv/joystickmenurc
    2009-07-29 10:44:22.923 lirc_init failed for mythtv, see preceding messages
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    2009-07-29 10:44:30.607 Using runtime prefix = /usr
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    2009-07-29 10:44:30.656 DPMS is disabled.
    2009-07-29 10:44:30.657 Unable to read configuration file mysql.txt
    2009-07-29 10:44:30.657 Empty LocalHostName.
    2009-07-29 10:44:30.657 Using localhost value of larch5
    2009-07-29 10:44:30.665 New DB connection, total: 1
    2009-07-29 10:44:30.673 Connected to database 'mythconverg' at host: localhost
    2009-07-29 10:44:30.674 Closing DB connection named 'DBManager0'
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    2009-07-29 10:44:30.676 Primary screen 0.
    2009-07-29 10:44:30.677 Connected to database 'mythconverg' at host: localhost
    2009-07-29 10:44:30.678 Using screen 0, 800x600 at 0,0
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    2009-07-29 10:44:30.730 Primary screen 0.
    2009-07-29 10:44:30.730 Using screen 0, 800x600 at 0,0
    2009-07-29 10:44:30.732 No theme dir: /root/.mythtv/themes/LinHES
    2009-07-29 10:44:30.733 Switching to square mode (LinHES)
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    2009-07-29 10:44:30.751 Using the Qt painter
    2009-07-29 10:44:30.751 JoystickMenuClient Error: Joystick disabled - Failed to read /root/.mythtv/joystickmenurc
    mythtv: could not connect to socket
    mythtv: No such file or directory
    2009-07-29 10:44:30.752 lirc_init failed for mythtv, see preceding messages
    Xlib: extension "Generic Event Extension" missing on display ":0.0".
    2009-07-29 10:44:31.414 XMLParse::LoadTheme using /usr/share/mythtv/themes/default/install-ui.xml
    install source:
    sr0
    mkdir: cannot create directory `/new_boot/myth': File exists
    copying /new_boot/etc to /tmp/etc
    /usr/MythVantage/bin/install_functions.sh: line 18: printhl: command not found
    /usr/MythVantage/bin/install_functions.sh: line 18: printhl: command not found
    did not find /new_boot/myth/backup/mythconverg.sql.gz
    1
    mount: you must specify the filesystem type
    mount /dev/hda4 /new_boot/myth
    MYTHMOUNT is hda4
    did not find /new_boot/myth/backup/mythconverg.sql.gz
    Couldn't find ANY database to restore, upgrade will continue but a new database will be installed.

    0
    umount: /new_boot/myth: not mounted
    searching for knoppmyth-versin
    found knoppmyth-version
    mythtv
    eth0
    2009-07-29 10:45:10.723 New DB connection, total: 2
    2009-07-29 10:45:10.723 Connected to database 'mythconverg' at host: localhost
    2009-07-29 10:45:10.724 SelectSetting::setValue(): invalid index: -1 size: 1
    lo no wireless extensions.

    eth0 no wireless extensions.

    eth0 disabling wireless button
    eth1 disabling wireless button
    wlan0 disabling wireless button
    wlan1 disabling wireless button
    US/Central
    1

ethernut, thank you for your suggestion to start with a fresh install. Yes, if I can't get upgrade to work, I may need to try that approach. (I've been reyling on the "auto upgrade" method since KM R4 many years ago so I guess I hadn't even considered a manual upgrade method.)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 29, 2009 9:17 am 
Offline
Joined: Mon Nov 28, 2005 9:05 pm
Posts: 200
No problem, glad to help. As in inverse to your style of upgrading. I always do a clean autoinstall of Knommpyth/HES when I upgrade and port over the database the nice way. That way I know the environment is pristine. Just a diferent way of thinkng I guess.

If you have more trouble, let us know!

_________________
Knoppmyth 7.02 Kernel 2.6.39-LINHES
[MBE] SilverStone LC-10 HTPC Case, Asus M2NPV-VM, AMD X2 4200+, 1G RAM, Nvidia 9500 PCIe, PVR500 and a HD-PVR - Rockin VDPAU


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 29, 2009 6:29 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
It really should work. Is your /myth partition different in any way? XFS? LVM? On a different disk? On a partition whose device name is going to change due to the SCSI emulation in the new kernel? (all /dev/hd* become /dev/sd* with no simple mapping.)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 30, 2009 5:13 am 
Offline
Joined: Thu Feb 24, 2005 2:50 am
Posts: 60
tjc, I believe this was a default KnoppMyth install as of 2005 on a 250GB parallel-ATA disk, since copied to a different identical-capacity parallel-ATA disk (using "dd") for backup. Here is my partition layout before attempting the upgrade:

    > cat /proc/partitions
    major minor #blocks name

    3 0 245117376 hda
    3 1 4441941 hda1
    3 2 594405 hda2
    3 3 14836027 hda3
    3 4 224323627 hda4

    > df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/hda1 4.2G 3.0G 958M 77% /
    /dev/hda4 214G 104G 111G 49% /myth
    tmpfs 505M 4.0K 505M 1% /dev/shm
    /dev/hda3 14G 33M 14G 1% /media/hda3

    > fdisk -l

    Disk /dev/hda: 251.0 GB, 251000193024 bytes
    255 heads, 63 sectors/track, 30515 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/hda1 * 1 553 4441941 83 Linux
    /dev/hda2 554 627 594405 82 Linux swap / Solaris
    /dev/hda3 628 2474 14836027+ 83 Linux
    /dev/hda4 2475 30401 224323627+ 83 Linux

    > mount
    /dev/hda1 on / type ext3 (rw,errors=remount-ro)
    /dev/hda4 on /myth type ext3 (rw)
    usbfs on /proc/bus/usb type usbfs (rw,devmode=0666)
    tmpfs on /dev/shm type tmpfs (rw)
    /dev/hda3 on /media/hda3 type ext3 (rw,nosuid,nodev)
Not sure what would constitute "unusual" so please let me know what other info would be helpful. I guess I was certainly hoping that the hd*->sd* mapping was handled "automagically" by the upgrade script, but certainly the mount points do not seem to exist anymore. Here is the output from the same commands issued after the attempted upgrade:

    >cat /proc/partitions
    major minor #blocks name

    8 0 245117376 sda
    8 1 4441941 sda1
    8 2 594405 sda2
    8 3 14836027 sda3
    8 4 224323627 sda4

    >df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda1 4.2G 2.0G 2.1G 49% /
    none 506M 0 506M 0% /dev/shm

    >fdisk -l
    Disk /dev/sda: 251.0 GB, 251000193024 bytes
    255 heads, 63 sectors/track, 30515 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x3db012b3

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 553 4441941 83 Linux
    /dev/sda2 554 627 594405 82 Linux swap / Solaris
    /dev/sda3 628 2474 14836027+ 83 Linux
    /dev/sda4 2475 30401 224323627+ 83 Linux

    >mount
    /dev/sda1 on / type auto (rw,noatime)
    none on /dev type ramfs (rw)
    none on /proc type proc (rw)
    none on /sys type sysfs (rw)
    none on /dev/pts type devpts (rw)
    none on /dev/shm type tmpfs (rw)
    /dev/sdb1 on /mnt/flash type vfat (rw)

Was I supposed to create the mount points myself at some point during the R6 upgrade? Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 30, 2009 10:27 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Actually the trick is to fix your /etc/fstab before a R5.5 to R6 upgrade so that it uses some form of mount point identification that won't change. That means either LABELs or UUIDs.

See this thread for clues: http://knoppmyth.net/phpBB2/viewtopic.php?t=19932 especially my posts at Sat Jun 06, 2009 6:10 pm and Sat Jun 06, 2009 11:21 pm.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 31, 2009 2:56 pm 
Offline
Joined: Thu Feb 24, 2005 2:50 am
Posts: 60
I didn't realize this was necessary since there is only one hard disk in my case, but I guess it is because of the change in device names from hd* to sd*.

By the way, do I need to label the swap drive to match what I put in fstab? I tried "e2label /dev/hda2 swap1" but it says there's no file system/super-block. Also, I assume I'd need to pick a label for /dev/hda3 (which apparently maps to /media/hda3 but I'm not sure what it's for).

Perhaps the simplest workaround for me would be just to change the hd* to sd* in fstab right before I run mythbackup & try upgrading (without bothering with either labels or UUID's). Will let you know how it turns out. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 31, 2009 9:51 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
If you upgraded from a much older version, KM once had 4 partitions one of which was a special LiveTV buffer. I merged mine with the root partition quite a while back.

As for labeling the swap partition, if you search for "label" with me as the author, you might be able to find a script I wrote (possibly called "labeler.sh") which shows the various tools. The central bit looks like this:
Code:
    case $fstype in
    ext2|ext3) cmd="e2label $device $label" ;;
    jfs)       cmd="jfs_tune -L $label $device" ;;
    xfs)       cmd="xfs_admin -L $label $device" ;;
    reiserfs)  cmd="tunefs.reiserfs -l $label $device" ;;
    swap)      cmd="mkswap -L $label $device" ;;
    *)
        echo "Ignoring $device of type $fstype"
        return 0
        ;;
    esac


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 01, 2009 9:55 pm 
Offline
Joined: Thu Feb 24, 2005 2:50 am
Posts: 60
Yes I suppose the /dev/hda3 partition is probably from an old KM R4 (or early R5) installation that I've upgraded many many times.

Last night I labeled all partitions except swap, ran mythbackup, and retried the R5.5->R6 upgrade. This time the upgrade script reported a successful install, and after rebooting I could see that the mythconverg database was successfully restored (media library lists recorded programs). Progress! But, the new fstab after rebooting is not mounting the myth partition (no programs are found), and several other folders (I think all those in savedfiles.gz) also were not restored.

At this point, I'm not sure if I should try fixing the new fstab and restoring savefiles.gz (can I trust that everything else is installed OK), --or-- retry the upgrade on another R5.5 disk with the extra partition eliminated and swap partiition labeled (in case the extra partition was confusing the upgrade), --or-- start with a fresh R6 install and try copying over the database files. Either way, I'll let you know how it turns out. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 9:32 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
You can always save a copy of the current /etc/fstab, restore the old one from the back up and compare them.

There are instruction for doing this in the R5.5 hints (see the link in my signature) and more details here: http://knoppmyth.net/phpBB2/viewtopic.p ... 490#112490


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 10, 2009 8:10 am 
Offline
Joined: Thu Feb 24, 2005 2:50 am
Posts: 60
I suppose I should give a status update on this issue...

Yes, the problem was that /myth was originally on /dev/hda4, and MythVantage seemed to always assume the myth partition was /dev/hda3 (or sda3 as it's called in this new linux version). Labelling the volumes in /etc/fstab didn't seem to help, since a new fstab is generated from scratch when booting from the R6 install CD.

I tried removing references in fstab to /dev/hda3 and deleting the hda3 partition using fdisk before trying the upgrade to R6, but it did not help, since the myth partition was still on hda4 in the partition table. I couldn't find a way to swap the last two entries in the partition table (no such option in parted or fdisk), so I did it manually by booting DOS and writing a little assembly language program to read & write the partition table using debug.exe (yuck). Right before I did that, I also updated /etc/fstab to tell it that the /myth mount should be on /dev/hda3 instead of /dev/hda4 after the reboot (I would also recommend running "Myth Backup" after updating fstab)

In my case, I ended up swapping the hda3 & hda4 entries in the partition table after I had already tried the upgrade to R6, and assuming that /dev/sda1 was going to get blasted anyway I figured I'd just re-run the upgrade script from the R6 CD. Using this approach, the restore still didn't quite work , so if I did it again I would certainly reorder the partition table entries BEFORE trying the upgrade. Presumably because of the double-upgrade (I suppose MythVantage grabbed some files from /dev/sda1 before blasting it and these weren't the original versions), I still ended up having to update /etc/fstab manually to get the /myth partition mounted. The /etc.old directory seemed to be the /etc directory after the first upgrade attempt, so I blew that away and extracted /etc.old from the savedfiles.tar.gz backup. I also extracted my /home directory which didn't get restored either. Next, although I could play old recordings, I found that I could not record any new ones. To resolve this, I used the following command to enable the mythtv user to write to the /myth partition:
Code:
chown mythtv:mythtv -R /myth


After successfully getting the basic functionality working, the rest was just getting everything configured again (remote control, channel changer, webmin, LCDd, weather, etc). Hopefully any problems I'm subsequently having aren't due to the missing /myth mount point after the first reboot.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu