View Full Version : How to edit files on Tivo???
SledgeHammer
05-18-2004, 12:50 PM
I've got a CacheCard coming in a few days and apperently you need to do some hand tweaking of files on the Tivo to get it to work with xPlusz. What is the best/easiest way to edit text files on a series 1 tivo?
CongoGrey
05-18-2004, 12:54 PM
Depends on how comfortable you are with vi or other text editors and what is on your TiVo. You can remount for file system to read/write and use your resident text editor to edit and save the files or you can ftp them onto your PC edit them locally and place the new files in bulk back onto your box.
SledgeHammer
05-18-2004, 01:22 PM
I have not installed anything onto the Tivo except xTreme 2.5.2/xPlusz. What text editors would be installed?
Also, if editing files on the PC, isn't there an issue with carriage return/line feed differences?
P.S. I plan to go in via bash if that makes a difference.
classicsat
05-18-2004, 02:31 PM
Stock, I belive there is no editor, you add one. I have joe on mine, but doesn't seem to work properly over hyperterminal (using serial bash). I usually end up Z-modeming files to my PC, and use a unix friendly text editor, and send them back to the Tivo.
I've got a CacheCard coming in a few days and apperently you need to do some hand tweaking of files on the Tivo to get it to work with xPlusz. What is the best/easiest way to edit text files on a series 1 tivo?
I use Textpad on my PC then make sure I save them in UNIX format. You can also grab a copy of DOS2UNIX which will correct the format before you FTP it over...
HUmm... I installed my cache card a few months ago, and don't recall having to edit any files? I thought the install (script?) did it all. Perhaps I just forgot what it took, but it seemed pretty user friendly.
Good Luck... I've got a 512M stick, and it helps ALOT! Waiting for the boot up is a bit of a pain but hopefully that doesn't happen much!
(edit) I forgot to mention, I also have xPluz installed.
SledgeHammer
05-18-2004, 05:21 PM
Hmmm... on the CacheCard support forum, they have a FAQ on some tweaks you have to make because the CacheCard install script messes up some of the scripts. This is a C&P...
1. In your /etc/rc.d/rc.sysinit file, the CacheCard install adds the following lines:
/bin/bash </dev/ttyS3 >& /dev/ttyS3 &
/sbin/tnlited 23 /bin/bash -login &
/sbin/tivoftpd
Remove them (not just comment them out). xPlusZ will load these daemons, if you have enabled them via xPlusZ remote. See the xPlusZ readme for this.
2. In the /etc/rc.d/rc.net file, there used to be a line at the end of the file that loaded xPlusZ. The CacheCard install took this out. You need to put it back. The line is:
/etc/rc.d/rc.remote-login &
It is the last line in the file. It runs the rc.remote-login file which in turn loads the entire xPlusZ suite of daemons.
Thats all. You need to reboot, or umount the drive and take it out of your PC. Oh yes, Do NOT delete the line in your /etc/rc.d/rc.sysinit:
exec < /dev/ttyS3 >& /dev/ttyS3; bash --login
or something similar. This is the serial bash tty, and is needed.
Notes: If you are editing via PC, be sure to edit the active partition or your changes won't have any effect. Be sure all files are executable and there. There are plenty of places to find how to do these things, and won't be addressed here.
SR712
05-18-2004, 09:56 PM
Geez... that sure looks familiar. :D
Hmmm... on the CacheCard support forum, they have a FAQ on some tweaks you have to make because the CacheCard install script messes up some of the scripts. This is a C&P...
1. In your /etc/rc.d/rc.sysinit file, the CacheCard install adds the following lines:
/bin/bash </dev/ttyS3 >& /dev/ttyS3 &
/sbin/tnlited 23 /bin/bash -login &
/sbin/tivoftpd
Remove them (not just comment them out). xPlusZ will load these daemons, if you have enabled them via xPlusZ remote. See the xPlusZ readme for this.
2. In the /etc/rc.d/rc.net file, there used to be a line at the end of the file that loaded xPlusZ. The CacheCard install took this out. You need to put it back. The line is:
/etc/rc.d/rc.remote-login &
It is the last line in the file. It runs the rc.remote-login file which in turn loads the entire xPlusZ suite of daemons.
Thats all. You need to reboot, or umount the drive and take it out of your PC. Oh yes, Do NOT delete the line in your /etc/rc.d/rc.sysinit:
exec < /dev/ttyS3 >& /dev/ttyS3; bash --login
or something similar. This is the serial bash tty, and is needed.
Notes: If you are editing via PC, be sure to edit the active partition or your changes won't have any effect. Be sure all files are executable and there. There are plenty of places to find how to do these things, and won't be addressed here.
I'll have to check mine out, it has been a while, but perhaps it's because I don't have xPlusZ load/start anything, I do ALL that via rc.sysinit.author - I have found that the safest over time. However the things you are referring to, I do still have in rc.sysinit - I think. Anyway, thanks for the info.
this is the tail end of my rc.sysinit ..
echo "rc.sysinit is complete"
/bin/bash </dev/ttyS3 >& /dev/ttyS3 &
/sbin/tnlited 23 /bin/bash -login &
/sbin/tivoftpd
echo "starting xPlusz..."
if [ -e /tvlib/xPlusz.anchor ]; then
xPlusz_dir=$(nthword 3 $(cat /tvlib/xPlusz.anchor))
if [ -x $xPlusz_dir/xPlusz.tcl ]; then
$xPlusz_dir/xPlusz.tcl >> /var/log/tvdebuglog 2>&1 &
fi ; # xPlusz
fi ; # xPlusz
and this is my complete rc.net
#
#!/bin/sh
#
if /sbin/insmod -f /lib/modules/turbonet2.o macaddr=00:0B:AD:71:B1:FC debuglevel=0 ; then
export DYNAMIC_NET_DEV=eth0
/sbin/ifconfig eth0 192.168.1.110 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.1.1
fi
and ... I don't have a 'rc.remote-login' file ? so I'm not sure what that means to my installation compared to yours...
eastwind
05-19-2004, 01:49 PM
Call it a quirk of mine, but I prefer and like to suggest that the serial bash command be executed before the call to rc.sysinit.author. I do this because I know from experience that anything you mess up in .author can freeze the startup process if done incorrectly and never return to rc.sysinit to make the calls that come at the end of the file. This can be as simple as leaving off an ampersand from the end of a line or forgetting to make .author executable. Putting the bash on serial command before the call to .author insures that you can at least get in to see what is going on and edit files if needed (and prevent the necessity of pulling the drive just to edit a file).
my 2 cents..
ew
Call it a quirk of mine, but I prefer and like to suggest that the serial bash command be executed before the call to rc.sysinit.author. I do this because I know from experience that anything you mess up in .author can freeze the startup process if done incorrectly and never return to rc.sysinit to make the calls that come at the end of the file. This can be as simple as leaving off an ampersand from the end of a line or forgetting to make .author executable. Putting the bash on serial command before the call to .author insures that you can at least get in to see what is going on and edit files if needed (and prevent the necessity of pulling the drive just to edit a file).
This is exactly what happened to me twice while trying to get my wireless USB connection working. What a pain! Forgot to chmod -755 rc.sysinit.author after editing. For those who have used it to upgrade, I believe Sleeper's Tivoscripts hack runs the bash on serial command inside rc.sysinit.author by default,so if you go mucking with the file to add wireless support, move the bash command and save yourself needless hours re-running scripts.
I have an HDVR2, so I couldn't use the easy hack to get into serial bash mode. There is apparently a way to wipe out the backdoor password in the DtiVo's but I haven't played with it. Thanks for the tip eastwind, I was thinking about this very problem today.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.