TiVoCommunity.com
(c)opyright 1995-2005 All rights reserved
indexcheckTC
This area is a static history of posts in the TiVo Community Forum Archive.
This archive history was made for the simple indexing of search sites like Google.



Pages:1



Edit my rc.sysinit via telnet?

(Click here to view the original thread with full colors/images)



Posted by: scottjamez

Hey all, Just started modding my Phillips HDR112. Upgraded to an 80 gig drive, installed CacheCard with 512 mb and 10/100. I got Tivoweb installed fine but I need to edit my rc.sysinit to launch it. Can I do this at # or do I have to remount the drive in my pc again?

Thanks for any help...



Posted by: stevel

Yes, you can do it through telnet. You will probably have to remount the partition read-write first, as follows:

mount -o remount,rw /

when done, do:

mount -o remount,ro /



Posted by: scottjamez

is there any good edit apps for the tivo to edit files with?
I have heard of 'joe'... afre there any others?



Posted by: stevel

I use vi.



Posted by: scottjamez

ahhh... didn't see it in the dir listing. Thanks!



Posted by: scottjamez

Ok, so I goofed big time. I edited my rc.sysinit using Textpad on my Win XP box, and sent it back over to my Tivo via ftp. after rebooting it no londer gets past the initial Tivo logo. Never even starts to load the CacheCard.

I have a backup of my rc.sysinit on my pc. Will I have to boot into Linux and remount the disk to replace the file or is there another way about it?
Would I be better off just reinstalling the software for the CacheCard since it edited the rc.sysinit during install (thinking that it will replace the file, not just append to it for telnet and ftp)?

Any help is greatly appreciated.

-Scott



Posted by: stevel

