I guess there aren't that many adventurous souls out there. I'd like to incorporate this into my next hackman release if I can get some confirmation that it works beyond the Series 1.
This process will copy your active partitions to the inactive partitions so that if something goes wrong with the current configuration, the TiVo repair process will bring in the backup team. Or, you can manually flip the boot pages to achieve the same effect. This .tcl program is adapted from several sources including Bubbaj, Riley, Alphawolf, mikey, and ScanMan.
This is a BETA script and is not guaranteed AT ALL! Please have a backup available and proceed at your own risk. This is intended only for experienced and adventurous TiVo hackers!
I've successfully tested it on my Series 1 standalone and Series 1 DirecTiVos and would like to know how it works on other models. Please report your results here and, certainly, indicate any problem or improvement areas.
Basically, what it does is :
1. Determine your active partitions
2. dd them to their corresponding inactive partitions
3. Revises the bootpage parameters, preserving any startup strings
4. Flips the bootpage
5. Revises the file system table (/etc/fstab) on the updated partition to reflect the change
6. Reboots to run from the newly copied partitions
To run ddparts.tcl, simply ftp it to any directory on your TiVo, from telnet cd to that directory and enter ddparts.tcl. If you don't understand the preceding sentence, please do not try to run ddparts.tcl!
Last edited by PortlandPaw; 08-03-2006 at 08:46 AM. Reason: Added feature to just flip partitions (no dd copying) and check for recording status
David R. Hill............... TivoWeb Hack Manager
Chebeague Island........From the land of champions:
Casco Bay..................The Boston Red Sox
Maine........................The New England Patriots
58.5 gig HDR-112 since October, 2000
240 gig, 306 hours since January, 2004 (same machine)
120 gig DSR6000 DirecTiVo
"There are 10 kinds of people -- those who count in binary and those who don't."
I guess there aren't that many adventurous souls out there. I'd like to incorporate this into my next hackman release if I can get some confirmation that it works beyond the Series 1.
David R. Hill............... TivoWeb Hack Manager
Chebeague Island........From the land of champions:
Casco Bay..................The Boston Red Sox
Maine........................The New England Patriots
58.5 gig HDR-112 since October, 2000
240 gig, 306 hours since January, 2004 (same machine)
120 gig DSR6000 DirecTiVo
"There are 10 kinds of people -- those who count in binary and those who don't."
Hi David.
thx much for this script! it works **perfectly** on an instantcaked Series 2 Philips DSR704/8 running 6.2. Some suggestions on improving the script:
1) on my tivo the kernel partition copy took longer than the root partition copy. is that normal? if there's any way to provide progress indication with dd that's be quite useful.
2) would prefer to have confirmation before changing boot params and rebooting with the new partitions.
some explanation of why params are different on the 2 dd comands
(bs=1024 for the root partition copy
, bs=1 for the kernel partition copy)
thx again for writing this!!
-Series 4 Premiere XL unhacked
-5 Philips DSR704 DirecTivos Instantcake'd & Superpatched 6.2, MRV & HMO to both Macs and PCs
-pyTiVo media server
This looks like just the tool I need.
I have a series2 DTivo that I installed with mfslive cd. I used the option to force root partitions to 256MB. When the backup image was restored, the active partition is 256MB in size, according to pdisk, but it's formatted capacity is still the 128MB of the original image. It appears that this tool does automatically what I was planning on doing manually. If I run this, will it format my root partitions at there full size, or will I end up right back where I started, with 256MB partitions formatted to 128MB?
I can't take any chances on bricking this tivo (recordings), but it also has a 768MB /var, so I've got room to make dd images of my partitions and ftp them out to my PC. That would give me what I'd need to repair the drive, in the event something went awry, no? Or should I test this on my spare tivo?
A dd copy won't resize an ext2 file system. I believe you could do it with ext2resize or maybe parted if you pulled the drive and did it on the PC.
Another approach: you could format the alt root and copy everything over there (I'd use a tar pipeline) then flip your bootpage. If anything went wrong, just flip your bootpage back to get back where you started. One thing to remember to do is to edit /etc/fstab in the new root partition to reflect the changed location.
You might ask on the mfslive forums. Other people who have used the new -F option that spike2k added must have been through this and could recommend something.
Very nice, thanks! Worked good here on Dtivo S1. Always a problem when partitions swap. Sorry can't help with newer versions.
kevin
This routine has been worked into the 5.1.0 version of hackman. A lot easier than going the bash route!
David R. Hill............... TivoWeb Hack Manager
Chebeague Island........From the land of champions:
Casco Bay..................The Boston Red Sox
Maine........................The New England Patriots
58.5 gig HDR-112 since October, 2000
240 gig, 306 hours since January, 2004 (same machine)
120 gig DSR6000 DirecTiVo
"There are 10 kinds of people -- those who count in binary and those who don't."
Has anyone had problems restoring a backup after using this? I did, but it could have easily been something else. I did however notice that when using dd if set the count=partionsize, specifically for dd'ing a kernel my backups worked perfectly.
Mikey
I want to make sure I have this strait since we'll all be getting an update within the next couple of weeks...
After I get the update I run installSw.itcl making sure to change the file so my Tivo doesn't reboot. I then launch TWP and use hackman to copy the active partition to the inactive partition. This should allow me to boot into my new OS though I may have to reinstall hacks etc...
Will I need to run superpatch or any of that? Should I still be able to FTP, telnet etc...?
NoNo. DD Copy backs up what is on the active partition.
what you want to do is basically
mod InstallSW.itcl.
run it.
mount the alternate partition and apply hacks to new software version, minimum hacks that is, ie telnet ftpd. If its correct when you reboot it will upgrade. after the upgrade is complete backup using DDcopy. Reboot just to be sure.
finish hacking by adding whatever you want. run the tivo a few days and then backup your fully hacked system again with with DD copy.
Mikey
Thanks... Couple of more questions
Does the "Copy active to inactive partition" in hackman perform this step?
[QUOTE=mikey;288282] after the upgrade is complete backup using DDcopy. [quote]
What exact command to you use to perform this DDcopy?
What exact command to you use to perform this DDcopy?
You have to be careful with this operation. Hackman can help, but you have to know what you're doing. Here is what appears when you click "Copy active to inactive partition"
So, "mount the alternate partition" is equivalent to flipping them. Good luck!This feature is intended only for experienced and adventurous TiVo hackers! Proceed at your own risk!
This process will copy your active partitions to the inactive partitions so that if something goes wrong with the current configuration, the TiVo repair process will bring in the backup team. Or, you can manually flip the boot pages to achieve the same effect. This routine is adapted from several sources including Bubbaj, Riley, Alphawolf, mikey, and ScanMan.
This process is not guaranteed AT ALL! Please have a backup available and proceed at your own risk. To repeat, this is intended only for experienced and adventurous TiVo hackers!
Basically, what it does is:
-- dd copy --
1. Determine your active partitions
2. dd them to their corresponding inactive partitions
-- flip partitiions --
3. Revises the bootpage parameters, preserving any startup strings
4. Flips the bootpage
5. Revises the file system table (/etc/fstab) on the updated partition to reflect the change
6. Reboots to run from the newly copied partitions
DO NOT FLIP PARTITIONS WITHOUT dd COPYING THE PARTITIONS FIRST!
(or at some point in the past)
David R. Hill............... TivoWeb Hack Manager
Chebeague Island........From the land of champions:
Casco Bay..................The Boston Red Sox
Maine........................The New England Patriots
58.5 gig HDR-112 since October, 2000
240 gig, 306 hours since January, 2004 (same machine)
120 gig DSR6000 DirecTiVo
"There are 10 kinds of people -- those who count in binary and those who don't."
I have a Series 2 with 6.4a and the script apparently stops at line 113. Here is a copy of the telnet screen.
Code:Ambers-TiVo# tivosh ddparts.tcl This process will copy your active partitions to the inactive partitions so that if something goes wrong with the current configuration, the TiVo repair process will bring in the backup team. Or, you can manually flip the boot pages to achieve the same effect. This entry is excerpted from several sources including Bubbaj, Riley, Alphawolf, mikey, and ScanMan. The script will inform you as the functions are performed and will then reboot your machine. Don't touch the TiVo during the process. This is a BETA script and is not guaranteed AT ALL! Please have a backup available and proceed at your own risk. This is intended only for experienced and adventurous TiVo hackers! What would you like to do? 1. dd copy the partitions 2 Flip the partitions DO NOT DO THIS WITHOUT dd COPYING THE PARTITIONS FIRST! 3 Quit Choice? 1 Type "YES" to proceed Choice? YES And away we go! Active boot partition is #4 Now copying active root filesystem partition #4 to inactive partition #7 This will take a few minutes, so please be patient! dd if=/dev/hda4 of=/dev/hda7 bs=1024 131072+0 records in 131072+0 records out while executing "exec dd if=/dev/hda4 of=/dev/hda7 bs=1024" (procedure "dd3" line 3) invoked from within "dd3" invoked from within "if {$7active} { if {! $flip} { puts "\nActive boot partition is #7" puts "\nNow copying active root filesystem partition #7 to inactive partitio. .." (file "ddparts.tcl" line 113)