View Full Version : Nearly unhacked S2 unbootable after DTV Uprade to 6.2
gpontis
05-28-2005, 04:55 AM
I was trying for a conservative upgrade on an HDVR2 DTivo to 6.2 before installing any hacks, by letting it upgrade itself from the sat and a call in. The system was running 3.1.1e. I prompted a call-in today and it was waiting for restart afterwards. So I selected restart. When it came up the "Installing new software from Tivo" screen was displayed, then another reboot and now it reboots continuously without passing the Welcome screen.
I had previously expanded the stock drive to 120G, then made a complete backup (recordings and all) to a 160G drive. It was running with the 160G drive when the problem occured. I did the 120->160G copy using the PTV LBA48 CD and mfstool 2.0 without -x. Since 3.1.1e did not have an LBA48 kernel, perhaps this is where the problem started. Now that I examine the partition table with pdisk I see that there are three pairs of MFS partitions on the 160G drive but 38G is unused.
In order to get some insight into what went wrong, I wrote a killhdinit kernel (3.1.5) to the drive at partitions 3 and 6 and wrote a new bootblock with the usual arguments. The serial console output shows that there is a failure to access the root partition at /dev/hda4. With the drive back in the test PC running the PTV boot disk, I find that I cannot mount /dev/hda4 or 7 ... "must specify filesystem". (It really was hda, the drive was the IDE primary master)
From Linux, mfs_info says of /dev/hda "Not a Tivo superblock, magic = 0". Sounds bad.
The console log is appended, though I suspect one of you already knows what went down. Please enlighten me.
George
Jamie
05-28-2005, 11:00 AM
I was trying for a conservative upgrade on an HDVR2 DTivo to 6.2 before installing any hacks, by letting it upgrade itself from the sat and a call in. The system was running 3.1.1e. I prompted a call-in today and it was waiting for restart afterwards. So I selected restart. When it came up the "Installing new software from Tivo" screen was displayed, then another reboot and now it reboots continuously without passing the Welcome screen.
...
I definitely looks like your partition table is toast. After the "Partition check" line in the log there should be a list of the partitions on the hda disk. In your log it is empty. My best guess is that one of the partitions ends above the 2^28=268435456 sector mark. This probably happened because you used an lba48 iso when you copied to the new drive, and expanded something. That partition "wrapped around" when run with a non lba48 kernel (the one in 3.1.1e) and clobbered the disk partition table. It seems that it happened to write to that area of the disk during the upgrade to 6.2. Now that 6.2 is installed, you have an lba48 kernel. You could try to recover by rewriting the partition table, but at this point I wouldn't trust it. I'd start over from scratch.
gpontis
05-28-2005, 12:04 PM
I am prepared to start over, if for no other reason that to get the full capacity of the drive. (If this had worked I would have used it as a testbed to try your process to coalesce MFS partitions.)
But for the sake of undertsanding I booted up Isolinux again and used pdisk. It found the partitions, no problem. Also, none of the Tivo ones are crossing the magic boundary, thanks to not using -x or expanding swap area in the mfstool copy. I rewrote the partition table using pdisk, which required some change so I created an ext3 partition 16, but didn't touch anything below. It still does not boot and the error looks the same. There must be another byte somewhere that tells the disk ID or something which is gone.
Jamie
05-28-2005, 12:29 PM
I am prepared to start over, if for no other reason that to get the full capacity of the drive. (If this had worked I would have used it as a testbed to try your process to coalesce MFS partitions.)
But for the sake of undertsanding I booted up Isolinux again and used pdisk. It found the partitions, no problem. Also, none of the Tivo ones are crossing the magic boundary, thanks to not using -x or expanding swap area in the mfstool copy. I rewrote the partition table using pdisk, which required some change so I created an ext3 partition 16, but didn't touch anything below. It still does not boot and the error looks the same. There must be another byte somewhere that tells the disk ID or something which is gone.
Hum. I'm at a loss. The "free space" (Apple_Free partition) is above the 2^28 mark, but nothing else seems to be. It's odd that the tivo kernel can't read the partition table, but your linux PC can. I didn't follow what you were doing with ext3 on partition 16.
The only think I can suggest is to rewrite the partition table on the PC side with a known good pdisk version, and rewrite the bootpage with a known good bootpage program.
gpontis
05-28-2005, 06:06 PM
After considering the symptoms and reviewing the boot console log again I think that the problem was not a faulty partition table. It was the superblock which was damaged. There is actually a message in there about it:
hda4: bad access: block=2, count=2
end_request: I/O error, dev 03:04 (hda), sector 2
EXT2-fs: unable to read superblock <----------------------
Can't mount root filesystem: Invalid argument
I tried running fsck from a Knoppix disk but it did not recognize the filesystem. However, there is data on that partition so with suitable motivation there might be something left to try. I think that I have learned as much as I can from this and will move on to a fresh image. Thanks for your helpful comments and suggestions.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.