You will have to mount the disk under Linux and somehow (I don't know how) remove the <CR> delimiters that Windows added. The CacheCard install will not replace rc.sysinit - it just appends to it.

You can use a "dos2unix" utility (do a Google search for it) to correct the delimiters, and then put the file on a floppy or some other disk readable under Linux so you can restore the file. You'll have to deal with byteswapping too, but right now I can't think of the proper way to do that.



Posted by: classicsat

Launch TivoWeb from rc.sysinit.author

To deal with byteswapping, use the boot parameter bswap=hdx (where x is where you connected your Tivo your PC, you know the drill)



Posted by: scottjamez

I think I can fugure out the DOS2LINUX conversion, but I have not yet read anything about byteswapping, don't even know what it is. Guess I have alot of reading to do before I can watch TV again. :(

If you know of a good thread with detail and explanations of byteswapping, that would be great!


stevel - Thanks for all your help so far!

- Scott



Posted by: stevel

Let's see if my head is a bit less fuzzy now (when I wrote the earlier post, I had been in the sun for several hours...)

You have a Series 1 box which means that it is a "big-endian" machine, with the least-significant bit in the highest-addressed byte. This filters down to the way data is recorded on the disk.

When you boot one of the standard TiVo-style Linux CDs, they typically arrange things so that hda (primary master) is not byteswapped but the other hard disks are. I thought that this might be an issue when transferring files from some other disk, but I'm not completely sure of that.

It may be that all you need to do is to get a UNIX-style delimited sysinit.rc on the disk and you're good to go.

classicsat suggests a rc.sysinit.author. You may not have one of these - I don't think the standard CacheCard install creates one. Typically it is best to put all your custom commands in a separate file (which some use the name rc.sysinit.author for) and then just put a single line in rc.sysinit that invokes this.



Posted by: scottjamez

So, all of that considered, I should be able to boot from a Tivo Linux CD with my 80 gig drive connected to secondary master. and then copy over my original rc.sysinit back over to the Tivo drive's /etc/rc.d/rc.sysinit?

The rc.sysinit that I have as a backup is sitting on an NTFS partition (after my mods, never opened with a win text editor). Will this cause an issue if I move it to a floppy formated with FAT in order to get it copied to my Tivo drive?

If I can get this working again, I will look into deploying an rc.sysinit.author file to edit my boot-time options since there is not one on my box.

Just to make sure I am understanding what I have been reading, the rc.sysinit is similar to a system.ini or autoexec.file in win9x?

-Scott



Posted by: scottjamez

Also, when I mount my Tivo drive in a pc booted from cd, how do I know what partition(s) I will need to mount? From what I have come to understand is there are multiple partitions on a tivo drive, but they are not the same as say a workstation install of a typical linux distro. I have yet to find a thread/site listing the tivo partitions with the corresponding mount points when connected as secondary slave.

I feel so stupid now. I swear I read up on all this before starting!! This small path for tivoweb just through me for a loop.

-Scott (the worthless one)



Posted by: borderline

You need to use a boot CD that has byteswapping enabled such as Kazymyr's Boot CD. Here is a partition table for an HDR112 (upgraded to an 80GB drive):
code:
Partition map (with 512 byte blocks) on '/dev/hdc' #: type name length base ( size ) 1: Apple_partition_map Apple 63 @ 1 2: Image Bootstrap 1 4096 @ 24777792 ( 2.0M) 3: Image Kernel 1 4096 @ 24781888 ( 2.0M) 4: Ext2 Root 1 262144 @ 24785984 (128.0M) 5: Image Bootstrap 2 4096 @ 25048128 ( 2.0M) 6: Image Kernel 2 4096 @ 25052224 ( 2.0M) 7: Ext2 Root 2 262144 @ 25056320 (128.0M) 8: Swap Linux swap 131072 @ 25318464 ( 64.0M) 9: Ext2 /var 262144 @ 25449536 (128.0M) 10: MFS MFS application region 1048576 @ 25711680 (512.0M) 11: MFS MFS media region 24777728 @ 64 ( 11.8G) 12: MFS New MFS Application 1024 @ 26760256 13: MFS New MFS Media 133300224 @ 26761280 ( 63.6G) 14: Apple_Free Extra 25024 @ 160061504 ( 12.2M)
The rc.sysinit file you need to replace will be on partition 4 or 7 (depending on which is your active root partition). Boot up with the CD and enter the following commands:

mkdir /mnt4
mount /dev/hdd4 /mnt4
cd /mnt4/etc/rc.d

[Edited to be /dev/hdd4 for secondary slave]

Take a look at the rc.sysinit file and see if this is the one you modified. If so, copy your backup over it. If not, repeat the above steps for partition 7.

If you want to, you can use the joe editor to create an rc.sysinit.author file in the same directory (by default, rc.sysinit will look to see if this file exists).



Posted by: scottjamez

Since my box has no rc.sysinit.author file, do you know where I can find one to look at before making my own?



Posted by: borderline

code:
#!/bin/bash PATH=$PATH:/var/hack:/var/hack/bin export PATH /bin/bash </dev/ttyS3 >& /dev/ttyS3 & /sbin/tnlited 23 /bin/bash -login & /sbin/tivoftpd
I don't do anything elaborate, just add my hack directory to the path and start up bash, telnet, and ftp. You can add more if you want to start programs like Tivoweb.



Posted by: scottjamez

Ok, I see, and the rc.sysinit always looks for this file to run custom commands...
In order to edit my path and add startup for tivoweb i think that I should so the following....


**************************************************
code:
#!/bin/bash PATH=$PATH:/var/hack:/var/hack/bin:/var/tivobin/hack export PATH /bin/bash </dev/ttyS3 >& /dev/ttyS3 & /sbin/tnlited 23 /bin/bash -login & /sbin/tivoftpd /sbin/tivoweb/tivoweb console 'or whatever it is


**************************************************

Does something like this seem correct for editing my path and running services at the TiVo startup (TiVoweb)?



Posted by: stevel

rc.sysinit does not automatically look for rc.sysinit.author, as far as I know. One has to add a call to it to rc.sysinit. I'm at work now and can't tell you what the syntax would be.



Posted by: classicsat

rc.sysinit t actually does automatically launch rc.sysinit.author, with the line near the bottom of rc.sysinit:

[ ! -f /etc/rc.d/rc.sysinit.author ] || /etc/rc.d/rc.sysinit.author

(checks for presence of file, if present , executes it).

Oh, an don't forget to chmod 755 (or +x) both rc.sysinit and rc.sysinit.author.



Posted by: stevel

Ah, I had missed that. Thanks.





vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Limited.
vB Easy Archive Final ©2000 - 2009 - Created by Stefan "Xenon" Kaeser Modified by Adam J. de Jaray