TiVo Community Forum Archive 1

TiVo Community Forum Archive 1 (http://archive.tivocommunity.com/tivo-vb/index.php)
- TiVo Upgrade Center (http://archive.tivocommunity.com/tivo-vb/forumdisplay.php?forumid=25)
-- DOH! MFSrestore overwrote MFSbackup source drive (http://archive.tivocommunity.com/tivo-vb/showthread.php?threadid=182265)


Posted by davidm on 06-28-2004 03:23 AM:

DOH! MFSrestore overwrote MFSbackup source drive

because I had no FAT disk on which to make a backup, I tried to do a direct mfsbackup | mfsrestore pipe to a large blank HD (mounted on /dev/hda) using the MFSTools boot cd (mfstools2noJ.iso). What does the noJ suffix stand for, by the way, and should I use another image instead?

out of curiosity, I first looked at my source disk mounted on /dev/hde with mfsinfo /dev/hde and mls. To get mls to work I had to export MFS_HDA. *sigh*.


to test the backup process (my other unit is in a GSOD loop and backup stalls at 473MB) i did:

mfsbackup -so - /dev/hde > /dev/null

output:
Source drive is 23 hours
-upgraded to 103 hours
Backup image will be 23 hours
Uncompressed backup size: 960MB
Backing up 960 of 960MB (100%)

--------------
so far so good.

so I did the real thing (so I thought)

mfsbackup -so - /dev/hde | mfsrestore -s 127 -xzpi - /dev/hda

output:
...
Restoring 960 of 960MB (100%)
Cleaning up restore. Please wait a moment
Primary volume header corrupt, trying backup.
Secondary volume header corrupt, giving up.
mfs_load_volume_header: bad checksum
Segmentation fault.


It wasn't really clear to me what might have happened, until I recalled:

export MFS_HDA=/dev/hde

sure enough, mfsrestore overwrote /dev/hde (the source drive).

mfsinfo now reports this drive as 23 hours (can be upgraded 5 times)


I suspect that the message at the end of the restore is because mfsbackup was checking the REAL /dev/hda, which a restore (good or bad, I don't know) on it made from the Kazymir boot disk at MFSTOOLS1.0. It's essentially the same message that mfsinfo gives with:

mfsinfo /dev/hda

output:
Primary volume header corrupt, trying backup.
Secondary volume header corrupt, giving up.
mfs_load_volume_header: bad checksum


Plugging my overwritten /dev/hde back into TiVo gave me a few GSOD cycles, then recovered, less most of my recordings (only 7 of various ages, but mostly newer). It says it's Organizing Program Guide data. Pick Programs to Record will be available in 4-8 hours. [It ended up only taking 15 minutes]

I'm assuming that this minor disaster arose because the MFS_HDA was still defined, and I neglected to account for the fact that mfsbackup would use this, even though I gave it explicit stdin and /dev/hda output arguments. Why did it use the variable at all when I gave the output file explicitly on the command line?

I would like to request that this environment variable "feature" be removed or at least checked for (and give warning of) in future versions. Perhaps also having mfsrestore check if another process is reading from the destination drive, or running mfsbackup with some sort of exclusive readonly open, preventing other processes from writing to the device. I don't know if either of those make sense in Linux device access semantics, but I can't (well, maybe I can) be the first person to do this.

Something else I don't understand is why any of my recordings are left (and why the backup was so big) when I gave the -s flag to mfsbackup? It's a happy accident at this point that it did, but I'd like to understand it. Were they not in the backup, and just got recovered when the partitions were recreated on the same drive? Maybe they were in exactly the same place?

It's not the end of the world, but I did want to see those lost recordings. It's now reporting itself as 23 hours (on a 100GB drive). What is the best way to expand the drive, and will this image be optimized (ala the -p restore flag)? If the recovered drive turns out to be f*ed up, I have a tivo 1.3 image from mfsbackup1.0 on a cd, and a working TiVo factory A drive w/ 2.0.1. Would I better off reinstalling from the CD or the factory drive?


Comments, other that calling me names?


All times are GMT. The time now is 01:15 AM.

Powered by: vBulletin Version 2.2.8
Copyright © Jelsoft Enterprises Limited 2000, 2001.
(C)opyright - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVoŽ is a registered trademark of TiVo Inc. This site is not affiliated with TiVo Inc.